Problem drawing line on canvas

From: Adrian Davis (adrian.davis_at_lewisham.gov.uk)
Date: 10/31/03


Date: 31 Oct 2003 02:36:23 -0800

I'm trying to draw an angled line across the corner
of a rectange.

The example below (which needs to be displayed in a
fixed pitch font), shows the top left of a rectange
with the corner a 0,0. The "*" indicate the line of
the rectange, "." are the background and "+" is the
line I wish to draw.

Using the following command...

$name create line 0 2 2 0 -width 1 -fill red

...I would expect this...

**+*****
*+......
+.......
*.......
*.......
*.......
*.......

...but I get this...

********
*+......
+.......
*.......
*.......
*.......
*.......

...If I try...

$name create line 2 0 0 2 -width 1 -fill red

...I get...

**+*****
*+......
*.......
*.......
*.......
*.......
*.......

...How do I get the required line?

Many Thanks,
   =Adrian=



Relevant Pages

  • Re: Problem drawing line on canvas
    ... I have no idea why it behaves the way it does, ... Regards, ... shows the top left of a rectange ... > line I wish to draw. ...
    (comp.lang.tcl)
  • GDI - Drawing a rectangle to the upper-right of an image NOT the upper-left, How To?
    ... Ok so I can draw a rectange to the ... upper left of an image easily, but I cant work out how to draw the ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: tutorials for 2.2.8 (newbie)?
    ... >I am not yet familiar with the terminology used in gimp. ... >I was most surprised to discover that to draw a shape (rectange, ... You can draw the shape, ...
    (comp.graphics.apps.gimp)
  • Re: tutorials for 2.2.8 (newbie)?
    ... I was most surprised to discover that to draw a shape (rectange, or circle say) I needed to use ... You can draw the shape, then tweak it to be just the way you want it and then finally stroke it with any desired brush. ...
    (comp.graphics.apps.gimp)