Re: [gtkmm] Text in DrawingArea



On Wed, Mar 31, 2004 at 06:00:25PM -0500, christophe barbe wrote:
> I would like to draw non-proportionnal text in a DrawingArea.
> I started with the "Drawing Text" example from the online gtkmm book.
>    http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch14s06.html
> 
> I can set the font by adding the following two lines at the beginning of
> the expose event code:
>    Pango::FontDescription fontDesc("Courier 12");
>    modify_font(fontDesc);
> But when I do that the expose event keeps being triggered. What is
> wrong?

For this problem, I figured that setting the font in the Drawing Area
contructor did not cause the repetition of the expose event. But then it
means that I can only use one font.

I guess my real problem is that I have no idea why it's ok in the
constructor and not ok in the expose event code.

Christophe 

-- 
Christophe Barbé <christophe barbe ufies org>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8  F67A 8F45 2F1E D72C B41E

As every cat owner knows, nobody owns a cat.
--Ellen Perry Berkeley



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