Re: Hacktext availability

On Wed, 2005-03-02 at 19:48 -0400, Thomas J. Duck wrote:
> Hash: SHA1
> Dear Owen,
> > Sorry if my responses here sound abrupt, I just don't have a lot of time
> > to give detailed tutorials at the moment.
>      No worries.  I can certainly understand time constraints.
>      I think that maybe we are talking about two different things.  I
> create text on the Gnome Canvas using
>   item = gnome_canvas_item_new (group,
> 				"markup",markup,
> 				"font-desc",description,
> 				"fill-color-rgba",dev->color,
> 				"x",0.,
> 				"y",0.,
> 				NULL);
> and then request a magnification with
>   gnome_canvas_set_pixels_per_unit(canvas,magnification);
> One would expect the text to increase in size by the magnification (as is
> the behaviour of gnome-print's Hacktext), but it doesn't.  I suppose that
> I could scale pango text manually, but that isn't consistent with what is
> expected on the Gnome Canvas.

I can't comment on how the canvas is using Pango... I've never looked at
the code.

>      I have read the documentation that you suggested on
> pango_context_set_matrix (), but can't understand how I would use this
> information to fix the bounding box problem under rotations.  The code
> snippet that I provided before rotates the text, but it is clipped by
> an unrotated bounding box.  I have read the docs extensively, but there is
> not enough information for me to understand why this is happening or
> to change the behaviour.  I (and the plplot authors) would be very
> grateful if you could point out how it is done.  The Hacktext api is not
> public, and we would very much like to move to pango instead.

Again, that presumably is a function of how the GNOME canvas is working.
All I can say is that Pango provides the right bounding box, in user
space coordinates, when called. The text item would be responsible for
translating that into device space and passing it up to the GNOME
canvas to do clipping.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]