[Gambas-user] Is it a bug or a "feature"?

Benoît Minisini gambas at ...1...
Mon Sep 14 22:13:21 CEST 2009


> On Monday 14 September 2009 21:59:06 Benoît Minisini wrote:
> > Sorry, my joke didn't work! :-/
> >
> > I meant that AFAIK, Draw.Ellipse() didn't change at all since the
> > beginning. It always took the coordinates of the rectangle surrounding
> > it.
> 
> Benoit,
> I cannot believe in that because I have upgraded my version 2 days ago
> and my screen shows a different picture running the same code.

Look in the 2.7 source code, in the main/lib/draw.c file. You will see that 
Draw.Ellipse works the same way as in the current version.

> Also in the Gambas book of J.W.Rittinghouse (which is not perfect) I can
>  read about Draw.Ellipse( arg1, arg2, arg3, arg4) where arg1 and arg2 are
>  coordinates of a center but arg3 and arg4 are to set the horizontal and
>  vertical width. And this is logical. If one wants to draw several ellipses
>  changing their size around the same center he/she can change only arg3 and
>  arg4. But as it is implemented now the arguments would look like:
> 
> Draw.Ellipse( X_centre-X_width/2, Y_centre-Y_width/2, X_width, Y_width)
> 
> Which looks very artificial. For me however important is to know whether
> this convention will be kept unchanged in the future and I think it should
>  be documented as it is not intuitive.

I cannot really change that, as it is actually the underlying toolkits that 
work that way. And I find it no more or less logical that your view. It is 
just a different logic.

> 
> On the other subject... Some time ago I wrote to you about the ValueBox
> and "scientifick notation" for numbers. I have found that even at present
> it is possible to show values in this notation (it is automatically used)
>  if the value is very-very small or too big. Like 1.0E-30. This makes it
>  even more illogical that such a number, which can be displayed if supplied
>  in the code, and so is absolutely legitimate, cannot be entered by the
>  user. This is an argument against making another special
>  ValueBoxScientifick but rather for changing the existing control. Though
>  of course It is always possible to use a TextBox and to program the
>  necessary checks and transformations. 

Yes, ValueBox is a bit of mess and needs some love. But I have other things to 
do at the moment before deeping into it.

Regards,

-- 
Benoît Minisini




More information about the User mailing list