[Gambas-user] Problem with Paint.Rectangle() and docu

Rolf-Werner Eilert rwe-sse at osnanet.de
Thu Sep 27 15:44:13 CEST 2018


In the documentation to Paint.Rectangle there is

This function is logically equivalent to:
Paint.MoveTo(X, Y)
Paint.LineTo(X + Width, Y)
Paint.LineTo(X + Width, Y + Height)
Paint.LineTo(X, Y + Height)
Paint.ClosePath()

The thing is, Paint.Rectangle will always fill the area, and I simply 
need a box (unfilled).

The example from the documentation will not produce 4 lines and an empty 
space, but a filled rectangle as well.

By the way, it does NOT play a roll if you use ClosePath or not. But if 
you forget Fill, there comes an error with Pending Path. So the example 
is a bit misleading here.

And does Rectangle really have to produce a filled area? Is there no way 
to have a simple line drawn around?

Regards
Rolf


More information about the User mailing list