From.GetPixel on the Device

alfcen

Well-Known Member
Licensed User
Longtime User
Is anyone aware of a problem with From.GetPixel() on the device?
The following routine works great on the dektop, however on the PPC all circles are drawn in white. The o/s of the PPC is PPC2003 though.

If pos > 3 And pos < 3.3 Then
If frmGalilean.GetPixel(px,py)=cYellow Then
frmGalilean.Circle(px,py,1,cYellow ,F)
else
frmGalilean.Circle(px,py,1,cWhite,F)
end if
Else
frmGalilean.Circle(px,py,1,cWhite,F)
End If

By the way, could a Form.SetPixel command be added to to future version?
Thanks a lot!
 

alfcen

Well-Known Member
Licensed User
Longtime User
Thank you very much, Erel.
Yep, the device provides 'only' 65k colors.
I will check them on the device as you suggested.
Cheers
Robert
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hi Erel,
Your second approach did the trick.
This works for both, desktop and PPC:

If pos > 3 And pos < 3.3 Then
If frmGalilean.GetPixel(px,py)=frmGalilean.GetPixel(x0,y0) Then
frmGalilean.Circle(px,py,1,cYellow ,F)
else
frmGalilean.Circle(px,py,1,cWhite,F)
end if
Else
frmGalilean.Circle(px,py,1,cWhite,F)
End If

Obviously, on the PPC, I must not use the color of a coordinate exactly onto which the circle is to be drawn. Don't ask me why :)

Anyway, thanks so much for your prompt attention.

Cheers
Robert
 
Top