Anonymous user
Raster graphics operations/Ruby: Difference between revisions
Raster graphics operations/Ruby (view source)
Revision as of 23:12, 14 September 2009
, 14 years ago→The Code: improve iterat
m (→The Code: add each_pixel iterator) |
m (→The Code: improve iterat) |
||
Line 115:
def each_pixel
if block_given?
@height.times {|y| @width.times {|x| yield x,y}}
else
to_enum(:each_pixel)
end
end
|