=head1 NAME

Gtk2::Gdk::Cairo::Context

=cut

=for position SYNOPSIS

=head1 HIERARCHY

    Cairo::Context
    +---- Gtk2::Gdk::Cairo::Context   (Perl subclass)

=head1 DESCRIPTION

This is some inter-operation between Cairo (see L<Cairo>) and Gdk
things.

A C<Gtk2::Gdk::Cairo::Context> lets Cairo draw on a Gdk drawable
(window or pixmap).  It's a Perl-level subclass of C<Cairo::Context>
and the various functions below can be used as methods on it.

The methods can also be used on other C<Cairo::Context> as plain
functions.  For example C<set_source_pixbuf> can setup to draw from a
C<Gtk2::Gdk::Pixbuf> to any Cairo context,

    my $cr = Cairo::Context->create ($surface);
    Gtk2::Gdk::Cairo::Context::set_source_pixbuf ($cr, $pixbuf, $x,$y);
    $cr->paint;

=cut




=head1 METHODS

=head2 gdkcr = Gtk2::Gdk::Cairo::Context->B<create> ($drawable)

=over

=item * $drawable (Gtk2::Gdk::Drawable) 

=back



=head2 $gdkcr->B<rectangle> ($rectangle)

=head2 $gdkcr->B<rectangle> ($x, $y, $width, $height)

=head2 Gtk2::Gdk::Cairo::Context::rectangle ($anycr, $rectangle)

=over

=item * $rectangle (Gtk2::Gdk::Rectangle) 

=back

The 4-argument x,y,width,height is the base L<Cairo::Context> style.  This
extends to also take a C<Gtk2::Gdk::Rectangle>.

=head2 $gdkcr->B<region> ($region)

=head2 Gtk2::Gdk::Cairo::Context::region ($anycr, $region)

=over

=item * $region (Gtk2::Gdk::Region) 

=back



=head2 $gdkcr->B<reset_clip> ($drawable)

=head2 Gtk2::Gdk::Cairo::Context::reset_clip ($anycr, $drawable)

=over

=item * $drawable (Gtk2::Gdk::Drawable) 

=back



Since: gtk+ 2.18

=head2 $gdkcr->B<set_source_color> ($color)

=head2 Gtk2::Gdk::Cairo::Context::set_source_color ($anycr, $color)

=over

=item * $color (Gtk2::Gdk::Color) 

=back



=head2 $gdkcr->B<set_source_pixbuf> ($pixbuf, $pixbuf_x, $pixbuf_y)

=head2 Gtk2::Gdk::Cairo::Context::set_source_pixbuf ($anycr, $pixbuf, $pixbuf_x, $pixbuf_y)

=over

=item * $pixbuf (Gtk2::Gdk::Pixbuf) 

=item * $pixbuf_x (double) 

=item * $pixbuf_y (double) 

=back



=head2 $gdkcr->B<set_source_pixmap> ($pixmap, $pixmap_x, $pixmap_y)

=head2 Gtk2::Gdk::Cairo::Context::set_source_pixmap ($anycr, $pixmap, $pixmap_x, $pixmap_y)

=over

=item * $pixmap (Gtk2::Gdk::Pixmap) 

=item * $pixmap_x (double) 

=item * $pixmap_y (double) 

=back



Since: gtk+ 2.10



=cut


=head1 SEE ALSO

L<Gtk2>


=cut


=head1 COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See L<Gtk2> for a full notice.



=cut

