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

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


Am 27.09.2018 um 16:11 schrieb Fabien Bodard:
> You need to use stroke insteed of fill

Aaaaah, ok, thanks so much!


> 
> If you need to have a border with filld rect
> 
> First use the fill (true)
> Then change brush
> And finish with stroke

Change brush? Wouldn't setting the colors do?

Rolf

> 
> This will draw the back and then the border
> Le jeu. 27 sept. 2018 15:45, Rolf-Werner Eilert <rwe-sse at osnanet.de 
> <mailto:rwe-sse at osnanet.de>> a écrit :
> 
>     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
> 
>     ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
> 
> 
> 
> 
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
> 



More information about the User mailing list