DjDeep00 Posted May 22, 2009 Share Posted May 22, 2009 (edited) Was wondering if I could draw this shape instead of using the pic control? Edited May 22, 2009 by DjDeep00 Link to comment Share on other sites More sharing options...
Mat Posted May 22, 2009 Share Posted May 22, 2009 I'm no expert but have you tried _GDIPlus_GraphicsDrawClosedCurve and the relative fill function? MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
DjDeep00 Posted May 22, 2009 Author Share Posted May 22, 2009 @mdiesel...Yeah dude I got nothing after trying all sorts of GDI functions..I will keep trying never really worked with these before.... How would I fill in a custom color for the graphic? Link to comment Share on other sites More sharing options...
Authenticity Posted May 22, 2009 Share Posted May 22, 2009 expandcollapse popup#include <GDIPlus.au3> Opt('MustDeclareVars', 1) _Main() Exit Func _Main() Local $hGUI Local $hRgn, $hDC, $hBrush ; Create GUI $hGUI = GUICreate("Test", 200, 500) GUISetState() GUISetBkColor(0xE6F2F7) ; Draw arcs _GDIPlus_Startup () $hDC = _WinAPI_GetDC($hGUI) $hRgn = _CreateEllipticRgn(100, -100, 300, 500) $hBrush = _WinAPI_CreateSolidBrush(0xFFFFFF) ;_WinAPI_SelectObject($hDC, $hBrush) ;_WinAPI_SelectObject($hDC, $hRgn) _FillRgn($hDC, $hRgn, $hBrush) Do Until GUIGetMsg() = -3 _WinAPI_DeleteObject($hBrush) _WinAPI_DeleteObject($hRgn) _WinAPI_ReleaseDC($hGUI, $hDC) EndFunc Func _CreateEllipticRgn($iLeftRect, $iTopRect, $iRightRect, $iBottomRect) Local $aRet $aRet = DllCall('gdi32.dll', 'int', 'CreateEllipticRgn', 'int', $iLeftRect, 'int', $iTopRect, _ 'int', $iRightRect, 'int', $iBottomRect) If @error Or $aRet[0] = 0 Then Return SetError(1, 0, 0) Return $aRet[0] EndFunc Func _FillRgn($hDC, $hRgn, $hBrush) Local $aRet $aRet = DllCall('gdi32.dll', 'int', 'FillRgn', 'int', $hDC, 'int', $hRgn, 'int', $hBrush) If @error Or $aRet[0] = False Then Return SetError(1, 0, False) Return SetError(0, 0, True) EndFunc Link to comment Share on other sites More sharing options...
DjDeep00 Posted May 22, 2009 Author Share Posted May 22, 2009 Thanks Authenticity... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now