Name

scale( ) — scale a polygon

Synopsis

GD::Polygon::scale(hFactor, vFactor)

The scale( ) method will shrink or enlarge a polygon by the given horizontal and vertical factors. Use a fractional factor to shrink a polygon and a positive one to enlarge it. The factor should be in multiples of the current size; for example, $poly->scale(2, 2) will enlarge the polygon proportionately by 200% and $poly->scale(.5, .5) will shrink it by half.

Get Programming Web Graphics with Perl and GNU Softwar now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.