Obtient la qualité du rendu de l'objet graphique
#include <GDIPlus.au3>
_GDIPlus_GraphicsGetSmoothingMode ( $hGraphics )
$hGraphics | Handle de l'objet Graphics |
Succès: | Retourne le mode de lissage, l'un des suivants: 0 - Le lissage n'est pas appliqué 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 |
Échec: | Retourne -1 et définit @error <> 0, @extended contient le code erreur GPSTATUS ($GPID_ERR*). |
_GDIPlus_GraphicsSetSmoothingMode
Consultez GdipGetSmoothingMode dans la Librairie MSDN.
#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