Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi bedeutung von TColor (https://www.delphipraxis.net/96553-bedeutung-von-tcolor.html)

dajuhsa 26. Jul 2007 13:51


bedeutung von TColor
 
ich weiß, dass ein TColor Wert so aufgebaut ist:
$xxBBGGRR.
aber was genau bedeutet dieses xx? deckkraft?

s-off 26. Jul 2007 13:55

Re: bedeutung von TColor
 
Hi,

die Delphi-Hilfe sagt:
Zitat:

Hat das höchstwertige Byte den Wert Null, erhalten Sie eine Farbe, die derjenigen in der Systempalette am ähnlichsten ist. Ist das höchstwertige Byte Eins ($01 bzw. 0x01), ergibt das eine Farbe, die derjenigen in der aktiven Palette am ähnlichsten ist. Wenn Sie das höchstwertige Byte auf Zwei ($02 bzw. 0x02) setzen, wird der Wert an die ähnlichste Farbe in der logischen Palette des aktuellen Gerätekontexts angepasst.

Klaus01 26. Jul 2007 13:56

Re: bedeutung von TColor
 
Aus der Delphi Hilfe:

Zitat:

If you specify TColor as a specific 4-byte hexadecimal number instead of using the constants defined in the Graphics unit, the low three bytes represent RGB color intensities for blue, green, and red, respectively. The value $00FF0000 represents full-intensity, pure blue, $0000FF00 is pure green, and $000000FF is pure red. $00000000 is black and $00FFFFFF is white.

If the highest-order byte is zero ($00), the color obtained is the closest matching color in the system palette. If the highest-order byte is one ($01), the color obtained is the closest matching color in the currently realized palette. If the highest-order byte is two ($02), the value is matched with the nearest color in the logical palette of the current device context.
Grüße
Klaus

dajuhsa 26. Jul 2007 14:34

Re: bedeutung von TColor
 
okay danke

Khabarakh 26. Jul 2007 15:33

Re: bedeutung von TColor
 
TColor ist nichts anderes als ein Integer, seine Interpretation hängt immer vom Kontext ab. So ist das höchste Bit bei GDI die Palette, bei GDI+ jedoch der Alphakanal.


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:44 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz