Modify

Opened 10 years ago

Closed 9 years ago

#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 Changed 9 years ago by Jon

  • Resolution set to Rejected
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.