10void region_to_path(Cairo::RefPtr<Cairo::Context>
const &cr, Cairo::RefPtr<Cairo::Region>
const ®)
12 for (
int i = 0; i < reg->get_num_rectangles(); i++) {
13 auto rect = reg->get_rectangle(i);
14 cr->rectangle(rect.x, rect.y, rect.width, rect.height);
18Cairo::RefPtr<Cairo::Region>
shrink_region(Cairo::RefPtr<Cairo::Region>
const ®,
int d,
int t)
24 auto reg2 = Cairo::Region::create(rect);
28 auto reg3 = Cairo::Region::create();
29 for (
int i = 0; i < reg2->get_num_rectangles(); i++) {
30 auto rect = reg2->get_rectangle(i);
39 reg2 = Cairo::Region::create(rect);
double stealOpacity()
Get the opacity, and remove it from this color.
Specific geometry functions for Inkscape, not provided my lib2geom.
auto expandedBy(Geom::IntRect rect, int amount)
Color make_contrasted_color(Color const &orig, double amount)
Make a darker or lighter version of the color, useful for making checkerboards.
Helper class to stream background task notifications as a series of messages.
Cairo::RectangleInt geom_to_cairo(const Geom::IntRect &rect)
Geom::IntRect cairo_to_geom(const Cairo::RectangleInt &rect)