Tk Source Code

Artifact [cef984a6]
Login

Artifact cef984a679d3ef1675974d77258433026e2ef53b:

Ticket change [cef984a6] - Ticket [e9a842a3] TkCanvas events search for all objects , even they are not displayed status still Open with 3 other changes by arjenmarkus 2013-11-10 15:16:42.
D 2013-11-10T15:16:42.284
J icomment I\shave\shad\sa\scloser\slook\sat\sthe\spatch\sand\sI\srealised\sthat\sit\scan\sbe\simplemented\sin\sa\sdifferent\sway\sthat\sis\sperhaps\sa\sbit\sless\sefficient,\sbut\srequires\sno\sextra\sfields.\r\n\r\nA\ssimple\stest\sprogram\swith\sa\slist\sof\s1\smillion\sitems\sshows\sthat\sthere\sis\sa\ssmall\soverhead\sof\siterating\sover\sthe\sentire\slist\sif\sthe\snumber\sof\sitems\sto\sbe\sconsidered\sis\ssmall\s(1%),\sbut\sit\sis\sstill\s30\stimes\sfaster\sthan\sconsidering\sall\sitems,\swhere\s"considering"\smeant\sprinting\sa\snumber\sof\sthe\sitem.\sThat\sseems\squite\sacceptable.\r\n\r\nThe\sidea\sis\sto\skeep\strack\sof\sthe\svisibility\sof\sthe\sitems.\sWe\scan\ssimply\siterate\sover\sthe\swhole\slist\sand\scheck\sif\sthe\sitem\sis\svisible.\sIf\snot,\sthere\sis\sno\sneed\sto\sconsider\sit\sany\sfurther.\sThis\scan\salso\sbe\sused\sto\sadd\san\sextra\sattribute,\s-hidden,\sto\sthe\sset\sof\sproperties\sof\sa\scanvas\sitem,\sso\sthat\syou\scan\scontrol\sat\sthe\sscripting\slevel\sif\san\sitem\sis\svisible\sor\snot.\r\n\r\nAlso,\sthere\sis\san\sissue\sof\scompatibility\sto\sconsider:\sthe\spatch\swould\ssuppress\sdisplaying\srectangles\sand\sovals\sthat\sare\ssmaller\sthan\stwo\spixels,\sbut\sthat\seffectively\smeans\sthat\sapplications\sthat\suse\ssmall\srectangles\swill\sgive\sdifferent\sresults.\r\n\r\nSo\sI\ssuggest\sturning\sthis\sfeature\son\sby\san\sextra\soption\sto\sthe\scanvas:\s-hidesmallitems.\r\n\r\nAlso:\sthe\svisibility\sof\sall\sitems\sshould\sbe\smanaged,\snot\sjust\srectangles\sand\sovals.
J login arjenmarkus
J mimetype text/plain
K e9a842a3c584d6e709398529863fb8f798c83e3c
U arjenmarkus
Z b4021cf33619171b5a87c562b776739d