Image Drawing and Manipulation Methods

For all the drawing methods, the coordinate system is defined with (0, 0) as the upper left corner of the image and the x and y values increasing to the right and down. In general, when a method takes a color as a parameter, you should pass the index of a color previously allocated with one of the methods described in the earlier section Color Table Manipulation Methods, or use one of the special color constants.

The drawing and manipulation methods are as follows.

Get Perl Graphics Programming 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.