Thank you , Learning One! I fixed it.
I just pushed a new version with some fixes. Some functions were incorrectly named... and I also reduced the number of errors thrown by AHK v2. For some reason, I still get on v2 "invalid index" for ... «PropTags[0x0001] := "GPS LatitudeRef"» [line 3203 in Gdip_GetPropertyTagName()]... and I have no idea how to fix it.
https://github.com/marius-sucan/AHK-GDIp-Library-Compilation
Best regards, Marius.
GDI+ standard library 1.45 by tic
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
Re: GDI+ standard library 1.45 by tic
https://lexikos.github.io/v2/docs/objects/Array.htm < See
You should probably just replace that array with a map.
You should probably just replace that array with a map.
Recommends AHK Studio
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
I used var := {key:value, ... }. Throws no errors now on AHK v2 a104.
I updated the library to v1.58. I fixed other errors as well.
Best regards, Marius.
I updated the library to v1.58. I fixed other errors as well.
Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
Re: GDI+ standard library 1.45 by tic
I mentioned adding #Warn support, previously, i.e. adding in var := 0 and local:
GDI+ standard library 1.45 by tic - Page 14 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=6517&p=267400#p267400
By having #Warn enabled, you spot problems, like the one I found in Gdip_DrawImage:
Sometimes the function proceeds even when ImageAttr is undefined.
GDI+ standard library 1.45 by tic - Page 14 - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=6517&p=267400#p267400
By having #Warn enabled, you spot problems, like the one I found in Gdip_DrawImage:
Sometimes the function proceeds even when ImageAttr is undefined.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
@jeeswg . Okay, thank you . I will check this.
I pushed a new update: v1.60. It adds 37 new GDI+ functions.
More to come...
Best regards, Marius.
I pushed a new update: v1.60. It adds 37 new GDI+ functions.
Spoiler
Link: https://github.com/marius-sucan/AHK-GDIp-Library-CompilationMore to come...
Best regards, Marius.
Last edited by robodesign on 10 Sep 2019, 13:59, edited 1 time in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
Re: GDI+ standard library 1.45 by tic
Nice job pulling all of these together, Marius. I don't see Masterfocus' Gdip_ImageSearch in your compilation, so you might want to add that.robodesign wrote: ↑21 Aug 2019, 08:04If you guys know of other functions, threads related to GDI+ that should be included, please let me know .
Re: GDI+ standard library 1.45 by tic
Why is there still Ptr := A_PtrSize ? "UPtr" : "UInt" in nearly every function? There is no need for this.
Use for handles or pointers -> ptr(*) or uptr
Use for handles or pointers -> ptr(*) or uptr
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
Yes, I'm aware of this. However it's a very daunting task to remove all those... I prefer working on adding additional support for gdip APIs.
I'll look into master's focus image search function. When I collected functions... I skipped over those that use machine code as none worked on my end.
Now I'm implementing new functions. Yesterday I implemented 37 new functions, and I have left about 250. I don't know if I'll go through all of them.
Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
Hello!
Finished implementing 36 new GDI+ functions:
When I grow tired, I will create an additional section in the readme.md file with the list of functions and parameters, grouped by GDI+ classes.
Link: https://github.com/marius-sucan/AHK-GDIp-Library-Compilation .
Best regards, Marius.
Finished implementing 36 new GDI+ functions:
Spoiler
Still more to come...When I grow tired, I will create an additional section in the readme.md file with the list of functions and parameters, grouped by GDI+ classes.
Link: https://github.com/marius-sucan/AHK-GDIp-Library-Compilation .
Best regards, Marius.
Last edited by robodesign on 10 Sep 2019, 14:00, edited 2 times in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
As promised... 27 new GDI+ functions implemented:
I want AHK users to enjoy a rich GDI+ APIs wrapper...
Best regards, Marius.
Spoiler
More to come...I want AHK users to enjoy a rich GDI+ APIs wrapper...
Best regards, Marius.
Last edited by robodesign on 10 Sep 2019, 14:01, edited 1 time in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
Today, I managed to implement only 14 new functions...
Best regards, Marius.
Spoiler
Still.... more planned.Best regards, Marius.
Last edited by robodesign on 10 Sep 2019, 14:01, edited 1 time in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
Hello, guys!
12 new functions:
Best regards, Marius.
12 new functions:
Spoiler
Is anyone interested in fonts and drawing texts through GDI+ ? Should I implement API functions related to this?Best regards, Marius.
Last edited by robodesign on 10 Sep 2019, 14:02, edited 1 time in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
Hello, guys!
Added 17 new functions:
Link: https://github.com/marius-sucan/AHK-GDIp-Library-Compilation
I will also try to add new example(s) featuring some of the new capabilities.
Best regards, Marius.
Added 17 new functions:
Spoiler
About 20 to 30 functions still to be added are planned. Mostly Text/Fonts related ones and perhaps a few related to ImageAttributes and others...Link: https://github.com/marius-sucan/AHK-GDIp-Library-Compilation
I will also try to add new example(s) featuring some of the new capabilities.
Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
Hi, guys!
Another batch of new GDI+ functions implemented. This time 17 new functions.
Best regards, Marius.
Another batch of new GDI+ functions implemented. This time 17 new functions.
Spoiler
Just a few functions left planned to implement related to fonts/text drawing. I will try to create a function to easily write texts vertically... After this, some ImageAttributes goodies. Then, kaputt. ;-).Best regards, Marius.
Last edited by robodesign on 11 Sep 2019, 13:57, edited 2 times in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
Re: GDI+ standard library 1.45 by tic
Hi @robodesign
You might want to add the function below to your library. I found it useful in a couple of scripts.
You might want to add the function below to your library. I found it useful in a couple of scripts.
Code: Select all
; DashStyleSolid = 0
; DashStyleDash = 1
; DashStyleDot = 2
; DashStyleDashDot = 3
; DashStyleDashDotDot = 4
; DashStyleCustom = 5
; https://technet.microsoft.com/pt-br/ms534104(v=vs.71).aspx
Gdip_SetPenDashStyle(pPen, DashStyle) {
Return DllCall("Gdiplus.dll\GdipSetPenDashStyle", "Ptr", pPen, "Int", DashStyle)
}
Windows 10 Pro (64 bit) - AutoHotkey v2.0+ (Unicode 64-bit)
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
@iPhilip . Thank you . I will add it. If you have any other functions, please let me know . [this applies to anyone else]
Best regards, Marius.
Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
Re: GDI+ standard library 1.45 by tic
I think here is error::
After open clipboard You always have to close it.
Code: Select all
Gdip_CreateBitmapFromClipboard() {
Ptr := A_PtrSize ? "UPtr" : "UInt"
if !DllCall("IsClipboardFormatAvailable", "uint", 8)
return -2
if !DllCall("OpenClipboard", Ptr, 0)
return -1
if !hBitmap := DllCall("GetClipboardData", "uint", 2, Ptr)
return -3
if !pBitmap := Gdip_CreateBitmapFromHBITMAP(hBitmap)
return -4
if !DllCall("CloseClipboard")
return -5
DeleteObject(hBitmap)
return pBitmap
}
Re: GDI+ standard library 1.45 by tic
Hi @robodesign,
I noticed a possible error in your library.
I noticed a possible error in your library.
Code: Select all
Gdip_CreateHICONFromBitmap(pBitmap) {
pBitmap := "" ; <--- I think this line should not be here
hIcon := 0
DllCall("gdiplus\GdipCreateHICONFromBitmap", A_PtrSize ? "UPtr" : "UInt", pBitmap, A_PtrSize ? "UPtr*" : "uint*", hIcon)
return hIcon
}
Windows 10 Pro (64 bit) - AutoHotkey v2.0+ (Unicode 64-bit)
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
@iPhilip . True. It is an error inherited from mmikeww's GDI+ lib edition. I will have it fixed in the next update [today or tomorrow ]. Thanks very much for spotting the error.
@malcev . This bug is inherited from Tic's GDI+ library edition. I fixed it now. Thank you as well for spotting this.
Best regards, Marius.
@malcev . This bug is inherited from Tic's GDI+ library edition. I fixed it now. Thank you as well for spotting this.
Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
-
- Posts: 932
- Joined: 30 Sep 2017, 03:59
- Location: Romania
- Contact:
Re: GDI+ standard library 1.45 by tic
Hi, again!
V1.68 is here with 10 new functions.
I am almost ready now to implement ImageAttributes related functions. This is the last area of GDI+ APIs I will focus on. The GDI+ GraphicsPathIterator and Metafile APIs represent no interest for me. These are the only two «major areas» entirely missing from this GDI+ library wrapper.
Link: https://github.com/marius-sucan/AHK-GDIp-Library-Compilation
Best regards, Marius.
V1.68 is here with 10 new functions.
Spoiler
I also made fixes/changes based on the observations I got from Malcev and iPhilip. Thanks again. Please let me know if the changes to the clipboard function are satisfactory.I am almost ready now to implement ImageAttributes related functions. This is the last area of GDI+ APIs I will focus on. The GDI+ GraphicsPathIterator and Metafile APIs represent no interest for me. These are the only two «major areas» entirely missing from this GDI+ library wrapper.
Link: https://github.com/marius-sucan/AHK-GDIp-Library-Compilation
Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 77 guests