On 8/10/07, Matthew Allum <mallum@gmail.com> wrote:
> On 8/9/07, Emmanuele Bassi <ebassi@o-hand.com> wrote:
> >
> > not at the moment, but it's a feature planned for 0.6.
> >
>
> Yep, also see http://bugzilla.o-hand.com/show_bug.cgi?id=444 . Any
> input on how the API should appreciated.
>
My suggestion about relative units is to implement something similar
to the described in The Kaa's Project [1], ie:
Object.width - integer or string: A value representing the width of
the object. Width can be a fixed (integer) size (in pixels), or a
relative (percentage) size. Percentage values (e.g. "75%") are
relative to the object's container. Width may also be auto, which
means that the width is the object's natural width (such as, for
example, an image's native width). e.g. 100, or "50%". Default: auto.
Methods: set_width, get_width, resize.
And the main feature for me:
Image.aspect - preserve, ignore or floating point value: Controls the
behavior of resizing. If preserve, either the image's width or its
height can be specified, and the other dimension will be automatically
computed from the image's original aspect ratio. If ignore, the both
the width and height properties are used in determining the image's
size. If a floating point value is given, behaves as preserve except
instead of using the image's native aspect ratio, it uses the one
specified. Default: preserve. Methods: set_aspect, get_aspect
What's your opinion about?
[1] http://projects.sault.org/mebox/canvas/
Cheers,
André
-- To unsubscribe send a mail to clutter+unsubscribe@o-hand.comReceived on Thu, 16 Aug 2007 16:18:33 -0300
This archive was generated by hypermail 2.1.8 : Thu Aug 16 2007 - 16:00:06 EDT