Clone un objet Matrix
#include <GDIPlus.au3>
_GDIPlus_MatrixClone ( $hMatrix )
$hMatrix | Handle de l'objet Matrix |
Succ�s: | Retourne le handle du nouvel objet Matrix clon� |
�chec: | Retourne 0 et d�finit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*). |
Lorsque vous en avez termin� avec l'objet, appelez _GDIPlus_MatrixDispose() pour lib�rer les ressources de l'objet
Consultez GdipCloneMatrix dans la Librairie MSDN.
#include <GDIPlus.au3> #include <GUIConstantsEx.au3> Example() Func Example() Local $hGUI, $hGraphic, $hPen, $hPath, $hMatrix_Scale, $hMatrix_Clone, $hMatrix_Rotate ; Cr�e une GUI $hGUI = GUICreate("GDI+", 600, 600) GUISetState(@SW_SHOW) _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) ; Cr�e un objet graphique � partir du handle de la fen�tre _GDIPlus_GraphicsSetSmoothingMode($hGraphic, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ; D�finit pour l'objet graphique la qualit� de rendu antialiasing _GDIPlus_GraphicsClear($hGraphic, 0xFF000000) $hPen = _GDIPlus_PenCreate(0xFFFFBB00, 2) $hPath = _GDIPlus_PathCreate() _GDIPlus_PathAddArc($hPath, 0, 0, 600, 600, 0, 45) $hMatrix_Scale = _GDIPlus_MatrixCreate() _GDIPlus_MatrixTranslate($hMatrix_Scale, -300, -300) _GDIPlus_MatrixScale($hMatrix_Scale, 0.9, 0.9, True) $hMatrix_Rotate = _GDIPlus_MatrixCreate() _GDIPlus_MatrixRotate($hMatrix_Rotate, 40, True) For $i = 1 To 32 $hMatrix_Clone = _GDIPlus_MatrixClone($hMatrix_Scale) _GDIPlus_MatrixMultiply($hMatrix_Clone, $hMatrix_Rotate, 1) _GDIPlus_MatrixTranslate($hMatrix_Clone, 300, 300, True) _GDIPlus_PathTransform($hPath, $hMatrix_Clone) _GDIPlus_MatrixDispose($hMatrix_Clone) _GDIPlus_GraphicsDrawPath($hGraphic, $hPath, $hPen) Next ; Boucle jusqu'� ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Nettoie les ressources _GDIPlus_MatrixDispose($hMatrix_Rotate) _GDIPlus_MatrixDispose($hMatrix_Scale) _GDIPlus_PathDispose($hPath) _GDIPlus_PenDispose($hPen) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() EndFunc ;==>Example