Skip to content

Line is too thick #4269

@Mamboleoo

Description

@Mamboleoo

Most appropriate sub-area of p5.js?

  • Color
  • Core/Environment/Rendering
  • Data
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

Details about the bug:

  • p5.js version: 0.10.2
  • Web browser and version: Latest Chrome/Firefox/Edge/Mobile Safari
  • Operating System: Windows 10, iOs 13.3
  • Steps to reproduce this:

Hey there,
While working on a demo I noticed that all my lines had a 2px stroke even when I specify the stroke weight to 1.
See the following image where:

  1. The first line is a rect(0,0,250,1)
  2. The second line is a line(0,0,250,0) with a strokeWeight(1)
  3. The third line is a line(0,0,250,0) with a strokeWeight(2)
    image

You can also test on this url: https://codepen.io/Mamboleoo/pen/PoqYzJj

I checked on multiple browsers and the result seems to be the same. The second line is always thicker than the rectangle, but a bit less opaque than the third line.

Thanks for having a look

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions