1Gtk2::Gdk::Cairo::ConteUxste(r3)Contributed Perl DocumenGttakt2i:o:nGdk::Cairo::Context(3)
2
3
4

NAME

6       Gtk2::Gdk::Cairo::Context
7

HIERARCHY

9           Cairo::Context
10           +---- Gtk2::Gdk::Cairo::Context   (Perl subclass)
11

DESCRIPTION

13       This is some inter-operation between Cairo (see Cairo) and Gdk things.
14
15       A "Gtk2::Gdk::Cairo::Context" lets Cairo draw on a Gdk drawable (window
16       or pixmap).  It's a Perl-level subclass of "Cairo::Context" and the
17       various functions below can be used as methods on it.
18
19       The methods can also be used on other "Cairo::Context" as plain
20       functions.  For example "set_source_pixbuf" can setup to draw from a
21       "Gtk2::Gdk::Pixbuf" to any Cairo context,
22
23           my $cr = Cairo::Context->create ($surface);
24           Gtk2::Gdk::Cairo::Context::set_source_pixbuf ($cr, $pixbuf, $x,$y);
25           $cr->paint;
26

METHODS

28   gdkcr = Gtk2::Gdk::Cairo::Context->create ($drawable)
29       ·   $drawable (Gtk2::Gdk::Drawable)
30
31   $gdkcr->rectangle ($rectangle)
32   $gdkcr->rectangle ($x, $y, $width, $height)
33   Gtk2::Gdk::Cairo::Context::rectangle ($anycr, $rectangle)
34       ·   $rectangle (Gtk2::Gdk::Rectangle)
35
36       The 4-argument x,y,width,height is the base Cairo::Context style.  This
37       extends to also take a "Gtk2::Gdk::Rectangle".
38
39   $gdkcr->region ($region)
40   Gtk2::Gdk::Cairo::Context::region ($anycr, $region)
41       ·   $region (Gtk2::Gdk::Region)
42
43   $gdkcr->reset_clip ($drawable)
44   Gtk2::Gdk::Cairo::Context::reset_clip ($anycr, $drawable)
45       ·   $drawable (Gtk2::Gdk::Drawable)
46
47       Since: gtk+ 2.18
48
49   $gdkcr->set_source_color ($color)
50   Gtk2::Gdk::Cairo::Context::set_source_color ($anycr, $color)
51       ·   $color (Gtk2::Gdk::Color)
52
53   $gdkcr->set_source_pixbuf ($pixbuf, $pixbuf_x, $pixbuf_y)
54   Gtk2::Gdk::Cairo::Context::set_source_pixbuf ($anycr, $pixbuf, $pixbuf_x,
55       $pixbuf_y)
56       ·   $pixbuf (Gtk2::Gdk::Pixbuf)
57
58       ·   $pixbuf_x (double)
59
60       ·   $pixbuf_y (double)
61
62   $gdkcr->set_source_pixmap ($pixmap, $pixmap_x, $pixmap_y)
63   Gtk2::Gdk::Cairo::Context::set_source_pixmap ($anycr, $pixmap, $pixmap_x,
64       $pixmap_y)
65       ·   $pixmap (Gtk2::Gdk::Pixmap)
66
67       ·   $pixmap_x (double)
68
69       ·   $pixmap_y (double)
70
71       Since: gtk+ 2.10
72

SEE ALSO

74       Gtk2
75
77       Copyright (C) 2003-2011 by the gtk2-perl team.
78
79       This software is licensed under the LGPL.  See Gtk2 for a full notice.
80
81
82
83perl v5.30.0                      2019-07-26      Gtk2::Gdk::Cairo::Context(3)
Impressum