[Gambas-user] Drawing Area Issues
Benoit Minisini
gambas at ...1...
Sun Jan 22 22:34:37 CET 2006
On Sunday 22 January 2006 22:21, Christopher Brian Jack wrote:
> I believe I have discoverd an off-by-one problem with the DrawingArea
> control.
>
> It's easy enough to reproduce:
>
> 1. Create a form with a DrawingArea control 640x480 pixels
> 2. In the form create a private picture variable
> 3. In the form startup
> a) instantiate the picture variable with a 640x480 image
> b) draw some thin lines
>
> Draw.Begin(thePicture)
> Draw.LineWidth=1
> Draw.ForeColor=&H000000&
> Draw.FillColor=&H000000&
> Draw.FillStyle=Fill.solid
> Draw.Rect(0,0,640,480)
> Draw.FillStyle=Fill.none
> Draw.ForeColor=&Hffff00&
> Draw.Rect(0,0,640,480)
> Draw.End
>
> 4. Draw the image in the DrawingArea it will not show the extreme right
> and lower edges.
>
> Draw.Begin(theDrawingArea)
> ' Rectangle has no right or bottom edges
> Draw.Picture(thePicture,0,0,0,0,640,480)
> ' Rectangle will show right+bottom but left and top are gone
> Draw.Picture(thePicture,0,0,1,1,640,480)
> Draw.End
>
> Workaround:
>
> * Make the DrawingArea exactly 1 pixel wider and 1 pixel higher.
>
Did you set the border of the drawing area to None ?
--
Benoit Minisini
More information about the User
mailing list