[Gambas-user] Drawing Area Issues
Christopher Brian Jack
brian at ...1334...
Sun Jan 22 22:40:45 CET 2006
On Sun, 22 Jan 2006, Benoit Minisini wrote:
> Date: Sun, 22 Jan 2006 22:34:37 +0100
> From: Benoit Minisini <gambas at ...1...>
> Reply-To: gambas-user at lists.sourceforge.net
> To: gambas-user at lists.sourceforge.net
> Subject: Re: [Gambas-user] Drawing Area Issues
>
> 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
It is a borderless DrawingArea (ie: the border property is set to FALSE)
==================================================
Christopher BRIAN Jack aka "Gau of the Veldt"
==================================================
brian at ...1334...
brian at ...1335...
brian at ...1336...
brian at ...1337...
gau_veldt at ...67...
==================================================
-- Hi Spambots, my email address is sputnik at ...1334...
More information about the User
mailing list