Bitmap/Midpoint circle algorithm: Difference between revisions
m
Regularize non-standard header markup
(Replaced "initImage" by "newImage" (change in "bitmap.nim" interface).) |
Thundergnat (talk | contribs) m (Regularize non-standard header markup) |
||
Line 423:
ENDPROC</lang>
==
Interface:
Line 483:
#undef plot</lang>
==
This extension method extends GenericImage which is very similar to [http://rosettacode.org/wiki/Bitmap#C.23 Bitmap] but instead of using a SetPixel method it uses a "Color this[int x, int y] { get; set; }" property to get and set pixels.
Line 1,161:
viewRGB ((12 12 9 ,: 12 12 6) ; 0 0 255) drawCircles myimg NB. draw two more concentric circles</lang>
==
<lang java>
Line 1,924:
}</lang>
==
<lang ocaml>let raster_circle ~img ~color ~c:(x0, y0) ~r =
|