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

Re: Changing setpixel size using

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

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://106848]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2018-07-19 19:54 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (417 votes). Check out past polls.