_3D_ wrote:Code: Select all
; Gdip standard library v1.45 by tic (Tariq Porter) 07/09/11
; Modifed by Rseding91 using fincs 64 bit compatible Gdip library 5/1/2013
; Corrected by _3D_ (A_PtrSize incorect use) 2/22/2014
; Supports: v2.0 (syntax v2.0 by _3D_) 2/27/2014
; v2.081 (syntax v2.0 by _3D_) 8/28/2017
; v2.096 (syntax v2.0 by _3D_) 5/14/2018
Gdip_BitmapFromScreen(Screen:=0, Raster:="") {
...
} else if (Screen is "number" && Screen & 1 != "") { ;AutoHotkey_2.0-a096-2ad11cb
MonitorGet(Screen, x, y, w, h)
w -= x, h -= y
}
...
}
As I said compatible.
we are maintaining a v1/v2 compatible GDIP library here:
https://github.com/mmikeww/AHKv2-Gdip
this looks like one of the changes we need to make. this BitmapFromScreen() function allows the "Screen" param to either be:
1. "0" for all screens
2. "hwnd:" for a specific window
3. any number, for a specific monitor
4. "p|i|p|e" separated string for a specific screen area
this particular
Screen&1 != "" seems to just be verifying case #3 above, that its a numbered of a screen. wouldnt just
Screen is "number" be sufficient? and we can remove the bitwise-AND altogether? of course to be backwards compatible with v1 we'd do the same as this:
https://github.com/mmikeww/AHKv2-Gdip/b ... .ahk#L2773
by the way, there are two other places that do
if (Matrix&1 = "") in other functions, which maybe we can just replace with
if Matrix is not number
and if you have other changes please advise or submit a pull request