Artifact [a24e7e16d5]
Not logged in

Artifact a24e7e16d54ff70c7a98b655e758a29347a95fda:

Ticket change [a24e7e16d5] - Ticket [d05d10b80d5ff801|d05d10b80d] <i>Rotated tkpath canvas results to wrong bbox coords</i> status still Review with 3 other changes by anonymous 2019-04-13 11:21:31.
D 2019-04-13T11:21:31.313
J icomment I'd\sexpect\sboth\sbbox\sand\scoords\sto\sreturn\scoords\sin\sthe\ssame\sframe\sof\sreference\sin\swhich\san\sitem\swas\sdrawn.\sIn\sthe\sexample\sabove,\sI'd\sexpect:\r\n\r\n#\safter\srotate\s90°\r\n%\s.c\scoords\stest\r\n20.0\s20.0\s50.0\s30.0\r\n%\s.c\sbbox\stest\r\n17\s17\s53\s33\r\n\r\nTL;DR\r\n\r\nImagine\sdoing\sland\ssurveys\son\s(the\srotating)\sEarth\susing\sGPS\scoordinates,\sbut\swhen\sit\scame\sto\sthe\sbbox\sof\sthe\sarea\syou'd\sjust\smeasured,\sfinding\syour\sinstrument\sreturned\scoords\sin\sthe\sframe\sof\sreference\sof\sthe\sSun.\r\n\r\nWhen\srotating\sthe\sroot\sof\sthe\scanvas,\sthe\swhole\sframe\sof\sreference\s(FoR)\sof\sthe\scanvas\sis\srotated.\sTransformations\sspecified\sfor\sitem\s0\swith\s-matrix\s[tkp\smatrix\s...]\sare\sapplied\sto\sthe\sFoR\sof\sthe\sroot\sand\snot\sto\sthe\sindividual\sitems\sor\stheir\sbboxes.\sFrom\sthe\sstandpoint\sof\san\sindividual\sitem,\sits\scoords,\stransformations\sand\sbbox\sshould\sall\sbe\sin\sthe\ssame\sFoR.\r\n\r\nThe\sway\sit\sstands\snow,\sbbox\sseems\sto\srefer\sto\sa\sdifferent\sFoR\s(that\sof\sa\s'universal'\sobserver?)\sthan\sdo\sthe\scoords.\sBbox's\sFoR\scannot\shave\sany\sitems\sdrawn\swith\sit,\sbecause\sthe\sitems\sare\sinstead\sdrawn\son\sthe\scanvas\sroot.\sIf\sI\swere\sto\sdescribe\sin\stk's\sparlance\sthe\sbehavior\sof\scoords\sand\sbbox,\susing\sthe\sEarth-Sun\sexample\sabove,\sthat\swould\sbe:\r\n\r\n.c\screate\sprect\s10\s10\s60\s30\s-tags\scoords_on_Earth\r\n.c\sbbox\s-ref\sSun\scoords_on_Earth\r\n\r\nIf\sone\stries\sto\sdraw\sitems\susing\sthe\scoords\sreported\sby\s_bbox_\sof\sa\stransformed\scanvas\sroot,\se.g.\s[.c\screate\sprect\s167\s16\s183\s52]\susing\sthe\scoords\sreturned\sby\sbbox\sin\sthe\srotated\sexample\sin\smy\sfirst\smessage\sabove,\she'll\sfind\sthat\sthe\sitems\send\sup\sdrawn\s_not_\swhere\sthey\sare\sexpected\sin\sthe\sFoR\sof\s_bbox_\s(the\s'universal'\sobserver?).\sThis\sis\sbecause\sthe\sitems\sare\sactually\s\sdrawn\son\sthe\stransformed\scanvas\sroot\sand\s_not_\son\sthe\simaginary\sfixed\sFoR\sof\sbbox.\sThe\sFoR\sof\sbbox\slacks\sa\sphysical\s1:1\srepresentation\son\sthe\scanvas.\sTk's\scanvas\sescapes\sthis\sproblem\sby\shaving\sjust\sone\sFoR\sand\sby\snot\sbeing\scapable\sof\sdoing\stransformations.\r\n\r\nThere\smay\sbe\ssome\sother\sconceptual\sdiscrepancies\stoo:\sgradients\suse\sa\s'bbox'\sin\sthe\sdefinition\sof\slinear\stransition\sunits;\sthat\s'bbox'\sretains\sthe\ssame\sorientation\swith\sthe\sorientation\sof\sthe\s(transformable)\sitems\swhere\ssaid\sgradient\sis\sused.\sThis\sis\sthe\sexpected\sbehavior,\sbut\sit\sis\sdifferent\sfrom\sthe\sway\s[.c\sbbox\sitems]\sbehaves.\r\n\r\nSo\sagain,\sI'd\sexpect\sbbox\sto\sreturn\sthe\ssame\scoords\sin\sthe\srotated\sroot\sFoR\sas\sit\sdoes\sin\sthe\sun-rotated\sone,\sbecause\sthe\sframe\sof\sreference\sin\swhich\sthe\sitems\sare\sdrawn\shas\s_not_\schanged\s_for\sthe\sitems_.\sThis,\sseems\sto\sme,\swould\sbe\sthe\sonly\sway\sbbox\scan\shave\ssome\spractical\suse\swhen\sdrawing\son\sa\stransformable\scanvas.\r\n\r\nGenerally\sspeaking,\sI'd\sexpect\sdefault\s[.c\scoords\sitems]\sand\s[.c\sbbox\sitems]\sto\sreturn\scoords\sin\sthe\sframe\sof\sreference\sdefined\sby\stheir\sancestor(s).\sThis\sis\show\s-matrix\sbehaves\stoday,\sbut\snot\show\scoords\sand\sbbox\sbehave.\sAn\sgeneral\soptional\scase\scould\sbe\smade\sfor\sreturning\scoords\sor\sbbox\sin\sa\sdifferent\sFoR,\swith\ssomething\slike:\r\n\r\n.c\scoords\s-ref\sotherFrame\stagOrId\r\n\s\sand\r\n.c\sbbox\s-ref\sotherFrame\stagOrId\r\n\r\nHopefully\sthe\sabove\smake\ssense.
J login anonymous
J mimetype text/x-fossil-plain
K d05d10b80d5ff8013a5448645ad31ae0793b4590
U anonymous
Z eaf125c3e6cb9150d1647d5472f144df