[Gambas-user] Fixed a minor mascot issue

Christopher Brian Jack brian at ...1334...
Thu Oct 19 19:55:14 CEST 2006


As the code states they are there to even the padding as the images have
some apparent spacing at the left and top sides so the pads are there to
balance it by putting some approximately equivalent padding at the right
and bottom sides by slightly enlarging the form.

Hardcoding isn't good but one line of source beats manually adding the
space to all the images in the GIMP.

On Thu, 19 Oct 2006, Benoit Minisini wrote:

> Date: Thu, 19 Oct 2006 19:30:14 +0200
> From: Benoit Minisini <gambas at ...1...>
> Reply-To: mailing list for gambas users
>     <gambas-user at lists.sourceforge.net>
> To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
> Subject: Re: [Gambas-user] Fixed a minor mascot issue
>
> On Thursday 19 October 2006 02:08, Christopher Brian Jack wrote:
> > This slightly modified _init in the IDE code shirnks the form (with a
> > slight constant of kludgery) to the size of the largest animation image.
> > On my Debian system the space is noticeable as the form won't allow itself
> > to be dragged past the screen edge.  Without the resize the mascot is a
> > good inch or so from the right edge of the screen at maximum right-drag
> > and ends up way over left of the scrollbar in the code window.  Shrinking
> > the from to the image size allows dragging much closer to the lower right
> > screen corner and getting him out of the code window.
> >
> > STATIC PUBLIC SUB _init()
> >
> >   DIM iInd AS Integer
> >   DIM maxW AS Integer
> >   DIM maxH AS Integer
> >
> >   $cAnim["Blink"] = "1,0,1,0"
> >   $cAnim["Blink2"] = "3,4,3,0"
> >   $cAnim["Depressive"] = "2,6,7,-8,6,2,0,-8"
> >   $cAnim["Happy"] = "5,0,5,0"
> >
> >   'Shrinks the form to match
> >   'the largest animation image
> >   maxW = 0
> >   maxH = 0
> >   FOR iInd = 0 TO 7
> >     $hPict[iInd] = Picture["img/anim/gambas" & CStr(iInd + 1) & ".png"]
> >     maxH = Max(maxH, $hPict[iInd].Height)
> >     maxW = Max(maxW, $hPict[iInd].Width)
> >   NEXT
> >   'The +11,+3 is a kludge to even the padding
> >   'of the Form versus the background image,
> >   'tested by dragging to the four corners of
> >   'the screen and adjusting the numbers to
> >   'even the spacing to the edges on all
> >   'screen corners.
> >   ME.Resize(maxW + 11, maxH + 3)
> >
> > END
> >
> >
>
> Thanks. But I don't understand the need of adding 11 and 3. Hardcoded values
> like this are rarely a good idea...
>
> --
> Benoit Minisini
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

.=================================================.
|  Christopher BRIAN Jack aka "Gau of the Veldt"  |
+================================================='
| oevna at ...1544...
`=================================================-
Hi Spambots, my email address is sputnik at ...1334...
Hi Humans, my email address uses rot13 cipher





More information about the User mailing list