UDF > GDIPlus > Graphics >


_GDIPlus_GraphicsSetSmoothingMode

D�finit la qualit� du rendu de l'objet graphique

#include <GDIPlus.au3>
_GDIPlus_GraphicsSetSmoothingMode ( $hGraphics, $iSmooth )

Param�tres

$hGraphics Handle de l'objet Graphics
$iSmooth Le mode de lissage:
    0 - Le lissage n'est pas appliqu�e
    1 - Le lissage est appliqu� � l'aide d'un filtre � bo�te 8 X 4
    2 - Le lissage est appliqu� � l'aide d'un filtre � bo�te 8 X 8

Valeur de retour

Succ�s: Retourne True.
�chec: Retourne False et d�finit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*).

Remarque

Le filtre de lissage appliqu� � l'aide d'un filtre � bo�te 8 X 8 requiert au minimum le syst�me d'exploitation Windows Vista.

En relation

_GDIPlus_GraphicsGetSmoothingMode

Voir aussi

Consultez GdipSetSmoothingMode dans la Librairie MSDN.

Exemple

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

Example()

Func Example()
    Local $hGUI = GUICreate("GDI+ test", 640, 480)
    GUISetState(@SW_SHOW)

    _GDIPlus_Startup()
    Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    Local $hPen = _GDIPlus_PenCreate()
    _GDIPlus_GraphicsDrawLine($hGraphics, 40, 40, 600, 440, $hPen) ; Trace une ligne de test pour montrer l'effet de lissage (par d�faut pas de lissage)
    MsgBox($MB_SYSTEMMODAL, "", "Smoothing enabled: " & _GDIPlus_GraphicsGetSmoothingMode($hGraphics))

    _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $GDIP_SMOOTHINGMODE_HIGHQUALITY) ; Installe le mode de lissage (8 X 4 bo�te filtre)
    _GDIPlus_GraphicsDrawLine($hGraphics, 600, 40, 40, 440, $hPen) ; Trace une ligne de test pour montrer l'effet de lissage

    MsgBox($MB_SYSTEMMODAL, "", "Smoothing enabled: " & _GDIPlus_GraphicsGetSmoothingMode($hGraphics))

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE 

    ; Nettoie
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_Shutdown()
    GUIDelete($hGUI)
EndFunc   ;==>Example