Hi Werner,

On Mon, Mar 3, 2014 at 2:25 AM, Werner <[email protected]> wrote:

> I have e.g. something like this in a wine rack and would like to have
> options to align left/right/center of the objects within the group.
>



> ...
> Here I would want to align the four square/rectangles, is there a nice way
> of doing this or do I have to find the left/right or center position and
> then move each of them manually?
>

You would need to  do it manually, as you suggest -- but It would be fairly
easy to use the object's BoungingBox to the the values you need.

It may make sense to have something like this bilt-in, but I"m not sure at
the the moment what an good API would be -- maybe something like:

DrawObject.Align(point, pos='cc')
  and then have pos be the same alignment strings used for text boxes and
bitmaps?

That method could probably be added to the DrawObject base class, and if it
used the bounding box and Move method, would work for everything.

-CHB




>  Werner
>
> _______________________________________________
> FloatCanvas mailing list
> [email protected]
> http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
>
>


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[email protected]
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to