|Subject:||Re: about contibuting to octave|
|Date:||Fri, 13 Mar 2009 18:27:17 +0800|
On Thu, Mar 12, 2009 at 9:47 AM, xianghang liu <address@hidden> wrote:There exist already some code to convert from different "units".
> I guess some futher transformations, such as translation, rotation and scale
> transformation might be needed. Because we need to transform it to the
> coordinate system of the figure. I used the following script in matlab:
>>h = text(pi,0,'
>>ext = get(h,'extent');
> I would like to do some experiments of coordinate transformation and try to
> solve this problem.
See for instance the convert_position function in graphics.cc used
to convert position rectangles between various possible "units".
Some extension is needed to be able to handle single point instead
of rectangle and also to support data "units". However, the axes object
provides an easy access to the current transformation matrix, so it
shouldn't be that hsard.
My point is that you shouldn't care about transformation at the moment,
but focus on code that can produce an extent in pixel coordinate.
Transforming it to the correct "units" will be handled somewhere else.
|[Prev in Thread]||Current Thread||[Next in Thread]|