Ticket Hash: | ec1c95e538df2b4d0143be43facbb7553a77edbf | |||
Title: | tkpath - move does not care about rotatation matrix of items | |||
Status: | Closed | Type: | Code_Defect | |
Severity: | Important | Priority: | Medium | |
Subsystem: | Resolution: | Fixed | ||
Last Modified: | 2019-12-28 06:26:57 | |||
Version Found In: | e5dc71ed9d | |||
User Comments: | ||||
anonymous added on 2019-12-02 22:45:56:
example file: https://drive.google.com/open?id=1JqzQuyjQlHUHmXxrCu0t9yXx8W9WVxnn the move command $w move 14 10 0 ------------------------------------ manipulates the item: before: 14 <- path -> --- M 0.0 0.0 L 30.0 40.0 L -30.0 40.0 Z after: 14 <- path -> --- M 10.0 0.0 L 40.0 40.0 L -20.0 40.0 Z and does not change the matrix attribute: my summary: as-is situation: the move command changes the coords attribute of the item and has not effect to the already defined matrix of this item to-be situation: the move command should check the existence of the -matrix value and if yes multiply the move-command-matrix with the existing matrix. option: depending on the tkpath specific items check before: (pseudo code) if {[$w itemconfigure $item -matrix] != {}} set matrixExist [lindex [$w itemconfigure $item -matrix] 4] set matrixMove [tkp::matrix::move $dx $dy] $w itemconfigure $item -matrix [$tkp::matrix::mult $matrixMove $matrixExist] } else { ... existing behaviour } see also: https://groups.google.com/forum/#!topic/comp.lang.tcl/UIb8tQHGQsQ chw added on 2019-12-02 23:49:15: Howdy Manfred, sorry, no time left for this problem in 2019, currently have a construction site pending in Wiener Neudorf. anonymous added on 2019-12-03 09:23:19: (text/x-markdown) Hi Christian, thanks for your yuick answer :) ... so you work close to me, just on the other side of the hill ...? ... just a question of moving and scaling chw added on 2019-12-04 09:18:29: (text/x-fossil-wiki) Manfred, please check if this is a duplicate of ticket [5db15b6fb8], i.e. in your test snippet change the offending "... move ..." to "... cmove ..." for testing (if you happen to use the tkpath variant from www.androwish.org). anonymous added on 2019-12-28 04:46:03: (text/html) Hi Christian,<br> <br> yes and no!<br> <br> as long as I do not have any matrix transformations on the objects the default move and scale works.<br> <br> for matrix transformations on the objects, <br> $cv cmove ... can replace $cv move ...<br> but for scaling of these objests neither $cv scale ... nor $cv cscale works properly<br> <br> for my current usage I found a solution, where I can rotate objects without using matrix transformations:<br> I create a path item without transformations:<br> set cvItem [$w create path $pathDef]<br> ... and get the pathDefinition as a (poly-)lines or a list of points<br> set objectPoints [$w itempdf $cvItem]<br> ... with a little bit of computing<br> ... I can transform, scale or rotate each single point of the pathDefinition manually<br> <br> So:<br> <br> 1st: the issue is not that important in the moment, I have a workaround<br> 2nd: It looks like that cscale does not work properly, or I understand something wrong<br> <br> Manfred<br> <br> chw added on 2019-12-28 06:26:57: (text/x-markdown) I see. Since you've reported the move operation being problematic and the "cmove" command solving it, I'm closing this ticket for now. |