AutoIt
#include <GUIConstantsEx.au3> #include <GDIPlus.au3> _Main() Func _Main() Local $hGUI, $hGraphic ; Create GUI $hGUI = GUICreate("GDI+", 400, 300) GUISetState() _Curvature($hGUI,160,100,20,20,100,180,0x702E2EFE) _DrawLine($hGui,160,100+(20/2),160,120+40,0x702E2EFE) _Curvature($hGUI,160,160-(20/2),20,20,-100,180,0x702E2EFE) ; Draw arcs ;_GDIPlus_GraphicsDrawArc($hGraphic, 180, 100, 10, 10, 180, 360) ;_GDIPlus_GraphicsDrawArc($hGraphic, 160, 104, 30, 30, 160, -140) ;_GDIPlus_GraphicsDrawArc($hGraphic, 140, 80, 70, 70, 180, 360) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE ; Clean up resources EndFunc ;==>_Main Func _DrawLine($Gui,$x1,$y1,$x2,$y2,$sChannel=0x80FFD700) Local $hGraphic, $hPen ; Draw line _GDIPlus_Startup () $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($Gui) $hPen = _GDIPlus_PenCreate ($sChannel) If Not _GDIPlus_GraphicsDrawLine ($hGraphic, $x1,$y1,$x2,$y2, $hPen) Then ConsoleWrite('Error from GDI+:'&@error&@CRLF) ; Clean up resources _GDIPlus_PenDispose ($hPen) _GDIPlus_GraphicsDispose ($hGraphic) _GDIPlus_ShutDown () ;Done..... EndFunc ;==>_Main Func _Curvature($hGui, $iX, $iY, $iWidth, $iHeight, $fSweepAngle,$fStartAngle=180, $hPen = 0x80FFD700) _GDIPlus_Startup() Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui) $hPen=_GDIPlus_PenCreate($hPen) _GDIPlus_GraphicsDrawArc($hGraphic, $iX, $iY, $iWidth, $iHeight, $fStartAngle, $fSweepAngle , $hPen) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() EndFunc
I want to anti alias the Curves
I have already seen _GDIPlus_GraphicsSetSmoothingMode($hGraphics, $iSmooth)
But it doesnt seem to do anything
Please guide me in the right direction
Thnx for your Time
Edited by PhoenixXL, 15 June 2012 - 07:25 AM.





