[Gambas-user] Re ctangle Problem

Benoît Minisini gambas at ...1...
Sat Aug 6 13:36:10 CEST 2011


> Hello. I seem to have reached difficult problem.
> How do I draw a filled rectangle that woks in XOR mode.
> i.e does not overwrite the pixels below, but inverts them
> 
> Following code does not seem to work
> 
>      Paint.Begin(DrawingArea1)
>      Paint.Operator = Paint.OperatorXor
>      Paint.Brush = Paint.Color(Color.Red)
>      Paint.Rectangle(0, 0, 100, 100)
>      Paint.Stroke
> 
> I have some VB6 code using
> Drawmode = vbXorPen
> I need it to be converted to gambas
> Any help???? Thanks.

Paint.OperatorXor is not the bitwise Xor operator you want. The Paint class 
does not support such an operator. You can use the old Draw class for that.

Regards,

-- 
Benoît Minisini




More information about the User mailing list