Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

graphics::primitive::brush(3pm) [debian man page]

Graphics::Primitive::Brush(3pm) 			User Contributed Perl Documentation			   Graphics::Primitive::Brush(3pm)

NAME
Graphics::Primitive::Brush - Description of a stroke DESCRIPTION
Graphics::Primitive::Brush represents the visible trace of 'ink' along a path. SYNOPSIS
use Graphics::Primitive::Brush; my $stroke = Graphics::Primitive::Brush->new({ line_cap => 'round', line_join => 'miter', width => 2 }); METHODS
Constructor new Creates a new Graphics::Primitive::Brush. Defaults to a width of 1, a line_cap 'butt' and a line_join of 'miter'. Instance Methods color Set/Get this brush's color. dash_pattern Set/Get the dash pattern. A dash pattern is an arrayref of numbers representing the lengths of the various line segments of the dash. Even numbered elements are considered opaque and odd elements are transparent. derive Clone this brush but change one or more of it's attributes by passing in a hashref of options: my $new = $brush->derive({ attr => $newvalue }); The returned font will be identical to the cloned one, save the attributes specified. equal_to ($other) Returns 1 if this brush is equal to the supplied one, else returns 0. line_cap Set/Get the line_cap of this stroke. Valid values are butt, round and square. line_join Set/Get the line_join of this stroke. Valid values are miter, round and bevel. not_equal_to ($other) Opposite of equal_to. width Set/Get the width of this stroke. Defaults to 1 AUTHOR
Cory Watson, "<gphat@cpan.org>" COPYRIGHT &; LICENSE Copyright 2008-2010 by Cory G Watson. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2010-08-21 Graphics::Primitive::Brush(3pm)

Check Out this Related Man Page

Graphics::Primitive::Canvas(3pm)			User Contributed Perl Documentation			  Graphics::Primitive::Canvas(3pm)

NAME
Graphics::Primitive::Canvas - Component composed of paths DESCRIPTION
Graphics::Primitive::Canvas is a component for drawing arbitrary things. It holds Paths and Operations. SYNOPSIS
use Graphics::Primitive::Canvas; my $canvas = Graphics::Primitive::Canvas->new; $canvas->move_to($point); # or just $x, $y $canvas->do($op); DESCRIPTION
The Canvas is a container for multiple Paths. It has a path that is the operative path for all path-related methods. You can treat the Canvas as if it was a path, calling methods like line_to or move_to. When you are ready to perform an operation on the path, call the do method with the operation you want to call as an argument. Drawing a line and stroking it would look like: $canvas->move_to(0, 0); $canvas->line_to(10, 10); my $op = Graphics::Primitive::Operation::Stroke->new; $stroke->brush->color( Graphics::Color::RGB->new(red => 0, blue => 1, green => 1) ); $canvas->do($op); When you instantiate a Canvas a newly instantiated path resides in path. After you call do that current path is moved to the paths list and new path is placed in current_path. If you want to keep the path around you can call save before do then call restore to put a saved copy of the path back into path. METHODS
Constructor new Creates a new Graphics::Primitive::Canvas Instance Methods do Given an operation, pushes the current path onto the path stack. FIXME: Example path The current path this canvas is using. path_count Count of paths in paths. paths Arrayref of hashrefs representing paths combined with their operations: [ { path => $path, op => $op }, ] restore Replace the current path by popping the top path from the saved path list. save Copy the current path and push it onto the stack of saved paths. saved_paths List of saved paths. Add to the list with save and pop from it using restore. saved_path_count Count of paths saved in saved_paths. AUTHOR
Cory Watson <gphat@cpan.org> COPYRIGHT &; LICENSE Copyright 2008-2010 by Cory G Watson. You can redistribute and/or modify this code under the same terms as Perl itself. perl v5.12.3 2010-08-21 Graphics::Primitive::Canvas(3pm)
Man Page