Bitmap/Bresenham's line algorithm: Difference between revisions
Content added Content deleted
(add Ruby) |
m (→{{header|Ruby}}: update example) |
||
Line 837: | Line 837: | ||
end |
end |
||
bitmap = Pixmap.new( |
bitmap = Pixmap.new(500, 500) |
||
bitmap. |
bitmap.fill(RGBColour::BLUE) |
||
10.step(430, 60) do |a| |
|||
⚫ | |||
bitmap.draw_line(Pixel[ |
bitmap.draw_line(Pixel[10, 10], Pixel[490,a], RGBColour::YELLOW) |
||
bitmap.draw_line(Pixel[ |
bitmap.draw_line(Pixel[10, 10], Pixel[a,490], RGBColour::YELLOW) |
||
end |
|||
⚫ | |||
=={{header|Tcl}}== |
=={{header|Tcl}}== |