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