Math::Geometry::Construction::Point - a free user-defined point
Math::Geometry::Construction::Point
Version 0.010
my $p1 = $construction->add_point('x' => 100, 'y' => 150); my $p2 = $construction->add_point('x' => 50, 'y' => 90, hidden => 1); my $p3 = $construction->add_point('x' => 70, 'y' => 130, style => {stroke => 'red'}, label => 'A', label_offset_x => 5, label_offset_y => -5);
An instance of this class represents a user defined free point, as opposed to a derived point, e.g. an intersection point. An instance of this class got its position directly from the user. It is created by using the add_point method of Math::Geometry::Construction.
Math::Geometry::Construction
Holds a Math::VectorReal object with the position of the point. The z position is expected to be 0. As initialization argument to the constructor, you can also give an array reference instead of a Math::VectorReal object. The object is then created by the constructor. The z value is optional.
z
0
Math::VectorReal
Example:
$construction->add_point(position => [1, 4]);
Note that the conversion of a array reference is only done at construction time (at least currently). If you want to change the position later you have to provide a Math::VectorReal object.
A point is currently always drawn as a circle. This might become more flexible in the future. size determines the size of the point in the output. For a circle it is its diameter. This parameter is currently undef by default, because the output falls back to radius (see below). When radius is removed, size will default to 6.
size
undef
radius
6
This attribute is deprecated and might be removed in a future version. If size is not set then this attribute determines the radius of the output circle. Defaults to 3.
3
See Math::Geometry::Construction::Output.
Called by the Construction object during output generation. Currently draws a circle of diameter size, but this might become more flexible in the future.
Construction
Class method returning $ID_TEMPLATE, which defaults to 'P%09d'.
$ID_TEMPLATE
'P%09d'
No bugs have been reported. Please report all bugs directly to the author.
Lutz Gehlen, <perl at lutzgehlen.de>
<perl at lutzgehlen.de>
Copyright 2011 Lutz Gehlen.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Math::Geometry::Construction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::Geometry::Construction
CPAN shell
perl -MCPAN -e shell install Math::Geometry::Construction
For more information on module installation, please visit the detailed CPAN module installation guide.