-
Notifications
You must be signed in to change notification settings - Fork 0
MUI_Colorfield
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 | Version | 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 * |
MUIA_Colorfield_Blue -- V4 [ISG], ULONG
, 0x8042d3b0
Set or get the 32-bit blue component of the fields color. Values range from 0 (no blue) to $ffffffff (full blue).
MUIA_Colorfield_Green, MUIA_Colorfield_Red, MUIA_Colorfield_RGB
MUIA_Colorfield_Green -- V4 [ISG], ULONG
, 0x80424466
Set or get the 32-bit green component of the fields color. Values range from 0 (no green) to $ffffffff (full green).
MUIA_Colorfield_Red, MUIA_Colorfield_Blue, MUIA_Colorfield_RGB
MUIA_Colorfield_Pen -- V4 [..G], ULONG
, 0x8042713a
When specified, the colorfield uses exactly this pen instead of trying to obtain a new one.
MUIA_Colorfield_Red -- V4 [ISG], ULONG
, 0x804279f6
Set or get the 32-bit red component of the fields color. Values range from 0 (no red) to $ffffffff (full red).
MUIA_Colorfield_Green, MUIA_Colorfield_Blue, MUIA_Colorfield_RGB
MUIA_Colorfield_RGB -- V4 [ISG], ULONG *
, 0x8042677a
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.
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]);
MUIA_Colorfield_Green, MUIA_Colorfield_Blue, MUIA_Colorfield_Red
Copyright © 1992-2006 by Stefan Stuntz Copyright © 2006-2021 by Thore Böckelmann, Jens Maus |
MUI for AmigaOS Homepage MUI for AmigaOS Wiki |
Updated: 11-Oct-2021 |