Re: Modify R G and B of TColor



Global wrote:

I have a TColor variable to which I want to modify R G B. I want to raise each by 1.


do this.
Type TmyRGBs = Record
R,G,B:Byte;
End;
---- some where in code land ---

inc(TmyRgbs(MyTcolor).R); Inc(TmyRgbs(MyTcolor).G); etc..
and if you want to get fancy..
Var
COLORS :TmyRgbs absolute SomeTcolorVariable;
Begin
Inc(Colors.R); Inc(Colors.B); Inc(colors.G); etc..
---
another way of doing this.

With TmyRgbs(SomeTcolorVariable) do
Begin
inc(R); Inc(B); Inc(G);
End;

etc...
hope that gave you some insight!
:)




--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

.