﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1099	The GUICtrlSetPos() function redraws each draw when moving a graphic	anonymous		"The GUICtrlSetPos() function redraws each drawn line,etc. when moving a graphic, rather than just moving the final resulting graphic, this causes the function to take increasingly long time to execute for graphics which needs updating.

example code to simulate the problem:
{{{
; Script to simulate a bug in Autoit.
#include <GUIConstantsEx.au3>

AdlibEnable(""GUIUpdate"",20)

GUICreate(""THIS IS A TEST"",400,400)
GUICtrlCreateGraphic(10,10,380,380)
GUICtrlSetBkColor(-1,0xffffff)
GUICtrlSetColor(-1,0)
Global $box=GUICtrlCreateGraphic(20,20,20,20)
GUISetState(@SW_SHOW)
Sleep(3000)



While 1
	If GUIGetMsg()=$GUI_EVENT_CLOSE Then ExitLoop
WEnd

GUIDelete()

Func GUIUpdate()
	AdlibDisable()
	GUICtrlSetGraphic($box,$GUI_GR_PENSIZE,2)
	GUICtrlSetGraphic($box, $GUI_GR_COLOR,0,0xc0c0ff)
	GUICtrlSetGraphic($box,$GUI_GR_RECT,1,1,18,18)
	GUICtrlSetGraphic($box,$GUI_GR_PENSIZE,2)
	GUICtrlSetGraphic($box,$GUI_GR_COLOR,0xff0000,0x00ffff)
	GUICtrlSetGraphic($box,$GUI_GR_RECT,1,1,18,18)
	Local $time=TimerInit()
	GUICtrlSetPos($box,Random(10,360,1),Random(10,360,1))
	$time=TimerDiff($time)
	ToolTip(""TimeTaken: ""&$time)
	AdlibEnable(""GUIUpdate"",20)
EndFunc

}}}"	Bug	closed		AutoIt	3.3.0.0	None	No Bug	GUICtrlSetPos() , move graphic, performance	
