[Drawkit] object origin
Graham Cox
graham.cox at bigpond.com
Wed Aug 13 21:27:40 PDT 2008
Assuming the objects are DKDrawableShapes, use -setOffset: This is a
value relative to the centre of the unit square of the origin. So to
place the origin at the left edge, vertically centred, pass {-0.5, 0}
cheers, Graham
On 14 Aug 2008, at 6:59 am, James Maxwell wrote:
> Hi All,
>
> I have a particular class of objects that really needs an origin
> which is *not* at its centre. In my case, I'd like it to be along
> the left edge. How do I do that? I've hacked in a couple of
> attempts, but like most hackish things, they break under certain
> conditions. I tried offsetting the bounds at creation, but of course
> this fails the sanity check. I'm sure there's an official way of
> doing this, but I can't seem to find it.
>
> thanks,
>
> J.
> _______________________________________________
> Drawkit mailing list
> Drawkit at lists.apptree.net
> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net
More information about the Drawkit
mailing list