Skip to content

MUI_Colorfield

Thore Böckelmann edited this page Oct 11, 2021 · 4 revisions

Colorfield.mui

Super class

Area.mui

Background

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.

Attributes

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

NAME

MUIA_Colorfield_Blue -- V4 [ISG], ULONG, 0x8042d3b0

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

MUIA_Colorfield_Green

NAME

MUIA_Colorfield_Green -- V4 [ISG], ULONG, 0x80424466

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

MUIA_Colorfield_Pen

NAME

MUIA_Colorfield_Pen -- V4 [..G], ULONG, 0x8042713a

FUNCTION

When specified, the colorfield uses exactly this pen instead of trying to obtain a new one.

SEE ALSO

MUIA_Colorfield_RGB

MUIA_Colorfield_Red

NAME

MUIA_Colorfield_Red -- V4 [ISG], ULONG, 0x804279f6

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

MUIA_Colorfield_RGB

NAME

MUIA_Colorfield_RGB -- V4 [ISG], ULONG *, 0x8042677a

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


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
Clone this wiki locally