Re: gdtk_draw_text deprecated , what use instead of it ?



Paul Pogonyshev wrote:

iain wrote:
On Tue, 2003-12-30 at 23:31 +0000, Paul Pogonyshev wrote:
while
gives absolutely no advantages over gdk_draw_text() (because labels are
guaranteed to be in ascii and short).
Apart from being antialiased and use decent fonts you mean.

Not speaking as a GTK developer I don't think the gdk_draw_text stuff is
coming back.

gdk_draw_text() is not antialiased?  I'm taking my comment back.

But seriously, don't you think layouts are too complicated and overkill
for some problems to make them mandatory?  Maybe there should be a
light-weight gdk_draw_<something-else>() which would be antialiased
and use Pango fonts, but more like gdk_draw_text() in respect of
position parameters?
Looks like you dont know about gdk_draw_layout() function:
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Drawing-Primitives.html#gdk-draw-layout
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Drawing-Primitives.html#gdk-draw-layout-with-colors

Layouts usage in G?K (in the way of just displaying some text with selected font) is as easy as old scheme. If you dont need extra functionality that layouts give - dont use it, if you want use it but dont want to learn some docs and code - use Pango Markup:
http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html

When performance issues becomes a problem for the specific application you should consider to use platform-depended low-level text drawing functions because they're fastest and you have a full control on what is going on. If you want to have portable and fine-looking application - you forced to use pango stuff. How, for example, you'll explain the windows-user what XLFD is (you have to use XLFD for font-handling for gdk_draw_text) ?

   Olexiy




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