Function Reference


Updates a matrix with the product of itself and another matrix

#include <GDIPlus.au3>
_GDIPlus_MatrixShear ( $hMatrix, $fShearX, $fShearY [, $iOrder = 0] )


$hMatrix Pointer to a Matrix object
$fShearX Real number that specifies the horizontal shear factor
$fShearY Real number that specifies the vertical shear factor
$iOrder [optional] Order of matrices multiplication:
    0 - The passed matrix is on the left
    1 - The passed matrix is on the right

Return Value

Success: True.
Failure: False.

See Also

Search GdipShearMatrix in MSDN Library.


#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>


Func Example()
    Local $hGUI, $hGraphic, $hBrush, $hPen, $hPath, $hFamily, $tLayout, $hMatrix

    ; Create GUI
    $hGUI = GUICreate("GDI+", 520, 160)

    ; Draw a string using path
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) ;Create a graphics object from a window handle
    $hBrush = _GDIPlus_BrushCreateSolid(0xFFDD2200)
    $hPen = _GDIPlus_PenCreate(0xFFFFBB00, 2)

    $hPath = _GDIPlus_PathCreate() ;Create new path object

    $hFamily = _GDIPlus_FontFamilyCreate("Arial") ;Create font family object
    $tLayout = _GDIPlus_RectFCreate() ;Create string bounding rectangle X=0, Y=0
    _GDIPlus_PathAddString($hPath, "AutoIt rulez!", $tLayout, $hFamily, 0, 72, 0) ;Add the outline of the string to the path

    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixShear($hMatrix, 0.8, 0.1)
    _GDIPlus_PathTransform($hPath, $hMatrix)

    _GDIPlus_GraphicsSetSmoothingMode($hGraphic, 2) ;Sets the graphics object rendering quality (antialiasing)
    _GDIPlus_GraphicsClear($hGraphic, 0xFF000000)
    _GDIPlus_GraphicsFillPath($hGraphic, $hPath, $hBrush) ;Fill path to graphics handle (GUI)
    _GDIPlus_GraphicsDrawPath($hGraphic, $hPath, $hPen) ;Draw path to graphics handle (GUI)

    ; Loop until the user exits.
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Clean up resources
EndFunc   ;==>Example