Drawing a general ellipse on a transparent clickthrough window

Get help with using AutoHotkey and its commands and hotkeys
slupka
Posts: 1
Joined: 09 Aug 2020, 05:49

Drawing a general ellipse on a transparent clickthrough window

09 Aug 2020, 06:39

Hello, I am trying to draw an ellipse onto a transparent clickthrough window. (E0x20) The trouble is that I need to perform projective transformation on the ellipse first. (In the script I perform photogrammetry on the screen to reconstruct the 3 point perspective. Then I'd like to draw an ellipse onto a given well defined plane.) Therefore my ellipse is given by symmetric bilinear form in homogenous coordinates. I can convert it to any required form or extract any metric properties if I need them though. (Gotta thank the author here: https://autohotkey.com/board/topic/80487-ahk-l-matrix-class/ for saving me a lot of time.)

At first I tried an approach here: https://www.autohotkey.com/boards/viewtopic.php?t=59128 which worked well enough for my needs, but I found no way to rotate the drawn ellipse rgns.

Then I tried to work with the gdi+ library here https://www.autohotkey.com/boards/viewtopic.php?f=6&t=6517 which offers some transformations, but it uses something called layered window and I can't seem to be able to find what it is. I also cannot click through the drawn elipses. It also doesn't seem to allow me to apply a general matrix on the source ellipse (that I can draw easily).

I have solid math background but I am getting into theese graphic applications just now so everything is really new for me.

My questions are (I'll appreciate answers to any of those): Is there any way to draw a conic in symmetric bilinear form directly on screen or do I need to extract the basic transformations and properties from it?
Can I somehow apply a general matrix on a known ellipse in the drawing process instead of precomputing the ellipse in the script? It sounds like it should be possible but maybe I am asking wrong.
Is there any simpler solution for drawing a general ellipse I don't know about because I don't know what to search for?
What would you suggest?

Thanks for your time. I'll really appreciate any and all replies.
User avatar
littlegandhi1199
Posts: 187
Joined: 29 Aug 2016, 23:58

Re: Drawing a general ellipse on a transparent clickthrough window

12 Aug 2020, 22:51

You could look through this for examples.
I'm messing with GDI as well right now but not drawing on the screen.
You seem to start a GUI in which you define that style you wanted (click through) then apply to it.

https://github.com/tariqporter/Gdip

Gdip.Tutorial.1-Draw.Shapes
on line 28 is what I'm referencing regarding the setting up of the window's properties you would draw on I think.

These are really really old examples though. Be warned they might not work anymore but I bet you'll still learn something.
Script Backups on every Execution :mrgreen:
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( :crazy: # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285
User avatar
littlegandhi1199
Posts: 187
Joined: 29 Aug 2016, 23:58

Re: Drawing a general ellipse on a transparent clickthrough window

12 Aug 2020, 23:55

Actually here's someone doing something with GDIP that is very up to date.

https://www.autohotkey.com/boards/viewtopic.php?f=76&t=79716

Edit his line

Code: Select all

Gui WinA: -Caption +E0x80000 +LastFound +ToolWindow +AlwaysOnTop +OwnDialogs
and add that fancy click through window style there. See what it does for you
Script Backups on every Execution :mrgreen:
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=75767&p=328155#p328155

Scrabble Solver 4-15 letter word outputs ( :crazy: # of inputs)
https://www.autohotkey.com/boards/viewtopic.php?f=19&t=34285

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], GreatGreen, Peaceful, Xtra and 47 guests