Skip to content

getStrokedShape leads to artifacts at certain corners #83

@samreid

Description

@samreid

From phetsims/circuit-construction-kit-common#537 (comment)

Shape.getStrokedShape is leaving kinks at the corners, see the triangles at the junctions. Is this a shortcoming with Shape.getStrokedShape? Am I doing something wrong? Is there a way around it?

image

@jessegreenberg said:

That looks familiar I think I have seen that before - Are you passing a LineStyles to getStrokedShape? I think the lineCap and lineJoin used in capacitor-lab-basics WireShapeCreator are in part to remove similar artifacts.

I replied:

I still see an effect with round/round/7 (used in CLB)

image

@jessegreenberg said:

Jesse Greenberg 4:36 PM

Hmm, OK still looking - I have definitely seen that before but can't remember where yet
I can't really find it [...] but I am seeing similar artifacts where lines join in energy-forms-and-changes in the burners:

image

Assigning to @jonathanolson for initial review, but I understand if this is not prioritized for near-term work.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions