Drawing Shapes in AHK (Proof-of-Concept)

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Drawing Shapes in AHK (Proof-of-Concept)

24 Aug 2014, 22:44

I wrote a function for someone on one of the AHK forums to get coords based off known coords, length, and angle. I then decided to play into it a bit and draw some shapes. Here's a pretty good demo I made, although, please note that for polygons, it will never have more inner-vectors compared to the outer-vectors, because I wanted it that way   :D

Instructions:
 Run script
 Open a new paint window, full-screen
 The rest should be self-explanatory (starting coords are always the center of the screen)
AHK-Draw Demo
Demo pics
The hotkeys are Shift+1 to bring up the main gui, Shift+2 to instantly interrupt the drawing, Shift+3 to kill the script.

I encourage modification of this code, but request acknowledgement if my function is used elsewhere, thanks!   8-)
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
nnnik
Posts: 4500
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Drawing Shapes in AHK (Proof-of-Concept)

25 Aug 2014, 01:16

Hint GDI+ ;)
Search for gdip
Recommends AHK Studio
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Drawing Shapes in AHK (Proof-of-Concept)

25 Aug 2014, 02:22

nnnik wrote:Hint GDI+ ;)
Search for gdip
xD of course I know about GDI+, I use it sometimes. As stated, just a proof-of-concept. Just a time-waster, something to play with.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: Bing [Bot], Exculty, gero, gwarble and 51 guests