Menu

#19 Width=0 canvas lines are drawn width=1

open-invalid
1
2003-11-13
2000-10-31
No

OriginalBugID: 2298 Bug
Version: 8.1.1
SubmitDate: '1999-06-28'
LastModified: '1999-10-21'
Severity: LOW
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Windows 95
OSVersion: 4.00.951
Machine: X86
ClosedDate: '1999-10-21'

Name:
John Nakulski

ReproducibleScript:
canvas .c
pack .c
.c create line 1 1 50 50 -width 0 ;# Draws a line of width 1

ObservedBehavior:
Canvas lines of width<=0 are drawn as if width=1

DesiredBehavior:
If I specify line width=0, I expect the line to be invisible (but to
exist, so that I can later configure the width to be positive).

If I specify width<0, I expect to get an error.

This is actually a feature of X that you can say 0, but you always
get at least a 1 pixel line. The ability to make items invisible
in general is being considered for a future release of Tk.
-- 10/21/1999 hobbs

Discussion

  • Brent B. Welch

    Brent B. Welch - 2000-10-31
    • priority: 5 --> 1
    • status: open --> closed-invalid
     
  • Don Porter

    Don Porter - 2001-04-27
    • labels: 104343 -->
    • milestone: 102495 -->
    • status: closed-invalid --> open-invalid
     
  • Donal K. Fellows

    • labels: --> 05. Canvas Items
     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    Invisible lines can be obtained by setting -fill (or
    -outline, depending on item type) to the empty string.
    Given my experience with X, I'd expect zero to draw a
    "narrowest visible" line (in some device-dependent sense).
    Negative widths should always be errors, as they're nonsensical!

     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    Note that you see the difference between lines with -width 0
    and -width 1 when you generate and scale PostScript.

     
  • Don Porter

    Don Porter - 2003-11-13
    • assigned_to: nobody --> dkf
     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    Looks like a docfix to me

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.