Colorfield class creates a rectangle filled with a specific color, useful e.g. within a palette requester. You can change the color of the field at any time by setting its RGB attributes. The field will try to obtain an exclusive pen on the current screen. When none is available, it just displays some kind of rastered background. Maybe it will get a little more intelligent and try to display the color by mixing together some other colors, but thats a future topic. Needless to say that Colorfield only works with Kickstart 3.x and above, since lower operating systems don't support pen sharing. When using this class with a lower OS, you will also get some kind of (boring) raster.
Attribute Ver ISG Type ----------------------------------- --- --- -------------------- MUIA_Colorfield_Blue V4 ISG ULONG MUIA_Colorfield_Green V4 ISG ULONG MUIA_Colorfield_Pen V4 ..G ULONG MUIA_Colorfield_Red V4 ISG ULONG MUIA_Colorfield_RGB V4 ISG ULONG *
NAME MUIA_Colorfield_Blue -- (V4 ) [ISG], ULONG FUNCTION Set or get the 32-bit blue component of the fields color. Values range from 0 (no blue) to $ffffffff (full blue). SEE ALSO MUIA_Colorfield_Green, MUIA_Colorfield_Red, MUIA_Colorfield_RGB
NAME MUIA_Colorfield_Green -- (V4 ) [ISG], ULONG FUNCTION Set or get the 32-bit green component of the fields color. Values range from 0 (no green) to $ffffffff (full green). SEE ALSO MUIA_Colorfield_Red, MUIA_Colorfield_Blue, MUIA_Colorfield_RGB
NAME MUIA_Colorfield_Pen -- (V4 ) [..G], ULONG FUNCTION When specified, the colorfield uses exactly this pen instead of trying to obtain a new one. SEE ALSO MUIA_Colorfield_RGB
NAME MUIA_Colorfield_Red -- (V4 ) [ISG], ULONG FUNCTION Set or get the 32-bit red component of the fields color. Values range from 0 (no red) to $ffffffff (full red). SEE ALSO MUIA_Colorfield_Green, MUIA_Colorfield_Blue, MUIA_Colorfield_RGB
NAME MUIA_Colorfield_RGB -- (V4 ) [ISG], ULONG * FUNCTION Set or get the red/green/blue values of a colorfield all at once. You pass in / receive a pointer to three longwords containing the 32-bit red, green and blue values. EXAMPLE ULONG rgb[3] = { 0xa000000,0xdeadbeaf,0x42424242 }; set(field,MUIA_Colorfield_RGB,rgb); ULONG *rgb; get(field,MUIA_Colorfield_RGB,&rgb); printf("red=%08lx green=%08lx blue=%08lx\n",rgb[0],rgb[1],rgb[2]); SEE ALSO MUIA_Colorfield_Green, MUIA_Colorfield_Blue, MUIA_Colorfield_Red
© 1997, Stefan Stuntz | [MUI Homepage] [Autodoc Index] [Feedback] | Updated: 29-Mar-97 |