/*
7 * Krzysztof KosiĆski <tweenk.pl@gmail.com>
9 * Copyright (C) 2011 Authors
10 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
13#ifndef SEEN_INKSCAPE_DISPLAY_DRAWING_CONTEXT_H
14#define SEEN_INKSCAPE_DISPLAY_DRAWING_CONTEXT_H
18#include <boost/noncopyable.hpp>
54 void translate(
double dx,
double dy) { cairo_translate(
_ct, dx, dy); }
56 void scale(
double sx,
double sy) { cairo_scale(
_ct, sx, sy); }
77 cairo_rel_line_to (
_ct, r.
width(), 0 );
79 cairo_close_path (
_ct);
84 cairo_rel_line_to (
_ct, r.
width(), 0 );
86 cairo_close_path (
_ct);
92 void paint(
double alpha = 1.0);
112 void setSource(
double r,
double g,
double b,
double a = 1.0) {
119 cairo_pattern_set_filter(cairo_get_source(
_ct), filter);
3x3 matrix representing an affine transformation.
Directed angular interval.
Axis aligned, non-empty, generic rectangle.
C top() const
Return top coordinate of the rectangle (+Y is downwards).
C left() const
Return leftmost coordinate of the rectangle (+X is to the right).
C height() const
Get the vertical extent of the rectangle.
C width() const
Get the horizontal extent of the rectangle.
Two-dimensional point that doubles as a vector.
Axis aligned, non-empty rectangle.
RAII idiom for saving the state of DrawingContext.
Minimal wrapper over Cairo.
void arc(Geom::Point const ¢er, double radius, Geom::AngleInterval const &angle)
DrawingContext(cairo_t *ct, DrawingSurface *surface, bool destroy)
void setLineCap(cairo_line_cap_t cap)
void path(Geom::PathVector const &pv)
Geom::Rect targetLogicalBounds() const
void setSource(cairo_pattern_t *source)
DrawingSurface * _surface
cairo_surface_t * rawTarget()
void scale(Geom::Scale const &s)
void transform(Geom::Affine const &trans)
void setTolerance(double tol)
void device_to_user_distance(double &dx, double &dy)
DrawingSurface * surface()
void scale(double sx, double sy)
void paint(double alpha=1.0)
void revrectangle(Geom::Rect const &r)
void rectangle(Geom::Rect const &r)
void curveTo(Geom::Point const &p1, Geom::Point const &p2, Geom::Point const &p3)
void setOperator(cairo_operator_t op)
void patternSetExtend(cairo_extend_t extend)
void translate(double dx, double dy)
void setSource(cairo_surface_t *surface, double x, double y)
void setFillRule(cairo_fill_rule_t rule)
void lineTo(Geom::Point const &p)
void moveTo(Geom::Point const &p)
void translate(Geom::Point const &t)
void setLineWidth(double w)
void revrectangle(Geom::IntRect const &r)
void setMiterLimit(double miter)
void rectangle(Geom::IntRect const &r)
cairo_operator_t getOperator()
void setSource(double r, double g, double b, double a=1.0)
void patternSetFilter(cairo_filter_t filter)
void user_to_device_distance(double &dx, double &dy)
void setLineJoin(cairo_line_join_t join)
Drawing surface that remembers its origin.
_cairo_pattern cairo_pattern_t
struct _cairo_surface cairo_surface_t
Helper class to stream background task notifications as a series of messages.
static Glib::ustring join(std::vector< Glib::ustring > const &accels, char const separator)
void cairo_rectangle(cairo_t *cr, Geom::Rect const &r)
void cairo_line_to(cairo_t *cr, Geom::Point p1)
void cairo_move_to(cairo_t *cr, Geom::Point p1)
void cairo_curve_to(cairo_t *cr, Geom::Point p1, Geom::Point p2, Geom::Point p3)
void cairo_set_source_rgba(cairo_t *cr, colour c)