[Gtk-sharp-list] Drawing bounded text

Aaron Oxford aaron at hardwarehookups.com.au
Sun Mar 18 17:16:48 EDT 2007


Hi again. First up sorry to anyone who hasn't heard back from me yet, 
I haven't received a digest since joining the list and I'm too scared 
to change off digest mode in case I lose all the mail until now. Weird.

Now I've another question stemming from trying to do something I 
thought would be simple. :-)

I can't seem to find any way of drawing text and keeping it inside 
set bounds. Again the docs in this area are sparse, and the interface 
confusing. A Layout has a width but not a height, for example. The 
docs say that Pango does more but doesn't give any details.

I've messed around myself: DrawLayoutLine seems to fail in some cases 
or it draws text in the wrong place  - this is presumably due to 
internal coordinate translation (or lack thereof). Also, changing the 
ClipRectangle of a GC seems to cause crazy problems if you try to 
change it back again during the same drawing cycle.

Any ideas?

And one last question, should I be drawing allocated or unallocated 
colours? I don't know about colourmaps or when I might have or not 
have one - some Linux environments have them don't they?

Thanks again,

Aaron.
---------------------------------------------------------------------------------
Aaron Oxford   -   aaron+hardwarehookups .com .au
Director, Innovative Computer Solutions (Aust) Pty. Ltd.
49 Maitland Rd, Mayfield, NSW 2304 Australia
http://www.ic-solutions.com.au
Developer, SourceForge project VioLet Composer
http://sourceforge.net/projects/buzz-like



More information about the Gtk-sharp-list mailing list