ColorMask

From MCS Wiki AVR
(Difference between revisions)
Jump to: navigation, search
(Created page with "= <span class="f_Header">Action</span> = Enable or disable writing of color components. <span style="font-family: Arial;"> </span> <span style="font-family: Arial;">&n...")
 
 
Line 69: Line 69:
  
 
= <span class="f_Header">Example</span> =
 
= <span class="f_Header">Example</span> =
 +
 +
<source lang="bascomavr">
 +
' Pseudocode
 +
 +
'Draw a '8' digit in the middle of the screen. Then paint an invisible 40-pixel circular
 +
'touch area into the tag buffer
 +
 +
Begin_G BITMAPS
 +
Vertex2II 68, 40, 31, &H38
 +
PointSize 40 * 16
 +
ColorMask 0, 0, 0, 0
 +
Begin_G POINTS
 +
Tag &H38
 +
Vertex2II 80, 60, 0, 0
 +
</source>[[File:Clip0079.png|center|Clip0079.png]]
 +
 +
<br/>{{Languages}}
 +
 +
[[Category:FT800 Commands]]

Latest revision as of 20:46, 12 December 2014

Contents

Action

Enable or disable writing of color components.

 

 

Syntax

ColorMask r, g ,b ,a 

 

 

Remarks

r

Enable or disable the red channel update of the  FT800 color buffer. The initial value is 1 and means enable

g

Enable or disable the green channel update of the FT800 color buffer. The initial value is 1 and means enable

b

Enable or disable the blue channel update of the FT800 color buffer. The initial value is 1 and means enable

a

Enable or disable the alpha channel update of the FT800 color buffer. The initial value is 1 and means enable

 

The color mask controls whether the color values of a pixel are updated.  Sometimes it is used to selectively update only the

red, green, blue or alpha channels of the image. More often, it is used to completely disable color updates while updating the

tag and stencil buffers.

 

 

See also

TagMask

 

 

Example

' Pseudocode
 
'Draw a '8' digit in the middle of the screen. Then paint an invisible 40-pixel circular 
'touch area into the tag buffer
 
Begin_G BITMAPS
Vertex2II 68, 40, 31, &H38
PointSize 40 * 16
ColorMask 0, 0, 0, 0
Begin_G POINTS
Tag &H38
Vertex2II 80, 60, 0, 0
Clip0079.png

Languages   English  
Personal tools
Namespaces
Variants
Actions
Navigation
Language