Re: Tk canvas: why are some lines a pixel too short?



In article <1152785401.091646.275390@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
suchenwi <richard.suchenwirth-bauersachs@xxxxxxxxxxx> wrote:
The problem can be easily demonstrated by the following "X":
pack [canvas .c]
.c create line 10 10 20 30
.c create line 10 30 20 10

End points of the two lines seem to be truncated by one pixel.

Excellent: much better than my long-winded example.

By the way, I found one workaround for my particular application - plot
the line twice, in the two directions.

Patrick Wallace
________________________________________________________________________

.



Relevant Pages

  • Re: Koch Figures - LTK package
    ... The function you are looking for is (clear canvas). ... (vector-push A1 puntos-nuevos) ... :master f:text "Koch Curve" ... (pack bc:side:left) ...
    (comp.lang.lisp)
  • Re: and binding on same widget
    ... Without seeing your code or knowing ... pack [canvas .c] ... The real solution is not to do so much work in an event processing routine. ...
    (comp.lang.tcl)
  • Packing cannot be that difficult, can it?
    ... How to a canvas at the very bottom of ... I found out that if I increase the height of my text widget the ... pack $leftFr -side left ... set rightFr [frame $parent.rightFr] ...
    (comp.lang.tcl)
  • Re: weird canvas behavior
    ... If focus is lost and then regained, the canvas shows the label's yellow ... window size is manually altered. ... Widgets should only be packed inside frames or frame like widgets (i.e. ... Either .f should be a frame, or pack should be directed to ...
    (comp.lang.tcl)
  • Re: XOR drawing on Tk canvas?
    ... I'll add smaller bitmaps to the canvas for the ... > squares on the board, for example to indicate legal moves. ... > a rectangle in XOR mode on top of the square. ... draw a set of 1 pixel wide lines about every third pixel covering the ...
    (comp.lang.tcl)