Modify

#1763 closed Bug (Rejected)

incorrect sequence during GUICtrlSetGraphic

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: graphic, sequence, draw Cc: SilentButeo2@…

Description

When using GUICtrlSetGraphic, one should expect that the elements you draw are "placed" on top of each other.
This is not the case when you draw a ellipse and a line. (not tested with other combinations)

Next example shows this.

  1. draw ellipse and then the line
  2. draw line and then the ellipse
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)

Example1()

; example 1
Func Example1()
    Local $msg

    GUICreate("My GUI") ; will create a dialog box that when displayed is centered

	GUICtrlCreateGraphic(10,10,100,100)
	GUICtrlSetBkColor(-1,0xffffff)
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x000000, 0x000000)
	GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 20,20,60,60)
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xF0F0F0, 0xF0F0F0)
	GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0,50)
	GUICtrlSetGraphic(-1, $GUI_GR_LINE, 100,50)

	GUICtrlCreateGraphic(120,10,100,100)
	GUICtrlSetBkColor(-1,0xffffff)
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0xF0F0F0, 0xF0F0F0)
	GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 0,50)
	GUICtrlSetGraphic(-1, $GUI_GR_LINE, 100,50)
	GUICtrlSetGraphic(-1, $GUI_GR_COLOR, 0x000000, 0x000000)
	GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, 20,20,60,60)


    GUISetState(@SW_SHOW) ; will display an empty dialog box

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc   ;==>Example1

Attachments (0)

Change History (1)

comment:1 by Jon, on May 22, 2011 at 7:32:13 PM

Resolution: Rejected
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.