Sierpinski triangle/Graphical: Difference between revisions

Updated D entry
(added autohotkey)
(Updated D entry)
Line 373:
The output image is the same as the Go version. This requires the module from the Grayscale image Task.
{{trans|Go}}
<lang d>importvoid grayscale_image;main() {
import grayscale_image;
 
void main() {
enum order = 8,
margin = 10,
Line 383:
im.clear(Gray.white);
 
foreach (immutable y; 0 .. width)
foreach (immutable x; 0 .. width)
if ((x & y) == 0)
im[x + margin, y + margin] = Gray.black;