=head1 NAME

Gnome2::Canvas::main - A structured graphics canvas

=cut

=for object Gnome2::Canvas::main - A structured graphics canvas
=cut

=for object Gnome2::Canvas::main
=cut




=head1 METHODS

=head2 widget = Gnome2::Canvas-E<gt>B<new> 

Create a new empty canvas in non-antialiased mode.

=head2 widget = Gnome2::Canvas-E<gt>B<new_aa> 

Create a new empty canvas in antialiased mode.

=head2 boolean = $canvas->B<aa>


Returns true if I<$canvas> was created in anti-aliased mode.


=head2 ($bx1, $by1, $bx2, $by2) = Gnome2::Canvas->B<get_butt_points> ($x1, $y1, $x2, $y2, $width, $project)

=over

=item * $x1 (double) 

=item * $y1 (double) 

=item * $x2 (double) 

=item * $y2 (double) 

=item * $width (double) 

=item * $project (integer) 

=back



=head2 (wx, wy) = $canvas-E<gt>B<c2w> ($cx, $cy)

=over

=item * $cx (integer) 

=item * $cy (integer) 

=back

=head2 boolean = $canvas-E<gt>B<get_center_scroll_region> 

=head2 $canvas-E<gt>B<set_center_scroll_region> ($center_scroll_region)

=over

=item * $center_scroll_region (boolean) 

=back

=head2 list = $canvas-E<gt>B<get_color> ($spec)

=over

=item * $spec (string) 

=back


Returns an integer indicating the success of the color allocation and a
GdkColor.


=head2 unsigned = $canvas-E<gt>B<get_color_pixel> ($rgba)

=over

=item * $rgba (integer) 

=back

=head2 rgbdither = $canvas-E<gt>B<get_dither> 

=head2 $canvas-E<gt>B<set_dither> ($dither)

=over

=item * $dither (Gtk2::Gdk::RgbDither) 

=back

=head2 item = $canvas-E<gt>B<get_item_at> ($x, $y)

=over

=item * $x (double) 

=item * $y (double) 

=back

=head2 ($mx1, $my1, $mx2, $my2) = Gnome2::Canvas->B<get_miter_points> ($x1, $y1, $x2, $y2, $x3, $y3, $width)

=over

=item * $x1 (double) 

=item * $y1 (double) 

=item * $x2 (double) 

=item * $y2 (double) 

=item * $x3 (double) 

=item * $y3 (double) 

=item * $width (double) 

=back



=head2 double = $canvas->B<get_pixels_per_unit>

Fetch I<$canvas>' scale factor.

=head2 $canvas-E<gt>B<set_pixels_per_unit> ($n)

=over

=item * $n (double) 

=back


Set the zooming factor of I<$canvas> by specifying the number of screen
pixels that correspond to one canvas unit.


=head2 double = Gnome2::Canvas-E<gt>B<polygon_to_point> ($poly_ref, $x, $y)

=over

=item * $poly_ref (arrayref) coordinate pairs that make up the polygon

=item * $x (double) 

=item * $y (double) 

=back

Return the distance from the point I<$x>,I<$y> to the polygon described by
the vertices in I<$poly_ref>, or zero if the point is inside the polygon.

=head2 $canvas-E<gt>B<request_redraw> ($x1, $y1, $x2, $y2)

=over

=item * $x1 (integer) 

=item * $y1 (integer) 

=item * $x2 (integer) 

=item * $y2 (integer) 

=back

=head2 group = $canvas-E<gt>B<root> 

=head2 (cx, cy) = $canvas-E<gt>B<get_scroll_offsets> 

=head2 (x1, y1, x2, y2) = $canvas-E<gt>B<get_scroll_region> 

=head2 $canvas-E<gt>B<set_scroll_region> ($x1, $y1, $x2, $y2)

=over

=item * $x1 (double) 

=item * $y1 (double) 

=item * $x2 (double) 

=item * $y2 (double) 

=back

=head2 $canvas-E<gt>B<scroll_to> ($cx, $cy)

=over

=item * $cx (integer) 

=item * $cy (integer) 

=back

=head2 $canvas-E<gt>B<set_stipple_origin> ($gc)

=over

=item * $gc (Gtk2::Gdk::GC) 

=back

=head2 $canvas-E<gt>B<update_now> 

=head2 (cx, cy) = $canvas-E<gt>B<w2c> ($wx, $wy)

=over

=item * $wx (double) 

=item * $wy (double) 

=back

=head2 $affine = $canvas->B<w2c_affine>

=over

=back

Fetch the affine transform that converts from world coordinates to canvas
pixel coordinates.

Note: This method was completely broken for all
$Gnome2::Canvas::VERSION < 1.002.

=head2 (cx, cy) = $canvas-E<gt>B<w2c_d> ($wx, $wy)

=over

=item * $wx (double) 

=item * $wy (double) 

=back

=head2 (worldx, worldy) = $canvas-E<gt>B<window_to_world> ($winx, $winy)

=over

=item * $winx (double) 

=item * $winy (double) 

=back

=head2 (winx, winy) = $canvas-E<gt>B<world_to_window> ($worldx, $worldy)

=over

=item * $worldx (double) 

=item * $worldy (double) 

=back



=cut


=head1 ENUMS AND FLAGS

=head2 enum Gtk2::Gdk::RgbDither

=over

=item * 'none' / 'GDK_RGB_DITHER_NONE'

=item * 'normal' / 'GDK_RGB_DITHER_NORMAL'

=item * 'max' / 'GDK_RGB_DITHER_MAX'

=back




=cut


=head1 SEE ALSO

L<Gnome2::Canvas>


=cut


=head1 COPYRIGHT

Copyright (C) 2003-2004 by the Gtk2-Perl Team.

This software is licensed under the LGPL; see L<Gnome2::Canvas> for a full notice.


=cut

