1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
* Fix the intersection problem, (see reference to Hobby's paper
mentioned in cairo_traps.c)
* Implement support for programmatic patterns
* Implement cairo_text_extents, cairo_glyph_extents, cairo_text_path,
cairo_glyph_path, and cairo_stroke_path, cairo_arc_to.
* Add a few new, needed functions?
cairo_flush
cairo_erase
cairo_mark_dirty
* Verification, profiling, optimization.
* Re-implement the trapezoid rasterization algorithm according to the
new "specification".
A comparison with PostScript
============================
Here's a list of several classes of PostScript operators indicating
which operators have rough equivalents in Cairo and which do not. In
general, the name of a Cairo function corresponding to a PostScript
operator can be obtained by inserting a '_' between each word and
prefixing it with "cairo_". For example, "cairo_move_to" corresponds
to the PostScript "moveto".
In cases where the name of the Cairo function deviates from this
convention, or when the behavior of the Cairo function is
significantly different, the change is noted in parentheses below.
This list is not exhaustive, (there are definitely some minor (major?)
semantic deviations that are not noted below). Also, this list is
almost certainly out of date with respect to the current Cairo
implementation. Caveat lector.
Oerators that are not yet in Cairo, but probably should be: arcto,
strokepath, rectclip?, clipsave/restore?, setstrokeadjust?,
currentdash, grestoreall?, initgraphics?, currentgstate?, setgstate?,
erasepage?, setsmoothness?
Painting operators
------------------
in Cairo: stroke, fill, eofill (set_fill_rule/fill), image
(show_surface)
not in Cairo: erasepage, rectstroke, rectfill, shfill, colorimage,
imagemask
Path construction operators
---------------------------
in Cairo: arc, arcn (arc_negative), newpath, moveto, rmoveto
(rel_move_to), lineto, rlineto (rel_line_to), curveto, rcurveto
(rel_curve_to), closepath, currentpoint, charpath (text_path)
not in Cairo: arct, arcto, flattenpath, reversepath, strokepath,
clippath, pathbbox, pathforall
Clipping
--------
in Cairo: clip, eoclip (set_fill_rule/clip)
not in Cairo: initclip, rectclip, clipsave, cliprestore
Graphics state operators
------------------------
in Cairo: setlinewidth, currentlinewidth, setlinecap, currentlinecap,
setlinejoin, currentlinejoin, setmiterlimit, currentmiterlimit,
setdash
not in Cairo: setstrokeadjust, currentstrokeadjust, currentdash
Color specification operators
-----------------------------
in Cairo: setrgbcolor, currentcolor
not in Cairo: setcolor, setgray, currentgray, currentrgbcolor,
sethsbcolor, currenthsbcolor, setcmykcolor, currentcmykcolor,
setcolorspace, currentcolorspace
Form and pattern operators
--------------------------
in Cairo: setpattern, makepattern (lock_pattern)
not in Cairo: execform
Whole-state manipulation
------------------------
in Cairo: gsave (save), grestore (restore)
not in Cairo: grestoreall, initgraphics, gstate, currentgstate,
setgstate
Coordinate system and matrix operators
--------------------------------------
in Cairo: identmatrix (identity_matrix), initmatrix (default_matrix),
setmatrix, translate, scale, rotate, concatmatrix, currentmatrix,
transform (transform_point), dtransform (transform_distance)
not in Cairo: matrix, defaultmatrix, concat, itransform, idtransform,
invertmatrix
Insideness testing
------------------
in Cairo: infill, instroke, ineofill (set_fill_rule/in_fill)
not in Cairo: inufill, inustroke, inueofill
Device setup
------------
in Cairo: showpage, copypage
not in Cairo: setpagedevice, currentpagedevice, nulldevice
Glyph and font operators
------------------------
in Cairo: currentfont, definefont (font_create_for_ft_face),
undefine_font (font_destroy), findfont (font_create), makefont
(transform_font), setfont, scalefont, selectfont, show (show_text),
stringwidth (x/y in text_extents), xyshow (glyph_show -- but ignoring
current_point and using absolute positions)
not in Cairo, (and likely not needed): composefont, rootfont, ashow,
widthshow, awidthshow, xshow, xyshow, yshow, glyphshow, cshow, kshow,
FontDirectory, GlobalFontDirectory, StandardEncoding,
ISOLatin1Encoding, findencoding, setcachedevice, setcachedevice2,
setcharwidth
Graphics state operators (device-dependent)
-------------------------------------------
in Cairo: setflat (set_tolerance), currentflat (current_tolerance)
not in Cairo: sethalftone, currenthalftone, setscreen, currentscreen,
setcolorscreen, currentcolorscreen, settransfer, currenttransfer,
setcolortransfer, currentcolortransfer, setblackgeneration,
currentblackgeneration, setundercolorremoval,
currentundercolorremoval, setcolorrendering, currentcolorrendering,
setoverprint, currentoverprint, setsmoothness, currentsmoothness
PostScript operators never to be in Cairo
-----------------------------------------
Operator Stack Manipulation Operators, Arithmetic and Math Operators,
Array Operators, Packed Array Operators, Dictionary Operators, String
Operators, Rational,Boolean,and Bitwise Operators, Control Operators,
Type,Attribute,and Conversion Operators, File Operators, Resource
Operators, Virtual Memory Operators, Miscellaneous Operators,
Interpreter Parameter Operators, Errors, User Path Operators
|