Skip Menu |

This queue is for tickets about the GD CPAN distribution.

Report information
The Basics
Id: 17996
Status: open
Priority: 0/
Queue: GD

People
Owner: Nobody in particular
Requestors: markem [...] airmail.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 2.31
Fixed in: (no value)



Subject: New Feature
I do not know if you are taking wishlists still or not. Here is a function we have found useful in the graphics lab where I work: Clear( void ); You use it to reset everything back to its initial value. It is useful in such things as GD::Polygon where it would remove all points and reset the polygon's original state. It could also be used in the other GD.pm areas to do the same thing. Presently I do the following: while( $poly->length > -1 ){ $poly->deletePt(0); } Which does pretty much the same thing. So this is a convinence routine really but it does come in handy. It makes it so you can easily reuse your originally created polygon. Just a wishlist item. But I will say pretty please if you wish. :-)
From: markem [...] airmail.net
There needs to be one correction to my suggestion. You can't use minus one (-1) - it has to be zero (0) for the test or else you get into an infinite loop. So it should be: while( $poly->length > 0 ){ $poly->deletePt(0); } Just something I thought I should post (after having been caught in the endless loop myself a couple of times and going "What the heck?" and scratching my head).