Layout placement



Hi. First of all, sorry for my English.

I am using GtkPrint and Cairo to draw SVG elements on a Cairo.Context. I
am not sure if this is the best way to do what I want, but that's a
different business.

A text element (SVG) coordinates are given according this "picture" (the
asterisk is the "location point"):

  TTTTTTT EEEEEE SSSSSSS TTTTTTT
     T    E      S          T
     T    EEE    SSSSSSS    T
     T    E            S    T
     T    EEEEEE SSSSSSS    T
*

With Pango, unlike SVG, coordinates seems to be given this way:

*
  TTTTTTT EEEEEE SSSSSSS TTTTTTT
     T    E      S          T
     T    EEE    SSSSSSS    T
     T    E            S    T
     T    EEEEEE SSSSSSS    T

When I translate SVG coordinates to Pango ones, I subtract height of the
Layout, but when dealing with text of different sizes this doesn't work
correctly. Text is not well located.

Is there a method to move the "location point" (let's say) of Layout?

Thank you very much. I hope to be understood.

-- 
Milton Pividori
Blog: http://www.miltonpividori.com.ar
Jabber ID: milton pividori jabberes org
GnuPG Public Key: gpg --keyserver wwwkeys.pgp.net --recv-key 0x663C185C



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