Remplace les coefficients d'une matrice par les coefficients du produit d'elle-même avec une matrice de mise à l'échelle, dans l'ordre spécifié
#include <GDIPlus.au3>
_GDIPlus_MatrixScale ( $hMatrix, $fScaleX, $fScaleY [, $bOrder = False] )
$hMatrix | Handle de l'objet Matrix |
$fScaleX | Multiplicateur de mise à l'échelle suivant l'axe x |
$fScaleY | Multiplicateur de mise à l'échelle suivant l'axe y |
$bOrder | [optionnel] Ordre de multiplication des matrices: True - Indique que la matrice de mise à l'échelle est à gauche False - Indique que la matrice de mise à l'échelle est à droite |
Succès: | Retourne True. |
Échec: | Retourne False et définit @error <> 0, @extended contient le code erreur ($GPID_ERR*). |
Consultez GdipScaleMatrix dans la Librairie MSDN.
#include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <ScreenCapture.au3> #include <WinAPIHObj.au3> ; Crée une GUI Local $hWnd = GUICreate("GDI+ Example", 500, 500) GUISetState(@SW_SHOW) ; Lancer GDI+ _GDIPlus_Startup() Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hWnd) _GDIPlus_GraphicsClear($hGraphics) ; Fait une capture d'écran en bas à gauche de l'écran Local $hScreenCap_hBitmap = _ScreenCapture_Capture("", 0, @DesktopHeight - 500, 500, @DesktopHeight) Local $hScreenCap_Bitmap = _GDIPlus_BitmapCreateFromHBITMAP($hScreenCap_hBitmap) Local $hMatrix = _GDIPlus_MatrixCreate() ; Met à l'échelle la matrice avec un coéfficient 2 (tout sera 2 fois plus grand) _GDIPlus_MatrixScale($hMatrix, 2.0, 2.0) _GDIPlus_GraphicsSetTransform($hGraphics, $hMatrix) _GDIPlus_GraphicsDrawImageRect($hGraphics, $hScreenCap_Bitmap, 0, 0, 500, 500) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Nettoie les ressources _WinAPI_DeleteObject($hScreenCap_hBitmap) _GDIPlus_BitmapDispose($hScreenCap_Bitmap) _GDIPlus_MatrixDispose($hMatrix) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown()