Wx::Polygon

Wx::Polygon can draw and manipulate polygons for wxPerl.
Download

Wx::Polygon Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Hans Oesterholt-Dijkema
  • Publisher web site:
  • http://search.cpan.org/~oesterhol/Wx-Polygon-0.06/Polygon.pm

Wx::Polygon Tags


Wx::Polygon Description

Wx::Polygon can draw and manipulate polygons for wxPerl. Wx::Polygon can draw and manipulate polygons for wxPerl.ABSTRACTThis module provides functions for manipulating polygons in wxPerl.new( POLYGON = (Wx::Point,...) | ELLIPSE => (x_offset,y_offset,width,heigth) ) --> Wx::Polygon>Instantiates a new Wx::Polygon with an array of Wx::Points for a given POLYGON or an ellipse with given parameters.add_point(x,y,recalc=1) --> voidAdds a point to the polygon. If scale and rotation have been used, rescales and rerotates the polygon after adding the point. If recalc is set to 0, this will not be done, which is better when a lot of points need added.recalc() --> voidRescales and rerotates the polygon. This method should be used when a lot of points need to be added. Recalculation can than be done after adding the points.set_color(r,g,b) --> voidSets the fill color to wxSOLID with the given r, g and b values.mid() --> (midx:integer,midy:integer)Calculates the middle of the polygon (not point 'z') and returns a list with x and y position.in(x,y) --> booleanCalculates if (x,y) falls within the edges of the polygon. Returns true if so. Uses algorithm of Randolph Franklin, http://astronomy.swin.edu.au/~pbourke/geometry/insidepoly.draw( dc:Wx::DC ) --> voidDraws the polygon at given offsets and with given colour(s) to the current DC.copy() --> Wx::PolygonReturns a copy of the object.scale(scale-factor) --> voidScales the polygon with scale-factor.rotate(degrees) --> voidRotates the polygon by degrees degrees (0-360).offset(x,y) --> voidSets the offset for drawing. This can be used to transpose the polygon. Requirements: · Perl


Wx::Polygon Related Software