Hi everybody.
I am setting the color to the object.
However, the set color is not reflected correctly.
PROCEDURE Test;
VAR
leftTop,rightDown:POINT;
hdl:HANDLE;
r,g,b:LONGINT;
BEGIN
{Create Rectangle}
leftTop.x := 0;
leftTop.y := 100;
rightDown.x := 100;
rightDown.y := 0;
Rect(leftTop.x,leftTop.y,rightDown.x,rightDown.y);
hdl := LNewObj;
{Set Color (RGB(50,0,200))}
r := ROUND(50/255*65535);
g := ROUND(0/255*65535);
b := ROUND(200/255*65535);
SetFillBack(hdl,r,g,b);
END;
Run(Test);
The settings of the drawn object are like this.
→R:49/G:0/B:200
Green and blue values are correct.
But the red value is wrong.
What's wrong?
By the way, some colors are set correctly with the same code.
For example, RGB(220,220,220) and RGB(255,0,99) etc...
Thanks.