Re: [gtkmm] Custom drawing area and text layout



On Son, 2004-02-22 at 23:44 +0000, Marcus Hanwell wrote:
> Another problem encountered and I can't seem to find the answer to this 
> one anywhere. How can I rotate a line of text? I want to label the 
> y-axis 'Pressure (mN.m^-2)' and can't seem to find a way to do it. Just 
> a standard graph axis label along the y-axis.
> 

Due to the limitations of X there is no standart way provided. You can
only do it "by hand". Render the text to an offscreen pixmap, rotate the
pixmap and then render it to the main window.


> Still not finding it that easy to get to grips with the Pango stuff - 
> are layouts the best things to be working with when I am only drawing at 
> most 10 characters to my drawing area? Should I be using something else?
> 

For drawing text on drawingareas there is no other way.

> Are there any good tutorials out there?

I didn't found any. So i learned it the hard way, with the reference and
trial and error. On differnt mailinglists i read that pango isn't for
the app-developer and for the ones who build widgets the reference is
enought ;-)

>  Or may be a really well 
> commented application/code snippet that demonstrates Pangomm?

Not well documented but may be a start; look at the code of the
gtklabel. There you'll find some different pango techniques.

cheers
detlef





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