Fibonacci word/fractal: Difference between revisions
→{{header|AutoHotkey}}: formatting
m (→{{header|J}}) |
(→{{header|AutoHotkey}}: formatting) |
||
Line 13:
=={{header|AutoHotkey}}==
Prints F_Word<sub>30</sub> currently. Segment length and F_Word<sub>n</sub> can be adjusted.
{{libheader|GDIP}}
<lang AutoHotkey>
SetBatchLines, -1
p := 0.3 ; Segment length (pixels)
F_Word := 30
SysGet, Mon, MonitorWorkArea
W := FibWord(F_Word)
d := 1
, Width := A_ScreenWidth, Height := A_ScreenHeight▼
x1 := 0
y1 := MonBottom
Width := A_ScreenWidth
If (!pToken := Gdip_Startup()) {
MsgBox, 48,
ExitApp
}
OnExit,
Gui, 1: -Caption +E0x80000 +LastFound +AlwaysOnTop +ToolWindow +OwnDialogs
Gui, 1: Show, NA
hwnd1 := WinExist
hbm := CreateDIBSection(Width, Height)
hdc := CreateCompatibleDC()
, pPen := Gdip_CreatePen(0xffff0000, 1)▼
obm := SelectObject(hdc, hbm)
G := Gdip_GraphicsFromHDC(hdc)
Gdip_SetSmoothingMode(G, 4)
Loop, Parse, W
Line 58 ⟶ 66:
}
Gdip_DeletePen(pPen
UpdateLayeredWindow(hwnd1, hdc, 0, 0, Width, Height)
SelectObject(hdc, obm)
DeleteObject(hbm)
DeleteDC(hdc)
Gdip_DeleteGraphics(G)
return
Line 69 ⟶ 81:
Esc::
Shutdown:
Gdip_DeletePen(pPen
SelectObject(hdc, obm)
DeleteObject(hbm)
DeleteDC(hdc)
Gdip_DeleteGraphics(G)
Gdip_Shutdown(pToken)
ExitApp</lang>
|