Fibonacci word/fractal: Difference between revisions

Content deleted Content added
Kon (talk | contribs)
Kon (talk | contribs)
Line 34: Line 34:


hwnd1 := WinExist(), hbm := CreateDIBSection(Width, Height), hdc := CreateCompatibleDC()
hwnd1 := WinExist(), hbm := CreateDIBSection(Width, Height), hdc := CreateCompatibleDC()
obm := SelectObject(hdc, hbm), G := Gdip_GraphicsFromHDC(hdc), Gdip_SetSmoothingMode(G, 4)
, obm := SelectObject(hdc, hbm), G := Gdip_GraphicsFromHDC(hdc), Gdip_SetSmoothingMode(G, 4)
pPen := Gdip_CreatePen(0xffff0000, 3)
, pPen := Gdip_CreatePen(0xffff0000, 3)


Loop, Parse, W
Loop, Parse, W
Line 41: Line 41:
if (d = 0)
if (d = 0)
x2 := x1 + p, y2 := y1
x2 := x1 + p, y2 := y1
if (d = 1 || d = -3)
else if (d = 1 || d = -3)
x2 := x1, y2 := y1 - p
x2 := x1, y2 := y1 - p
if (d = 2 || d = -2)
else if (d = 2 || d = -2)
x2 := x1 - p, y2 := y1
x2 := x1 - p, y2 := y1
if (d = 3 || d = -1)
else if (d = 3 || d = -1)
x2 := x1, y2 := y1 + p
x2 := x1, y2 := y1 + p
Gdip_DrawLine(G, pPen, x1, y1, x2, y2)
Gdip_DrawLine(G, pPen, x1, y1, x2, y2)