View Ticket
Not logged in
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:

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.

    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:!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:

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:

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

anonymous added on 2019-12-28 04:46:03:

Hi Christian,

yes and no!

as long as I do not have any matrix transformations on the objects the default move and scale works.

for matrix transformations on the objects,
$cv cmove ... can replace $cv move ...
but for scaling of these objests neither $cv scale ... nor $cv cscale works properly

for my current usage I found a solution, where I can rotate objects without using matrix transformations:
I create a path item without transformations:
set cvItem [$w create path $pathDef]
... and get the pathDefinition as a (poly-)lines or a list of points
set objectPoints [$w itempdf $cvItem]
... with a little bit of computing
... I can transform, scale or rotate each single point of the pathDefinition manually


1st: the issue is not that important in the moment, I have a workaround
2nd: It looks like that cscale does not work properly, or I understand something wrong


chw added on 2019-12-28 06:26:57:

I see. Since you've reported the move operation being problematic and the "cmove" command solving it, I'm closing this ticket for now.