Code Monkey home page Code Monkey logo

live-draw's Introduction

LiveDraw

A tool allows you to draw on screen real-time.

Why?

When you need to draw or mark something with presentation, you may use some tools like Windows Ink Workspace, but all of them are actually taking a screenshot and allowing you to draw on it. That's actually annoying when you want to presentation something dynamic.

However, LiveDraw is here and built for it!

Interface

Usage

The shortcuts that can be used:

  • [ Z ] Undo, [ Y ] Redo,
  • [ E ] Eraser By Stroke, [ D ] Eraser By Point,
  • [ R ] Release or Recover interface,
  • [ + ] Increase size brush, [ - ] Decrease size brush
  • [ B ] Brush mode, [ L ] Line Mode

Downloads

Release

Requirements

  • Windows OS
  • .Net Core 5 x86/x64

Features

  • True transparent background (you can draw freely even when you are watching videos).
  • Select colors by simply clicks.
  • Adjust the size of brush.
  • Draw ink with pressure (when using a pen with pen pressure).
  • Auto smooth ink.
  • Mini mode.
  • Unlimited undo/redo.
  • Freely drag the palette.
  • Save and load ink to file (binary file) with color.
  • Temporarily disable draw then you can be able to operate other windows.
  • Fully animated.

Todo

  • Edge docking
  • Export as image files
  • Mouse penetration

Publish

  • dotnet publish -c Release -r win-x86 -p:PublishSingleFile=true
  • dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true

License

MIT

live-draw's People

Contributors

ab28dev avatar antfu avatar boehs avatar gaiatux avatar imgbotapp avatar nle244 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

live-draw's Issues

System compatibility

Hey there,
I didn't see it specifically mentioned, is this Windows only, or would this be compatible with Linux as well?

Thanks,
-MH

BUG in Release v0.1.1 & LiveDraw v0.1.2 (x86 and x64)

User can draw straight lines without even selecting the option after they have disabled the tool. Provided that they start from somewhere there already exist ink on screen and end somewhere else where ink is present.

@Gaiatux Kindly check this issue. You will be able to solve the bug easily as you implemented this feature.

How to install

How do I install this app? Win 10. Running the .bat starts something but then there is no app running anywhere...

Global hotkeys (With Code)

Clear and concise description of the problem

A global hotkey would be useful for enabling/disabling the app whether its in focus or not
I have already wrote the code for this, just remove.txt and it will work as of 08/08/2023 source code

Suggested solution

Entire working MainWindow.xaml.cs file: MainWindow.xaml.cs.txt

Alternative

Just the changed code:

        // imports
        [DllImport("user32.dll")]
        private static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);

        [DllImport("user32.dll")]
        private static extern bool UnregisterHotKey(IntPtr hWnd, int id);

        private IntPtr windowHandle;
        private HwndSource source;


        // under lifetime
        protected override void OnContentRendered(EventArgs e)
        {
            base.OnContentRendered(e);

            SetupHotkeys();
        }

        private void Exit(object sender, EventArgs e)
        {
            if (IsUnsaved())
                QuickSave("ExitingAutoSave_");

            source.RemoveHook(HwndHook);
            UnregisterHotKey(windowHandle, 1200);

            Application.Current.Shutdown(0);
        }


        // Under shortcuts
        private void SetupHotkeys()
        {

            windowHandle = new WindowInteropHelper(this).Handle;
            source = HwndSource.FromHwnd(windowHandle);
            source.AddHook(HwndHook);

            RegisterHotKey(windowHandle, 2300, 0x0001 | 0x0004, 0x52); //ALT + SHIFT + R - Enable/disable hotkey when not focused
        }

        private IntPtr HwndHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
        {
            const int WM_HOTKEY = 0x0312;
            switch (msg)
            {
                case WM_HOTKEY:
                    switch (wParam.ToInt32())
                    {
                        case 2300:
                            SetEnable(!_enable);
                            handled = true;
                            break;
                    }
                    break;
            }
            return IntPtr.Zero;
        }

Validations

Features: New tools like square, circle, lines

Please, add new drawing tools like square, circle, lines (vertical, horizontal, freestyle).
Some other drawing softwares allows you to hold Shift key to draw a perfect horizontal ou vertical line.
It also would be nice if there's a button to take the screenshot and save it to clipboard.

Global shortcut for recover

The keyboard shortcut R is meant to release/recover control of drawing. However, it is not helpful when we try to recover control. Suppose that the Livedraw application is visible on top of a pdf document, but we are not currently annotating anything. Instead, we are currently interacting with the document, for example, we might be scrolling through the pages of a pdf document. Now we wish to recover the control of drawing and begin to annotate. If we click on the R button, nothing happens. This is because the document is still the currently focused window. The R input is passed to the document instead of passing it to the Livedraw application. Hence, we cannot recover control of drawing.

