Page 2 of 2

Re: Drawing & Handwriting Objects. Great for touchscreen dev

Posted: 13 Nov 2013, 12:50
by TLM
I have to revisit this whole project. Will get back to you v.soon on whether random font colors are supported.

Re: Drawing & Handwriting Objects. Great for touchscreen dev

Posted: 08 Apr 2015, 00:13
by Avi
Hi @TLM

Is there a way to draw on the InkPicture control from the script side ?
I am in need to mark some coordinates on the InkPicture (or any) control from the script side. I did look in the reference but didn't find anything of interest.

EDIT - Don't bother. I can always create an image with either GDI+ or Gflax and then use the picture control to display it.

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Posted: 01 Jan 2022, 06:47
by LAPIII
Can you help me make this resizable:

Code: Select all

#SingleInstance,Force
Gui Add, Text,, Use handwriting recognition below (write letters and wait a bit)
GUI Add, ActiveX, xm w1536 h864 vink, InkEd.InkEdit.1
ink.UseMouseForInput := 1
ink.InkInsertMode := 0
Gui, Show, AutoSize
Return

GuiClose:
ExitApp
[EDIT] In the docs, GUI mentions the subcommand Resize which makes the window resizable and enables its maximize button in the title bar.

Happy New Year!

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Posted: 01 Jan 2022, 12:29
by rommmcek
Try this:

Code: Select all

#SingleInstance,Force
Gui +Resize -DPIScale
Gui Add, Text,, Use handwriting recognition below (write letters and wait a bit)
;GUI Add, ActiveX, xm w1536 h864 vink, InkEd.InkEdit.1
GUI Add, ActiveX, % "hwndhAx xm w" A_ScreenWidth/2 " h" A_ScreenHeight/2 " vink", InkEd.InkEdit.1
ink.UseMouseForInput := 1
ink.InkInsertMode := 0
Gui, Show, AutoSize
Return

GuiSize:
    GuiControl, Move, % hAx, % "w" A_GuiWidth-30 " h" A_GuiHeight-50
Return

GuiEscape:
GuiClose:
ExitApp

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Posted: 08 Jan 2022, 13:58
by LAPIII
Thank you @rommmcek. Can you help me increase the font? In InkEd Control the 2 relevant Members are:

Font Gets or sets the font of the text that the InkEdit control displays

SelFontSize Gets or sets the font size of the selected text within the InkEdit control (run time only).

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Posted: 08 Jan 2022, 18:54
by lblb
@LAPIII

Some stuff you may find useful:

Code: Select all

ink.Font.Name := "Times New Roman"
ink.Font.Size := 16
ink.Font.Bold := true
ink.Font.Italic := true
ink.Font.Underline := true
ink.RecognitionTimeout := 1000

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Posted: 28 Jan 2022, 06:36
by labrint
This is great stuff, but how do I save the drawing to a png or jpg?

I need this to insert a signature to a database.

Re: Drawing & Handwriting Objects. Great for touchscreen devices

Posted: 28 Jan 2022, 10:08
by LAPIII
@labrint, alternatively could use Microsoft Whiteboard and export by clicking the hamburger menu to the far right of the screen and then choose Export. Here's what it looks like:

Image

You can adjust the size by cropping when you open it with Windows Photos.

[EDIT]nonetheless I would like a drawing app in AHK.