Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: GD, arrays, and Polygons

by pfaut (Priest)
on Mar 23, 2003 at 17:25 UTC ( #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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2021-04-23 08:31 GMT
Find Nodes?
    Voting Booth?

    No recent polls found