Now if we switch to the Livedraw application from the Taskbar or by using Alt+Tab, then clicking the R button immediately activates the drawing mode. But this is inconvenient.

So we require that Livedraw is constantly listening to all keystrokes, and whenever we type the recover keystroke, it activates the drawing mode immediately. The R button is not a good keystroke for recovering control. This is because we might be typing in a Word document, where typing the letter R happens frequently. So we need some slightly esoteric key combination, such as Ctrl+shift+R or Ctrl+E or something else, which is typically not used by other applications.

The recovery shortcut is the only one that needs to be global (meaning that Livedraw listens for this keystroke even if it is not in focus). All other shortcuts are used when the Livedraw application is in focus, and hence all other shortcuts can be local.

System tray icon

Alternate apps like gink or ppink allow the app to be shown in the system tray, which makes it easier to launch the app and begin annotating quickly. It would be great if livedraw can be similarly minimized and launched from the system tray/notification area.

Toggle for erase by point.

Erase by point only works when we use D shortcut. It would improve usability if it can be done by clicking twice on the eraser icon.

Allow mouse scrolling while annotating

It can be helpful to scroll the document while it is being annotated. For example, we can take a note (annotation by Livedraw) from page 1 of the document, and then scroll to page 5, and then again take some annotation. Currently, we need to release the control after page 1, scroll to the desired page, and then recover control of Livedraw at page 5.

So it would be helpful if we can scroll an underlying document by mouse without needing to release control of Livedraw. This would mean that the mouse would no longer be available for changing the brush size, and the brush size can only be changed by clicking the brush icon or by the arrow buttons. Since changing the brush size is a one-time thing, maybe sacrificing the mouse control for brush size might not be bad, while leaving the mouse for document control.

Error while opening the app

When I open the live-draw app, it gives an error message "To run this application, you must install .NET. Would you like to download it now?" And then it proceeds to the URL https://dotnet.microsoft.com/download/dotnet/5.0/runtime/. Accordingly I install the .NET Desktop Runtime version 5.0.6. But even after the installation, the live-draw app refuses to launch, and continues to show the same error message.

Add White and Black as colors or make colors adjustable

I really like the look and ease of this programm, but it is nearly useless for me without white and black as colors
Would be super nice if one could change these or black and white are options by default
Thank you very much!

SHIFT key for straight lines

Hello, your app is really cool, I use it in my job (building architecture) to sketch over my plans to communicate with my collaborators. It only lacks the possibility of making straight lines with the SHIFT key.
Would it be possible to add this function?
Thank you!

Originally posted by @Gaiatux in #10 (comment)

Draw ink with pressure not working ( cintiq Wacom Tablet )

Hello,
Live Draw is awesome! And I was delighted to read that it is supposed to have pen pressure recognition. Unfortunately the option does not work in my case, I am using a cintiq (wacom tablet) and I cannot get the drawing pressure to work. I have no idea what setting I need to act on for this to work. Any help would be greatly appreciated
thank you again for your time and all the great work already done !

Clicking eraser doesn't disable selecting pen colors.

Clicking eraser doesn't disable selecting pen colors. So it is easily possible to change color of the pen while erasing.

When color of pen is changed while using eraser , the control should be shifted to pen or it should not be possible to do in the first place.

Looking for Collaborators

Hey guys, thank you so much for getting interested in this project!

As you may see this project is me created 5 years ago. For now, I'm no longer using a Windows laptop with a touch screen, which means I am not able to help with testing and bug fixing (or even new releases).

We are having some issue that makes me feel shame as I can't fix them, for example, #8 #5.

So I am looking for collaborators to help out on those issues, with a few requirements:

  • Has a Windows PC with a touch screen
  • Basic knowledge with C# and WPF
  • Able to compile this project and get it working from source
  • Enjoy using this project :)

Leave comments to show me that you can compile this project and I will add you as collaborators of this project, much appreciated! ๐Ÿ™Œ

Doesn't work on multiple monitos

Describe the bug

Capture

The program does not work an all the monitors, and if I change the window to a secondary monitor, I'm just able to draw on a little part of the entire window. also if I move the tools out of that space, it disappears.

Reproduction

Reproducible

System Info

Windows 10

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Possible to add shapes?

