Matthes-Kdr / pixel-ruler

Easy pixel ruler in python.
GNU General Public License v3.0
2 stars 1 forks source link

New feature: Capture and Export Screenshot from transparent window #9

Open Matthes-Kdr opened 7 months ago

Matthes-Kdr commented 7 months ago

Add the capability to capture and export a screenshot of the current window with an hotkey (e.g. "ctrl" + "p")

General idea / suggestion for the flow:

When user presses the hotkey:

  1. Prepare the window for the screenshot 1.1 titlebar of the window should vanish 1.2 alpha / transparency should become 100% (or 0%) --> so, that the window itself has no background 1.3 important is, that the drawned lines are still displayed

  2. Get directory and capture & save image 2.1 ask via fileDialog for an directory to save the file 2.2 save this path of directory in some variable so that it is known for further screenshots in this session, so that the start-dir for the next fileDialog will be set to this path 2.3 Capture screenshot of current window 2.4 export this screenshot to a png file to the target-path

  3. Re-Prepare the window for further drawings 3.1 (undo all steps of 1.)