Question

Can give me someone an idea how I can switch of the antialiasing for all items in a goocanvasmm?

I tried to get the root item model but this did not contain the antialiasing property.

I could not really find any valid documentation for goocanvasmm. I really need a tutorial but I can't find some.

[edit] Sorry, I need the code for goocanvasmm!!! not goocanvas. So please do not edit this again. Yes, it is the c++ version of gtk+ called gtkmm and the goocanvasmm

[edit] I have now a rect in the canvas and I could get the rect->property_antialias()=???? but now i struggled with PropertyProxy.

the following both lines will not work: 1)

rect->property_antialias()=CAIRO_ANTIALIAS_NONE ;

no match for »operator=« (operand types are »Glib::PropertyProxy« and »_cairo_antialias«)

2)

rect->property_antialias()=ANTIALIAS_NONE ;

error: 'ANTIALIAS_NONE' was not declared in this scope

Thanks!

Was it helpful?

Solution

GooCanvaItemSimple is the base class for most items. It has an antialias property which is of a type that maps to cairo_antialias_t.

This is for the C version, not C++, but it should be easy to map to the 'mm' versions of the docs. Here's the equivalent for antialias in goocanvasmm.

When you don't know where a property is, just dig in the parent classes or interfaces implemented until you find it.

Then, set the value of the appropriate Cairo::Antialias type (which is a type defined in cairomm).

rect->property_antialias() = Cairo::ANTIALIAS_NONE;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top