hi there
is it possible to add a new feature, to draw shapes? (recktangles, circles, triangles, arrows)
I know ZoomIT can do this, but you cant pause drawing and hide it, to continue later where you stopped. Thats why I love livedraw, because you can pause and hide it, and continue later. Im just missing shapes feature.
well, and if it is not too mch to ask, maybe some more shapes like cloud shapes, heart shapes etc (like, other common shapes that can be used to display different stuff, especially when trying to highlight something, so you have different shapes to group things differently)
and ideally, a help window or a documentation included in the download, where you can look up all shortcuts would be very helpful.

building live-draw project error

@antfu
I'm trying to solve compilation failure. After correcting the framework version to 4.8 in the LiveDraw.csproj I had to install msbuild 2016. Then I was able to compile until an error pointing to line 61 of CornerRadiusAnimation.cs:
public override Type TargetPropertyType => typeof(CornerRadius);

So when I launch build.bat in the Command prompt, it builds until it says:

CornerRadiusAnimation.cs(61,50): error CS1519: Invalid token '=>' in class, struct, or interface member declaration [C:\Users\xxxxx\xxxxx\live-draw-master\live-draw-master\LiveDraw\LiveDraw_i0ybxmcm_wpftmp.csproj]
CornerRadiusAnimation.cs(61,72): error CS1519: Invalid token ')' in class, struct, or interface member declaration [C:
Users\xxxxx\xxxxx\live-draw-master\live-draw-master\LiveDraw\LiveDraw_i0ybxmcm_wpftmp.csproj]

And it returns a Build FAILED.

I don't understand what is going on. I would really like to be able to compile live-draw, the UI is beautifull. I really find it better than others on-screen annotation softwares.
Maybe the code needs a small update? Can you help me with this? I'm not a dev, but I try to solve this. Thanx!

Palm rejection

During annotating, the palm of my hand often touches the screen and causes false annotation. If palm rejection could be added, it would be great!

Shortcut for clear screen

A shortcut (C) for clear screen would be helpful. Currently, I need to search for a bit before hitting the clear screen button. A keyboard shortcut would make the process instantaneous.

how to create shortcuts?

is there any way to create shortcuts? how to press ctrl + 1 to use the pen and ctrl + 2 to activate the eraser?

if there is no, would there be any way to implement it?

I really loved the program it is very good literally the best I have used so far being that I paid $$ 79 for a program with the same purpose and yours is much better, I just really would like to have shortcuts

thank you for your attention

iann ortnau

Which version of .net is required for Windows x64

Installing LiveDraw-0.1.2.x64 on Windows 11 Pro pops up a screen asking me to download .net framework

Clicking on Yes does closes the window and does not do anything
Click on No does closes the windows and does not do anything

I downloaded .net 6.0 from this link and installed the 64 bit version. Then ran LiveDraw-0.1.2.x64 installer which resulted the same behaviour described above
.NET Desktop Runtime 6.0.10

I downloaded .Download .NET Core 3.1 from this link and installed the 64 bit version. Then ran LiveDraw-0.1.2.x64 installer which resulted the same behaviour described above
.NET Desktop Runtime 3.1.30

So which .net do I need?

How to run it?

How to run it? There is no .exe or anything! I really desperately want it.

Provide options for opaque UI background

I understand that the UI's transparent background is a feature, but when there is a lot of activity on the screen (e.g. placing LiveDraw's interface on top of the File Explorer when it's full of filenames), it becomes difficult to locate LiveDraw's interface elements. It would be great to have an option to turn off transparency.

Improve movement of ui

when I try to move the ui it stops after about 10 ms here is a video but I have some c# code so it's way smoother:
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;

    [DllImport("user32.dll")]
    public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);

    [DllImport("user32.dll")]
    public static extern bool ReleaseCapture();

    private void FormMoveable_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
    {
        if (e.Button == MouseButtons.Left)
        {
            ReleaseCapture();
            SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
        }
    }
2021-01-11.13-31-24.mp4

ability to make squares/circles

Hey, I really like live-draw. It's very slick and stylish. I am usually anti-animation but I like them in this case :-) Very well done

I'm looking for a replacement for ZoomIt which is very old a this point.

The one feature I miss from ZoomIt is that you can hold down CTRL and make nice squares or SHIFT to make nice circles (see below for example). Any chance of such a feature in live-draw?

image

Installation Issue - LiveDraw 0.1.2 asks for .NET 5

I tied to install LiveDraw 0.1.2 in Windows 10 21H2.
As it asks for .NET 5, I installed it .NET 5.0 as it is linked by the installer as x64 and x86 for the respectiv installer version of LiveDraw.
Then I installed .Net 6.0.5 x64 and x86.
Whatever I installed, the LiveDraw installer didn't recognize the installed .NET versions and always asked for it again.

I'm not sure what I'm doing wrong, what else I could try.

Thank you in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.