Re: Rendering text with an outline

Dov Grobgeld schrieb:
> I cleaned up my example a bit and put it in GnomeLive. See:

Thanks for the example!
I'm just trying to port it to gtkmm. Unfortunately I
cannot find the corresponding C++ construct for the
"Pango.cairo_show_layout()" call in Dov's Vala code.
Would that be a pangocairo function? I could not find
C++ bindings for the pangocairo lib. Are there any?
However, I'm not sure if the code snippet below is
correct at all, I'm (unfortunately) new to Pango and

Thanks and best regards

OutlineLabel::on_expose(GdkEventExpose *event)
    Cairo::RefPtr<Cairo::ImageSurface> surface;
    Cairo::RefPtr<Cairo::Context> cr;
    Glib::RefPtr<Pango::Layout> layout;
    int width,height;

    layout = this->get_layout();
    width = -1; height = -1;

    surface = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, width, height);
    cr = Cairo::Context::create(surface);

    // in VALA: Pango.cairo_show_layout(cr,layout);
    // in C++?


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