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

Re: Changing setpixel size using GD.pm

by myocom (Deacon)
on Aug 22, 2001 at 05:10 UTC ( #106848=note: print w/ replies, xml ) Need Help??


in reply to Changing setpixel size using GD.pm

You can't make the pixel size any larger ("pixels is pixels"), so instead, what you'll want to do is write a function that will color the pixel of choice and the pixels around it (to make, say, a 3x3 pixel "block"). Think of the square as a grid of pixels, and it's easy to figure out the coordinates of the surrounding pixels.

Warning: Your function will need to deal with boundary conditions (e.g., what happens when you try to color all of the pixels that surround the pixel at 0,0?).

"One word of warning: if you meet a bunch of Perl programmers on the bus or something, don't look them in the eye. They've been known to try to convert the young into Perl monks." - Frank Willison


Comment on Re: Changing setpixel size using GD.pm

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2014-07-29 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls