Berechnet den Inhalt eines Matrix-Objekts als Produkt aus sich selbst und einer Skalierungsmatrix neu
#include <GDIPlus.au3>
_GDIPlus_MatrixScale ( $hMatrix, $fScaleX, $fScaleY [, $bOrder = False] )
$hMatrix | Handle auf ein Matrix-Objekt |
$fScaleX | Multiplikator für die Skalierung der X-Achse |
$fScaleY | Multiplikator für die Skalierung der Y-Achse |
$bOrder | [optional] Legt die Reihenfolge der Matrizenmultiplikation fest: True - Legt fest, das die Skalierungsmatrix bei der Multiplikation links steht False - Legt fest, das die Skalierungsmatrix bei der Multiplikation rechts steht |
Erfolg: | True |
Fehler: | False und setzt das @error Flag auf ungleich null, das @extended Flag kann den GPSTATUS-Fehlercode ($GPID_ERR* siehe GDIPlusConstants.au3) enthalten. |
Suche nach GdipScaleMatrix in der MSDN Bibliothek.
#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <ScreenCapture.au3>
#include <WinAPIHObj.au3>
; Erstellt eine GUI
Local $hWnd = GUICreate("GDI+ Beispiel (" & @ScriptName & ")", 500, 500)
GUISetState(@SW_SHOW)
; Startet GDI+
_GDIPlus_Startup()
Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hWnd)
_GDIPlus_GraphicsClear($hGraphics)
; Erstellt einen Screenshot der unteren linken Ecke des Bildschirms
Local $hScreenCap_hBitmap = _ScreenCapture_Capture("", 0, @DesktopHeight - 500, 500, @DesktopHeight)
Local $hScreenCap_Bitmap = _GDIPlus_BitmapCreateFromHBITMAP($hScreenCap_hBitmap)
Local $hMatrix = _GDIPlus_MatrixCreate()
; Verdoppelt die Matrix
_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
; Ressourcen freigeben
_WinAPI_DeleteObject($hScreenCap_hBitmap)
_GDIPlus_BitmapDispose($hScreenCap_Bitmap)
_GDIPlus_MatrixDispose($hMatrix)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()