https://en.wikipedia.org/wiki/9-slice_scaling
-
Scale9_BitmapToBitmap(pBitmap, NewWidth, NewHeight, SizeArray, bDisposeImage := true)
-
Scale9_FileToBitmap(FileName, NewWidth, NewHeight, SizeArray)
-
Scale9_BitmapToHBitmap(pBitmap, NewWidth, NewHeight, SizeArray, bDisposeImage := true, Background=0xffffffff)
-
Scale9_FileToHBitmap(FileName, NewWidth, NewHeight, SizeArray, Background=0xffffffff)
The parameter SizeArray
is an 4 values array: [LeftSize, TopSize, RightSize, BottomSize]
#Include <Gdip_All>
pToken := Gdip_Startup()
hBitmap := Scale9_FileToHBitmap("test.png", 400, 400, [40,41,43,43])
Gdip_Shutdown(pToken)
Gui, Add, Pic,, HBITMAP:%hBitmap%
Gui, Show