AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Rgb mittels Asm darstellen

Ein Thema von thomasku · begonnen am 4. Mai 2009 · letzter Beitrag vom 7. Mai 2009
 
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.316 Beiträge
 
Delphi 12 Athens
 
#14

Re: Rgb mittels Asm darstellen

  Alt 7. Mai 2009, 17:08
die zwei 00 stören nicht, aber Farben aus gewissen paletten

Delphi-Quellcode:
// Quelle siehe Anhang

Const COLOR_SCROLLBAR = TColorIndex(0);
  COLOR_BACKGROUND = TColorIndex(1);
  COLOR_ACTIVECAPTION = TColorIndex(2);

  cpSystemPalette = $00;
  cpActingPalette = $01;
  cpLogicalPalette = $02;
  cpNoColor = $1F;
  cpDefaultColor = $20;
  cpSystemColor = $FF;

  clScrollBar = TColor(cpSystemColor shl 24 or COLOR_SCROLLBAR);
  clBackground = TColor(cpSystemColor shl 24 or COLOR_BACKGROUND);
  clActiveCaption = TColor(cpSystemColor shl 24 or COLOR_ACTIVECAPTION);


Function ColorToRGB(Color: TColor): TColor;
  Var _Color: TColorRec Absolute Color;

  Begin
    If _Color.Palette = cpSystemColor Then Result := GetSysColor(Color and $FF) and $FFFFFF
    Else If _Color.Palette in [cpSystemPalette..cpLogicalPalette] Then Result := Color and $FFFFFF
    Else Result := $000000;
  End;
so hat z.B. clBackground den Wert $FF000001 (auch so zu finden in der Unit Graphics von Delphi)

Speziell die Systemfarben sind über ihren Index kodiert und müssen erst entschlüsselt werden.
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 05:30 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz