[CpmlPath] Implemented cpml_path_to_cairo() exit point
[adg.git] / cpml / cpml-path.h
blob586bab89a620eb1b4b6abad0bd71edbbc8a7f938
1 /* CPML - Cairo Path Manipulation Library
2 * Copyright (C) 2008, Nicola Fontana <ntd at entidi.it>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef __CPML_PATH_H__
21 #define __CPML_PATH_H__
23 #include <cpml/cpml-pair.h>
25 #define CPML_LAST 0
26 #define CPML_FIRST 1
29 CAIRO_BEGIN_DECLS
32 typedef struct _CpmlPath CpmlPath;
34 struct _CpmlPath {
35 cairo_path_t cairo_path;
36 CpmlPair org;
40 cairo_bool_t cpml_path_from_cairo (CpmlPath *path,
41 const cairo_path_t *src,
42 cairo_t *cr);
43 cairo_bool_t cpml_path_from_cairo_explicit (CpmlPath *path,
44 const cairo_path_t *src,
45 const CpmlPair *org);
46 void cpml_path_to_cairo (const CpmlPath *path,
47 cairo_t *cr);
48 CpmlPath * cpml_path_copy (CpmlPath *path,
49 const CpmlPath *src);
50 cairo_bool_t cpml_path_dump (CpmlPath *path);
51 cairo_bool_t cpml_segment_from_path (CpmlPath *segment,
52 const CpmlPath *path,
53 int index);
54 cairo_bool_t cpml_segment_reverse (CpmlPath *path,
55 const CpmlPath *src);
56 cairo_bool_t cpml_primitive_from_path (CpmlPath *primitive,
57 const CpmlPath *path,
58 int index);
59 cairo_bool_t cpml_primitive_get_pair (const CpmlPath *primitive,
60 CpmlPair *pair,
61 int index);
62 cairo_bool_t cpml_primitive_set_pair (CpmlPath *primitive,
63 const CpmlPair *pair,
64 int index);
65 cairo_bool_t cpml_primitive_get_point (const CpmlPath *primitive,
66 CpmlPair *point,
67 double pos);
68 cairo_bool_t cpml_primitive_reverse (CpmlPath *primitive);
70 CAIRO_END_DECLS
73 #endif /* __CPML_PATH_H__ */