Forum > GTK

TextOut is based on gdk_draw_layout_with_colors


GTK2 TextOut/ExtTextOut is based on TGtkDeviceContext.DrawTextWithColors
which is based on API

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---gdk_draw_layout_with_colors(drawable, GC, X, Y, AFont^.GDIFontObject, FGColor, BGColor);          

I made the timings for my app and see that _many_ calls of gdk_draw_layout_with_colors are slow. (This is the case for ATSynEdit when text lines have many 'tokens').

Anybody tried to change to different GTK2 API? What I see by Lazarus auto-completion:

gdk2_draw_text (edited: this is deprecated since gtk 2.4)
gdk2_draw_text_wc (edited: this is deprecated since gtk 2.4)

Are they slow too? What if one of them is 10x faster? I cannot measure it because I don't know how to call them properly.


[0] Message Index

Go to full version