Re: writing a text widget with pango
- From: Martyn Plummer <plummer iarc fr>
- To: Havoc Pennington <hp redhat com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: writing a text widget with pango
- Date: Thu, 23 May 2002 17:06:13 +0200 (CEST)
On 23-May-2002 Havoc Pennington wrote:
Martyn Plummer <plummer iarc fr> writes:
This would be most welcome. I maintain the GNOME GUI for the R project
(a language for data analysis and graphics http://www.r-project.org ).
Part of the GUI is a graphics device using the GTK+ API, which can be
used to plot graphs. I want to do simple things like draw axis labels,
titles for graphs, and so on, on a GtkDrawable. The absence of a simple
draw-string API in GTK+ 2.0 has made this rather more difficult, so
please seriously consider bringing it back.
See, now you're discouraging us though. ;-) There's no reason graph
titles should have broken i18n just to save 5 lines of code... there's
little extra complexity to get that simple case right.
Let me try and re-encourage you then! I suggest you try the graphics
demo of R to see the sort of things it can do
You can get an RPM (signed by me) from
ftp://calvin.iarc.fr/pub/R/RedHat/7.x/i386/R-base-1.5.0-2.i386.rpm
Type "R" to start R, "q()" to quit. To see the graphics demo type
"demo(graphics)" at the R prompt.
R does its own layout when plotting graphics. I don't
need a high-level layout engine. I do need a low-level function that
answers the question "I want to plot this text string, in this font,
what are its extents?" In gtk+ 1.2 this was easy, since gdk was just
a wrapper around Xlib. In gtk+ 2.0 the low level functions I needed
are deprecated, and I'm trying not to use them. This simple question
no longer has a simple answer, apparently. If I can do it in five
lines of code then excuse me while I break down and weep, but I
couldn't piece this together from the documentation. Eventually
I adapted the code from gdk_text_extents() in the linux-fb port of
gdk, This works, except plotting of mathematical formulae is broken.
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]