Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: GD, arrays, and Polygons

by pfaut (Priest)
on Mar 23, 2003 at 17:25 UTC ( [id://245291]=note: print w/replies, xml ) Need Help??


in reply to GD, arrays, and Polygons

You execute the first loop twice with $x set to 0 and 1. You build entries 0 and 1 in @para1 and @para2. When you leave the first loop, $x = 2. You then attempt to execute the second loop with $x set to 2 but you never defined that entry in the arrays. Move the decrement to the beginning of the loop.

while ($x >= 0){ $x--; $image->filledPolygon($para1[$x], $black); $image->filledPolygon($para2[$x], $yellow); }
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';

Replies are listed 'Best First'.
Re: Re: GD, arrays, and Polygons
by neilwatson (Priest) on Mar 23, 2003 at 17:38 UTC
    Ack, I'm spending to much time performing Windows support. Thanks.

    Neil Watson
    watson-wilson.ca

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://245291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-25 04:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found