Function Reference


Updates a matrix with the product of itself and a scaling matrix

#include <GDIPlus.au3>
_GDIPlus_MatrixScale ( $hMatrix, $fScaleX, $fScaleY [, $bOrder = False] )


$hMatrix Handle to a Matrix object
$fScaleX Multiplier to scale the x-axis
$fScaleY Multiplier to scale the y-axis
$bOrder [optional] Specifies the order of the multiplication:
    True - Specifies that the scaling matrix is on the left
    False - Specifies that the scaling matrix is on the right

Return Value

Success: True.
Failure: False and sets the @error flag to non-zero, @extended may contain GPSTATUS error code ($GPID_ERR*).

See Also

Search GdipScaleMatrix in MSDN Library.


#include <GUIConstantsEx.au3>
#include <ScreenCapture.au3>
#include <WinAPI.au3>

; Create GUI
Local $hWnd = GUICreate("GDI+ Example (" & @ScriptName & ")", 500, 500)

; Start GDI+
Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hWnd)

; Take Screenshot at bottom left of screen
Local $hScreenCap_hBitmap = _ScreenCapture_Capture("", 0, @DesktopHeight - 500, 500, @DesktopHeight)
Local $hScreenCap_Bitmap = _GDIPlus_BitmapCreateFromHBITMAP($hScreenCap_hBitmap)

Local $hMatrix = _GDIPlus_MatrixCreate()
; Scale the matrix by 2 (everything will get 2x larger)
_GDIPlus_MatrixScale($hMatrix, 2.0, 2.0)

_GDIPlus_GraphicsSetTransform($hGraphics, $hMatrix)
_GDIPlus_GraphicsDrawImageRect($hGraphics, $hScreenCap_Bitmap, 0, 0, 500, 500)


; Clean up resources