Re: Hacktext availability
- From: "Thomas J. Duck" <tomduck fizz phys dal ca>
- To: Jody Goldberg <jody gnome org>
- Cc: gnome-print-list gnome org
- Subject: Re: Hacktext availability
- Date: Wed, 2 Mar 2005 15:01:54 -0400 (AST)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Jody,
On Fri, 25 Feb 2005, Jody Goldberg wrote:
> There are two simple approaches.
> 1) Use the existing affine support in gnomecanvas to rotate the
> text. It's not perfect but it works.
> 2) Use the new pango-1.8 level apis
> pango_context_get_matrix (context);
> pango_matrix_rotate (&rotmat, rv->rotation);
> pango_context_set_matrix (context, &rotmat);
> in gnomecanvas.
I have implemented each of these approaches, and there continue to be
important problems with pango on the Gnome Canvas. So, I am leaning
toward copying your Hacktext code into plplot. Don't get me wrong: I
would be happy to move to pango, but as far as I can tell it cannot do
what your Hacktext already does.
For example, a shortcoming of pango on the Gnome Canvas is that it
does not scale under a zoom. Also, shear transformations aren't
implemented in the pango api. Hacktext scales and shears very nicely. On
the other hand, Hacktext can't process markup text like pango, and that
would be a very nice feature to have. Please correct me if these
understandings are wrong.
Rotations with pango on Gnome Canvas continue to be troublesome, but
Hacktext rotates nicely. Using pango, I can get the glyphs to rotate, but
the text is clipped according to some unrotated bounding box. Argh! Here
is my code snippet for rotations under pango:
context = pango_layout_get_context(GNOME_CANVAS_TEXT(item)->layout);
matrix = PANGO_MATRIX_INIT;
pango_matrix_rotate(&matrix,90.);
pango_context_set_matrix(context,&matrix);
pango_layout_context_changed(GNOME_CANVAS_TEXT(item)->layout);
Reading the available documentation and lots of raw code hasn't shed any
light on a solution to the clipping problem. Any ideas?
BTW, I am surprised that pango isn't using libart for the matrix
calculations, considering that this is a Gnome project. Needless
complication, no?
I appreciate your help with this, and I am sure others will too if we
can resolve the text transformation problem.
Sincerely,
Tom
- --
Thomas J. Duck <tomduck fizz phys dal ca>
Department of Physics and Atmospheric Science, Dalhousie University,
Halifax, Nova Scotia, Canada, B3H 3J5.
Tel: (902)494-1456 | Fax: (902)494-5191 | Lab: (902)494-3813
Web: http://aolab.phys.dal.ca/~tomduck/
Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x17D965DB
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFCJg2lndxDHhfZZdsRAmkEAKCK6Gxz9s5myR6zuVRc/ZU8GYRXdwCfdG9E
UkBYrg32Qc+TdwG9IlVEL4Y=
=Fftj
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]