Sign in to follow this  
Followers 0
LimeSeed

GDI+

5 posts in this topic

I cannot for the love of god find a way to change the color of a graphic created with gdi+ and cannot figure out how to change the position of an object created with gdiplus and then refresh that :mellow: any ways to do these?


global $warming = true

Share this post


Link to post
Share on other sites



I cannot for the love of god find a way to change the color of a graphic created with gdi+ and cannot figure out how to change the position of an object created with gdiplus and then refresh that :mellow: any ways to do these?

Have a look at Radar animation with GDI+

It may be that you just clear the object and redraw it without any problems.

Share this post


Link to post
Share on other sites

Have a look at Radar animation with GDI+

It may be that you just clear the object and redraw it without any problems.

gocha, but is there any way to fill an arc? i see a _gdiplus_drawarc but no fill arc :mellow:


global $warming = true

Share this post


Link to post
Share on other sites

gocha, but is there any way to fill an arc? i see a _gdiplus_drawarc but no fill arc :mellow:

This is an example from the AutoIt help with a pen and a brush added.

#include <GuiConstantsEx.au3>
#include <GDIPlus.au3>

Opt('MustDeclareVars', 1)

_Main()

Func _Main()
    Local $hGUI, $hWnd, $hGraphic, $hBrush, $hPen

    ; Create GUI
    $hGUI = GUICreate("GDI+", 400, 300)
    $hWnd = WinGetHandle("GDI+")
    GUISetState()

    ; Draw a pie
    _GDIPlus_Startup()
    $hBrush = _GDIPlus_BrushCreateSolid(0xFFFFFF00)
    $hPen = _GDIPlus_PenCreate(0xFF0000FF, 3)

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)

    _GDIPlus_GraphicsFillPie($hGraphic, 150, 80, 100, 100, 45, 270, $hBrush)
    _GDIPlus_GraphicsDrawPie($hGraphic, 150, 80, 100, 100, 45, 270, $hPen)
    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    ; Clean up resources
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_PenDispose($hPen)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

EndFunc   ;==>_Main

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0