1Cairo(3)              User Contributed Perl Documentation             Cairo(3)
2
3
4

NAME

6       Cairo - Perl interface to the cairo 2d vector graphics library
7

SYNOPSIS

9         use Cairo;
10
11         my $surface = Cairo::ImageSurface->create ('argb32', 100, 100);
12         my $cr = Cairo::Context->create ($surface);
13
14         $cr->rectangle (10, 10, 40, 40);
15         $cr->set_source_rgb (0, 0, 0);
16         $cr->fill;
17
18         $cr->rectangle (50, 50, 40, 40);
19         $cr->set_source_rgb (1, 1, 1);
20         $cr->fill;
21
22         $cr->show_page;
23
24         $surface->write_to_png ('output.png');
25

ABSTRACT

27       Cairo provides Perl bindings for the vector graphics library cairo.  It
28       supports multiple output targets, including PNG, PDF and SVG.  Cairo
29       produces identical output on all those targets.
30

API DOCUMENTATION

32       This is a listing of the API Cairo provides.  For more verbose
33       information, refer to the cairo manual at
34       <http://cairographics.org/manual/>.
35
36   Drawing
37       Cairo::Context -- The cairo drawing context
38
39       Cairo::Context is the main object used when drawing with Cairo. To draw
40       with Cairo, you create a Cairo::Context, set the target surface, and
41       drawing options for the Cairo::Context, create shapes with methods like
42       "$cr->move_to" and "$cr->line_to", and then draw shapes with
43       "$cr->stroke" or "$cr->fill".
44
45       Cairo::Context's can be pushed to a stack via "$cr->save". They may
46       then safely be changed, without loosing the current state. Use
47       "$cr->restore" to restore to the saved state.
48
49       $cr = Cairo::Context->create ($surface)
50           $surface: Cairo::Surface
51       $cr->save
52       $cr->restore
53       $status = $cr->status
54       $surface = $cr->get_target
55       $cr->push_group [1.2]
56       $cr->push_group_with_content ($content) [1.2]
57           $content: Cairo::Content
58       $pattern = $cr->pop_group [1.2]
59       $cr->pop_group_to_source [1.2]
60       $surface = $cr->get_group_target [1.2]
61       $cr->set_source_rgb ($red, $green, $blue)
62           $red: double
63           $green: double
64           $blue: double
65       $cr->set_source_rgba ($red, $green, $blue, $alpha)
66           $red: double
67           $green: double
68           $blue: double
69           $alpha: double
70       $cr->set_source ($source)
71           $source: Cairo::Pattern
72       $cr->set_source_surface ($surface, $x, $y)
73           $surface: Cairo::Surface
74           $x: double
75           $y: double
76       $source = $cr->get_source
77       $cr->set_antialias ($antialias)
78           $antialias: Cairo::Antialias
79       $antialias = $cr->get_antialias
80       $cr->set_dash ($offset, ...)
81           $offset: double
82           ...: list of doubles
83       $cr->set_fill_rule ($fill_rule)
84           $fill_rule: Cairo::FillRule
85       $fill_rule = $cr->get_fill_rule
86       $cr->set_line_cap ($line_cap)
87           $line_cap: Cairo::LineCap
88       $line_cap = $cr->get_line_cap
89       $cr->set_line_join ($line_join)
90           $line_join: Cairo::LineJoin
91       $line_join = $cr->get_line_join
92       $cr->set_line_width ($width)
93           $width: double
94       $width = $cr->get_line_width
95       $cr->set_miter_limit ($limit)
96           $limit: double
97       ($offset, @dashes) = $cr->get_dash [1.4]
98       $limit = $cr->get_miter_limit
99       $cr->set_operator ($op)
100           $op: Cairo::Operator
101       $op = $cr->get_operator
102       $cr->set_tolerance ($tolerance)
103           $tolerance: double
104       $tolerance = $cr->get_tolerance
105       $cr->clip
106       $cr->clip_preserve
107       ($x1, $y1, $x2, $y2) = $cr->clip_extents [1.4]
108       $bool = $cr->in_clip ($x, $y) [1.10]
109           $x: double
110           $y: double
111       @rectangles = $cr->copy_clip_rectangle_list [1.4]
112       $cr->reset_clip
113       $cr->fill
114       $cr->fill_preserve
115       ($x1, $y1, $x2, $y2) = $cr->fill_extents
116       $bool = $cr->in_fill ($x, $y)
117           $x: double
118           $y: double
119       $cr->mask ($pattern)
120           $pattern: Cairo::Pattern
121       $cr->mask_surface ($surface, $surface_x, $surface_y)
122           $surface: Cairo::Surface
123           $surface_x: double
124           $surface_y: double
125       $cr->paint
126       $cr->paint_with_alpha ($alpha)
127           $alpha: double
128       $cr->stroke
129       $cr->stroke_preserve
130       ($x1, $y1, $x2, $y2) = $cr->stroke_extents
131       $bool = $cr->in_stroke ($x, $y)
132           $x: double
133           $y: double
134       $cr->tag_begin($name, $atts) [1.16]
135           $name: string
136           $atts: string
137       $cr->tag_end($name) [1.16]
138           $name: string
139       $cr->copy_page
140       $cr->show_page
141
142       Paths -- Creating paths and manipulating path data
143
144         $path = [
145           { type => "move-to", points => [[1, 2]] },
146           { type => "line-to", points => [[3, 4]] },
147           { type => "curve-to", points => [[5, 6], [7, 8], [9, 10]] },
148           ...
149           { type => "close-path", points => [] },
150         ];
151
152       Cairo::Path is a data structure for holding a path. This data structure
153       serves as the return value for "$cr->copy_path" and
154       "$cr->copy_path_flat" as well the input value for "$cr->append_path".
155
156       Cairo::Path is represented as an array reference that contains path
157       elements, represented by hash references with two keys: type and
158       points.  The value for type can be either of the following:
159
160       "move-to"
161       "line-to"
162       "curve-to"
163       "close-path"
164
165       The value for points is an array reference which contains zero or more
166       points.  Points are represented as array references that contain two
167       doubles: x and y.  The necessary number of points depends on the type
168       of the path element:
169
170       "move-to": 1 point
171       "line_to": 1 point
172       "curve-to": 3 points
173       "close-path": 0 points
174
175       The semantics and ordering of the coordinate values are consistent with
176       "$cr->move_to", "$cr->line_to", "$cr->curve_to", and "$cr->close_path".
177
178       Note that the paths returned by Cairo are implemented as tied array
179       references which do not support adding, removing or shuffling of path
180       segments.  For these operations, you need to make a shallow copy first:
181
182         my @path_clone = @{$path};
183         # now you can alter @path_clone which ever way you want
184
185       The points of a single path element can be changed directly, however,
186       without the need for a shallow copy:
187
188         $path->[$i]{points} = [[3, 4], [5, 6], [7, 8]];
189
190       $path = $cr->copy_path
191       $path = $cr->copy_path_flat
192       $cr->append_path ($path)
193           $path: Cairo::Path
194       $bool = $cr->has_current_point [1.6]
195       ($x, $y) = $cr->get_current_point
196       $cr->new_path
197       $cr->new_sub_path [1.2]
198       $cr->close_path
199       ($x1, $y1, $x2, $y2) = $cr->path_extents [1.6]
200       $cr->arc ($xc, $yc, $radius, $angle1, $angle2)
201           $xc: double
202           $yc: double
203           $radius: double
204           $angle1: double
205           $angle2: double
206       $cr->arc_negative ($xc, $yc, $radius, $angle1, $angle2)
207           $xc: double
208           $yc: double
209           $radius: double
210           $angle1: double
211           $angle2: double
212       $cr->curve_to ($x1, $y1, $x2, $y2, $x3, $y3)
213           $x1: double
214           $y1: double
215           $x2: double
216           $y2: double
217           $x3: double
218           $y3: double
219       $cr->line_to ($x, $y)
220           $x: double
221           $y: double
222       $cr->move_to ($x, $y)
223           $x: double
224           $y: double
225       $cr->rectangle ($x, $y, $width, $height)
226           $x: double
227           $y: double
228           $width: double
229           $height: double
230       $cr->glyph_path (...)
231           ...: list of Cairo::Glyph's
232       $cr->text_path ($utf8)
233           $utf8: string in utf8 encoding
234       $cr->rel_curve_to ($dx1, $dy1, $dx2, $dy2, $dx3, $dy3)
235           $dx1: double
236           $dy1: double
237           $dx2: double
238           $dy2: double
239           $dx3: double
240           $dy3: double
241       $cr->rel_line_to ($dx, $dy)
242           $dx: double
243           $dy: double
244       $cr->rel_move_to ($dx, $dy)
245           $dx: double
246           $dy: double
247
248       Patterns -- Gradients and filtered sources
249
250       $status = $pattern->status
251       $type = $pattern->get_type [1.2]
252       $pattern->set_extend ($extend)
253           $extend: Cairo::Extend
254       $extend = $pattern->get_extend
255       $pattern->set_filter ($filter)
256           $filter: Cairo::Filter
257       $filter = $pattern->get_filter
258       $pattern->set_matrix ($matrix)
259           $matrix: Cairo::Matrix
260       $matrix = $pattern->get_matrix
261       $pattern = Cairo::SolidPattern->create_rgb ($red, $green, $blue)
262           $red: double
263           $green: double
264           $blue: double
265       $pattern = Cairo::SolidPattern->create_rgba ($red, $green, $blue,
266       $alpha)
267           $red: double
268           $green: double
269           $blue: double
270           $alpha: double
271       ($r, $g, $b, $a) = $pattern->get_rgba [1.4]
272       $pattern = Cairo::SurfacePattern->create ($surface)
273           $surface: Cairo::Surface
274       $surface = $pattern->get_surface [1.4]
275       $pattern = Cairo::LinearGradient->create ($x0, $y0, $x1, $y1)
276           $x0: double
277           $y0: double
278           $x1: double
279           $y1: double
280       ($x0, $y0, $x1, $y1) = $pattern->get_points [1.4]
281       $pattern = Cairo::RadialGradient->create ($cx0, $cy0, $radius0, $cx1,
282       $cy1, $radius1)
283           $cx0: double
284           $cy0: double
285           $radius0: double
286           $cx1: double
287           $cy1: double
288           $radius1: double
289       ($x0, $y0, $r0, $x1, $y1, $r1) = $pattern->get_circles [1.4]
290       $pattern->add_color_stop_rgb ($offset, $red, $green, $blue)
291           $offset: double
292           $red: double
293           $green: double
294           $blue: double
295       $pattern->add_color_stop_rgba ($offset, $red, $green, $blue, $alpha)
296           $offset: double
297           $red: double
298           $green: double
299           $blue: double
300           $alpha: double
301       @stops = $pattern->get_color_stops [1.4]
302           A color stop is represented as an array reference with five
303           elements: offset, red, green, blue, and alpha.
304
305       Regions -- Representing a pixel-aligned area
306
307       $region = Cairo::Region->create (...) [1.10]
308           ...: zero or more Cairo::RectangleInt
309       $status = $region->status [1.10]
310       $num = $region->num_rectangles [1.10]
311       $rect = $region->get_rectangle ($i) [1.10]
312           $i: integer
313       $bool = $region->is_empty [1.10]
314       $bool = $region->contains_point ($x, $y) [1.10]
315           $x: integer
316           $y: integer
317       $bool = $region_one->equal ($region_two) [1.10]
318           $region_two: Cairo::Region
319       $region->translate ($dx, $dy) [1.10]
320           $dx: integer
321           $dy: integer
322       $status = $dst->intersect ($other) [1.10]
323       $status = $dst->intersect_rectangle ($rect) [1.10]
324       $status = $dst->subtract ($other) [1.10]
325       $status = $dst->subtract_rectangle ($rect) [1.10]
326       $status = $dst->union ($other) [1.10]
327       $status = $dst->union_rectangle ($rect) [1.10]
328       $status = $dst->xor ($other) [1.10]
329       $status = $dst->xor_rectangle ($rect) [1.10]
330           $other: Cairo::Region
331           $rect: Cairo::RectangleInt
332
333       Transformations -- Manipulating the current transformation matrix
334
335       $cr->translate ($tx, $ty)
336           $tx: double
337           $ty: double
338       $cr->scale ($sx, $sy)
339           $sx: double
340           $sy: double
341       $cr->rotate ($angle)
342           $angle: double
343       $cr->transform ($matrix)
344           $matrix: Cairo::Matrix
345       $cr->set_matrix ($matrix)
346           $matrix: Cairo::Matrix
347       $matrix = $cr->get_matrix
348       $cr->identity_matrix
349       ($x, $y) = $cr->user_to_device ($x, $y)
350           $x: double
351           $y: double
352       ($dx, $dy) = $cr->user_to_device_distance ($dx, $dy)
353           $dx: double
354           $dy: double
355       ($x, $y) = $cr->device_to_user ($x, $y)
356           $x: double
357           $y: double
358       ($dx, $dy) = $cr->device_to_user_distance ($dx, $dy)
359           $dx: double
360           $dy: double
361
362       Text -- Rendering text and sets of glyphs
363
364       Glyphs are represented as anonymous hash references with three keys:
365       index, x and y.  Example:
366
367         my @glyphs = ({ index => 1, x => 2, y => 3 },
368                       { index => 2, x => 3, y => 4 },
369                       { index => 3, x => 4, y => 5 });
370
371       $cr->select_font_face ($family, $slant, $weight)
372           $family: string
373           $slant: Cairo::FontSlant
374           $weight: Cairo::FontWeight
375       $cr->set_font_size ($size)
376           $size: double
377       $cr->set_font_matrix ($matrix)
378           $matrix: Cairo::Matrix
379       $matrix = $cr->get_font_matrix
380       $cr->set_font_options ($options)
381           $options: Cairo::FontOptions
382       $options = $cr->get_font_options
383       $cr->set_scaled_font ($scaled_font) [1.2]
384           $scaled_font: Cairo::ScaledFont
385       $scaled_font = $cr->get_scaled_font [1.4]
386       $cr->show_text ($utf8)
387           $utf8: string
388       $cr->show_glyphs (...)
389           ...: list of glyphs
390       $cr->show_text_glyphs ($utf8, $glyphs, $clusters, $cluster_flags) [1.8]
391           $utf8: string
392           $glyphs: array ref of glyphs
393           $clusters: array ref of clusters
394           $cluster_flags: Cairo::TextClusterFlags
395       $face = $cr->get_font_face
396       $extents = $cr->font_extents
397       $cr->set_font_face ($font_face)
398           $font_face: Cairo::FontFace
399       $cr->set_scaled_font ($scaled_font)
400           $scaled_font: Cairo::ScaledFont
401       $extents = $cr->text_extents ($utf8)
402           $utf8: string
403       $extents = $cr->glyph_extents (...)
404           ...: list of glyphs
405       $face = Cairo::ToyFontFace->create ($family, $slant, $weight) [1.8]
406           $family: string
407           $slant: Cairo::FontSlant
408           $weight: Cairo::FontWeight
409       $family = $face->get_family [1.8]
410       $slang = $face->get_slant [1.8]
411       $weight = $face->get_weight [1.8]
412
413   Fonts
414       Cairo::FontFace -- Base class for fonts
415
416       $status = $font_face->status
417       $type = $font_face->get_type [1.2]
418
419       Scaled Fonts -- Caching metrics for a particular font size
420
421       $scaled_font = Cairo::ScaledFont->create ($font_face, $font_matrix,
422       $ctm, $options)
423           $font_face: Cairo::FontFace
424           $font_matrix: Cairo::Matrix
425           $ctm: Cairo::Matrix
426           $options: Cairo::FontOptions
427       $status = $scaled_font->status
428       $extents = $scaled_font->extents
429       $extents = $scaled_font->text_extents ($utf8) [1.2]
430           $utf8: string
431       $extents = $scaled_font->glyph_extents (...)
432           ...: list of glyphs
433       ($status, $glyphs, $clusters, $cluster_flags) =
434       $scaled_font->text_to_glyphs ($x, $y, $utf8) [1.8]
435           $x: double
436           $y: double
437           $utf8: string
438       $font_face = $scaled_font->get_font_face [1.2]
439       $options = $scaled_font->get_font_options [1.2]
440       $font_matrix = $scaled_font->get_font_matrix [1.2]
441       $ctm = $scaled_font->get_ctm [1.2]
442       $scale_matrix = $scaled_font->get_scale_matrix [1.8]
443       $type = $scaled_font->get_type [1.2]
444
445       Font Options -- How a font should be rendered
446
447       $font_options = Cairo::FontOptions->create
448       $status = $font_options->status
449       $font_options->merge ($other)
450           $other: Cairo::FontOptions
451       $hash = $font_options->hash
452       $bools = $font_options->equal ($other)
453           $other: Cairo::FontOptions
454       $font_options->set_antialias ($antialias)
455           $antialias: Cairo::AntiAlias
456       $antialias = $font_options->get_antialias
457       $font_options->set_subpixel_order ($subpixel_order)
458           $subpixel_order: Cairo::SubpixelOrder
459       $subpixel_order = $font_options->get_subpixel_order
460       $font_options->set_hint_style ($hint_style)
461           $hint_style: Cairo::HintStyle
462       $hint_style = $font_options->get_hint_style
463       $font_options->set_hint_metrics ($hint_metrics)
464           $hint_metrics: Cairo::HintMetrics
465       $hint_metrics = $font_options->get_hint_metrics
466
467       FreeType Fonts -- Font support for FreeType
468
469       If your cairo library supports it, the FreeType integration allows you
470       to load font faces from font files.  You can query for this capability
471       with "Cairo::HAS_FT_FONT".  To actually use this, you'll need the
472       Font::FreeType module.
473
474       my $face = Cairo::FtFontFace->create ($ft_face, $load_flags=0)
475           $ft_face: Font::FreeType::Face
476           $load_flags: integer
477
478           This method allows you to create a Cairo::FontFace from a
479           Font::FreeType::Face.  To obtain the latter, you can for example
480           load it from a file:
481
482             my $file = '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf';
483             my $ft_face = Font::FreeType->new->face ($file);
484             my $face = Cairo::FtFontFace->create ($ft_face);
485
486   Surfaces
487       Cairo::Surface -- Base class for surfaces
488
489       $similar = Cairo::Surface->create_similar ($other, $content, $width,
490       $height)
491           $other: Cairo::Surface
492           $content: Cairo::Content
493           $width: integer
494           $height: integer
495
496           For hysterical reasons, you can also use the following syntax:
497
498             $similar = $other->create_similar ($content, $width, $height)
499
500       $new = Cairo::Surface->create_for_rectangle ($target, $x, $y, $width,
501       $height) [1.10]
502           $target: Cairo::Surface
503           $x: double
504           $y: double
505           $width: double
506           $height: double
507       $status = $surface->status
508       $surface->finish
509       $surface->flush
510       $font_options = $surface->get_font_options
511       $content = $surface->get_content [1.2]
512       $surface->mark_dirty
513       $surface->mark_dirty_rectangle ($x, $y, $width, $height)
514           $x: integer
515           $y: integer
516           $width: integer
517           $height: integer
518       $surface->set_device_offset ($x_offset, $y_offset)
519           $x_offset: integer
520           $y_offset: integer
521       ($x_offset, $y_offset) = $surface->get_device_offset [1.2]
522       $surface->set_fallback_resolution ($x_pixels_per_inch,
523       $y_pixels_per_inch) [1.2]
524           $x_pixels_per_inch: double
525           $y_pixels_per_inch: double
526       ($x_pixels_per_inch, $y_pixels_per_inch) =
527       $surface->get_fallback_resolution [1.8]
528       $type = $surface->get_type [1.2]
529       $status = $surface->copy_page [1.6]
530           $status: Cairo::Status
531       $status = $surface->show_page [1.6]
532           $status: Cairo::Status
533       $boolean = $surface->has_show_text_glyphs [1.8]
534
535       Image Surfaces -- Rendering to memory buffers
536
537       $surface = Cairo::ImageSurface->create ($format, $width, $height)
538           $format: Cairo::Format
539           $width: integer
540           $height: integer
541       $surface = Cairo::ImageSurface->create_for_data ($data, $format,
542       $width, $height, $stride)
543           $data: image data
544           $format: Cairo::Format
545           $width: integer
546           $height: integer
547           $stride: integer
548       $data = $surface->get_data [1.2]
549       $format = $surface->get_format [1.2]
550       $width = $surface->get_width
551       $height = $surface->get_height
552       $stride = $surface->get_stride [1.2]
553       $stride = Cairo::Format::stride_for_width ($format, $width) [1.6]
554           $format: Cairo::Format
555           $width: integer
556
557       PDF Surfaces -- Rendering PDF documents
558
559       $surface = Cairo::PdfSurface->create ($filename, $width_in_points,
560       $height_in_points) [1.2]
561           $filename: string
562           $width_in_points: double
563           $height_in_points: double
564       $surface = Cairo::PdfSurface->create_for_stream ($callback,
565       $callback_data, $width_in_points, $height_in_points) [1.2]
566           $callback: Cairo::WriteFunc
567           $callback_data: scalar
568           $width_in_points: double
569           $height_in_points: double
570       $surface->set_size ($width_in_points, $height_in_points) [1.2]
571           $width_in_points: double
572           $height_in_points: double
573       $surface->restrict_to_version ($version) [1.10]
574           $version: Cairo::PdfVersion
575       @versions = Cairo::PdfSurface::get_versions [1.10]
576       $string = Cairo::PdfSurface::version_to_string ($version) [1.10]
577           $version: Cairo::PdfVersion
578       $surface->set_metadata($name, $value) [1.16]
579           $name: string
580           $value: string
581
582       PNG Support -- Reading and writing PNG images
583
584       $surface = Cairo::ImageSurface->create_from_png ($filename)
585           $filename: string
586       Cairo::ReadFunc: $data = sub { my ($callback_data, $length) = @_; }
587           $data: binary image data, of length $length
588           $callback_data: scalar, user data
589           $length: integer, bytes to read
590       $surface = Cairo::ImageSurface->create_from_png_stream ($callback,
591       $callback_data)
592           $callback: Cairo::ReadFunc
593           $callback_data: scalar
594       $status = $surface->write_to_png ($filename)
595           $filename: string
596       Cairo::WriteFunc: sub { my ($callback_data, $data) = @_; }
597           $callback_data: scalar, user data
598           $data: binary image data, to be written
599       $status = $surface->write_to_png_stream ($callback, $callback_data)
600           $callback: Cairo::WriteFunc
601           $callback_data: scalar
602
603       PostScript Surfaces -- Rendering PostScript documents
604
605       $surface = Cairo::PsSurface->create ($filename, $width_in_points,
606       $height_in_points) [1.2]
607           $filename: string
608           $width_in_points: double
609           $height_in_points: double
610       $surface = Cairo::PsSurface->create_for_stream ($callback,
611       $callback_data, $width_in_points, $height_in_points) [1.2]
612           $callback: Cairo::WriteFunc
613           $callback_data: scalar
614           $width_in_points: double
615           $height_in_points: double
616       $surface->set_size ($width_in_points, $height_in_points) [1.2]
617           $width_in_points: double
618           $height_in_points: double
619       $surface->dsc_begin_setup [1.2]
620       $surface->dsc_begin_page_setup [1.2]
621       $surface->dsc_comment ($comment) [1.2]
622           $comment: string
623       $surface->restrict_to_level ($level) [1.6]
624           $level: Cairo::PsLevel
625       @levels = Cairo::PsSurface::get_levels [1.6]
626       $string = Cairo::PsSurface::level_to_string ($level) [1.6]
627           $level: Cairo::PsLevel
628       $surface->set_eps ($eps) [1.6]
629           $eps: boolean
630       $eps = $surface->get_eps [1.6]
631
632       Recording Surfaces -- Records all drawing operations
633
634       $surface = Cairo::RecordingSurface->create ($content, $extents) [1.10]
635           $content: Cairo::Content
636           $extents: Cairo::Rectangle
637       ($x0, $y0, $width, $height) = $surface->ink_extents [1.10]
638
639       SVG Surfaces -- Rendering SVG documents
640
641       $surface = Cairo::SvgSurface->create ($filename, $width_in_points,
642       $height_in_points) [1.2]
643           $filename: string
644           $width_in_points: double
645           $height_in_points: double
646       $surface = Cairo::SvgSurface->create_for_stream ($callback,
647       $callback_data, $width_in_points, $height_in_points) [1.2]
648           $callback: Cairo::WriteFunc
649           $callback_data: scalar
650           $width_in_points: double
651           $height_in_points: double
652       $surface->restrict_to_version ($version) [1.2]
653           $version: Cairo::SvgVersion
654       @versions = Cairo::SvgSurface::get_versions [1.2]
655       $string = Cairo::SvgSurface::version_to_string ($version) [1.2]
656           $version: Cairo::SvgVersion
657
658   Utilities
659       Version Information -- Run-time and compile-time version checks.
660
661       $version_code = Cairo->lib_version
662       $version_string = Cairo->lib_version_string
663           These two functions return the version of libcairo that the program
664           is currently running against.
665
666       $version_code = Cairo->LIB_VERSION
667           Returns the version of libcairo that Cairo was compiled against.
668
669       $version_code = Cairo->LIB_VERSION_ENCODE ($major, $minor, $micro)
670           $major: integer
671           $minor: integer
672           $micro: integer
673
674           Encodes the version "$major.$minor.$micro" as an integer suitable
675           for comparison against "Cairo->lib_version" and
676           "Cairo->LIB_VERSION".
677

SEE ALSO

679       <http://cairographics.org/documentation>
680           Lists many available resources including tutorials and examples
681
682       <http://cairographics.org/manual/>
683           Contains the reference manual
684

AUTHORS

686       Ross McFarland <rwmcfa1 at neces dot com>
687       Torsten Schoenfeld <kaffeetisch at gmx dot de>
688
690       Copyright (C) 2004-2013 by the cairo perl team
691
692
693
694perl v5.30.1                      2020-01-29                          Cairo(3)
Impressum