Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
path-cairo.h
Go to the documentation of this file.
1#ifndef PATH_CAIRO
2#define PATH_CAIRO
3
4
5#include <cairo.h>
6#include <2geom/line.h>
7#include <2geom/sbasis.h>
8#include <2geom/sbasis-2d.h>
9#include <2geom/d2.h>
10#include <2geom/piecewise.h>
11#include <2geom/path.h>
12#include <2geom/convex-hull.h>
13#include <vector>
14#include <string>
15
16typedef struct _cairo cairo_t;
17
18void cairo_curve(cairo_t *cr, Geom::Curve const &c);
19void cairo_rectangle(cairo_t *cr, Geom::Rect const &r);
21void cairo_path(cairo_t *cr, Geom::Path const &p);
22void cairo_path(cairo_t *cr, Geom::PathVector const &p);
23void cairo_path_stitches(cairo_t *cr, Geom::Path const &p);
25
28void cairo_d2_sb2d(cairo_t* cr, Geom::D2<Geom::SBasis2d> const &sb2, Geom::Point dir, double width);
29void cairo_sb2d(cairo_t* cr, Geom::SBasis2d const &sb2, Geom::Point dir, double width);
30
33
34
35void draw_line(cairo_t *cr, const Geom::Line& l, const Geom::Rect& r);
36void draw_line(cairo_t *cr, Geom::Point n, double d, Geom::Rect r);
38
40void draw_line_seg_with_arrow(cairo_t *cr, Geom::Point a, Geom::Point b, double dangle = 15*M_PI/180, double radius = 20);
41void draw_spot(cairo_t *cr, Geom::Point h);
43void draw_cross(cairo_t *cr, Geom::Point h);
44void draw_circ(cairo_t *cr, Geom::Point h);
45void draw_ray(cairo_t *cr, Geom::Point h, Geom::Point dir);
46void draw_ray(cairo_t *cr, const Geom::Ray& ray, const Geom::Rect& r);
47void draw_line_segment(cairo_t *cr, const Geom::LineSegment& ls, const Geom::Rect& r);
48
52
53// H in [0,360)
54// S, V, R, G, B in [0,1]
55void convertHSVtoRGB(const double H, const double S, const double V,
56 double& R, double& G, double& B);
57#endif
Path - a sequence of contiguous curves.
Convex hull based on the Andrew's monotone chain algorithm.
Abstract continuous curve on a plane defined on [0,1].
Definition curve.h:78
Adaptor that creates 2D functions from 1D ones.
Definition d2.h:55
Infinite line on a plane.
Definition line.h:53
Sequence of subpaths.
Definition pathvector.h:122
Sequence of contiguous curves, aka spline.
Definition path.h:353
Function defined as discrete pieces.
Definition piecewise.h:71
Two-dimensional point that doubles as a vector.
Definition point.h:66
Straight ray from a specific point to infinity.
Definition ray.h:53
Axis aligned, non-empty rectangle.
Definition rect.h:92
Convex hull data structures.
double c[8][4]
Lifts one dimensional objects into 2D.
Infinite straight line.
void cairo_rectangle(cairo_t *cr, Geom::Rect const &r)
void draw_spot(cairo_t *cr, Geom::Point h)
void cairo_line_to(cairo_t *cr, Geom::Point p1)
void cairo_d2_sb2d(cairo_t *cr, Geom::D2< Geom::SBasis2d > const &sb2, Geom::Point dir, double width)
void draw_cross(cairo_t *cr, Geom::Point h)
struct _cairo cairo_t
Definition path-cairo.h:16
void draw_line_segment(cairo_t *cr, const Geom::LineSegment &ls, const Geom::Rect &r)
void cairo_path(cairo_t *cr, Geom::Path const &p)
void cairo_curve(cairo_t *cr, Geom::Curve const &c)
void cairo_d2_pw_sb(cairo_t *cr, Geom::D2< Geom::Piecewise< Geom::SBasis > > const &p)
void draw_ray(cairo_t *cr, Geom::Point h, Geom::Point dir)
void draw_circ(cairo_t *cr, Geom::Point h)
void cairo_d2_sb_handles(cairo_t *cr, Geom::D2< Geom::SBasis > const &p)
void draw_handle(cairo_t *cr, Geom::Point h)
void cairo_convex_hull(cairo_t *cr, Geom::ConvexHull const &r)
void cairo_move_to(cairo_t *cr, Geom::Point p1)
void cairo_d2_sb(cairo_t *cr, Geom::D2< Geom::SBasis > const &p)
void draw_line(cairo_t *cr, const Geom::Line &l, const Geom::Rect &r)
void cairo_sb2d(cairo_t *cr, Geom::SBasis2d const &sb2, Geom::Point dir, double width)
void draw_line_seg_with_arrow(cairo_t *cr, Geom::Point a, Geom::Point b, double dangle=15 *M_PI/180, double radius=20)
void cairo_curve_to(cairo_t *cr, Geom::Point p1, Geom::Point p2, Geom::Point p3)
void cairo_pw_d2_sb(cairo_t *cr, Geom::Piecewise< Geom::D2< Geom::SBasis > > const &p)
void convertHSVtoRGB(const double H, const double S, const double V, double &R, double &G, double &B)
void draw_line_seg(cairo_t *cr, Geom::Point a, Geom::Point b)
void cairo_path_stitches(cairo_t *cr, Geom::Path const &p)
Piecewise function class.
Obsolete 2D SBasis function class.
Polynomial in symmetric power basis (S-basis)
double width