Bitmap/Bresenham's line algorithm: Difference between revisions

m
→‎{{header|F#}}: use libheader template
m (→‎{{header|F#}}: use libheader template)
Line 357:
loop (e-dy) (x+1) y
loop (dx/2) x0 y0</lang>
The following program tests the above bresenham function by drawing 100 lines into an image and visualizing the result using Windows Presentation Foundation:
{{libheader|Windows Presentation Foundation}}:
<lang fsharp>open System.Windows
open System.Windows.Media.Imaging
Line 375 ⟶ 376:
Window(Content=image, Title="Bresenham's line algorithm")
|> (Application()).Run |> ignore</lang>
 
=={{header|Forth}}==
<lang forth>defer steep \ noop or swap
Anonymous user