beginShape() documentation lack LINE_STRIP shape mode

Open Beginner friendly
#371 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
72/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Domain
documentation

Research direction

Start with the affected beginShape() reference page at https://processing.org/reference/beginShape_.html and inspect its fourth example and shape-mode list. Update the example to use LINE_STRIP and mention that mode in the list, then verify the rendered documentation and the two-vertex example.

Written by the indexing model from the issue text.

Description

Issue description

Examples shown encourage users who wants to draw multiple consecutive line segments to use "With no mode specified, the shape can be any irregular polygon".

But the default POLYGON mode doesn't work if user supply only 2 vertices...

The example code is working with four vertices, but doesn't work anymore if you comment two of them !

URL(s) of affected page(s)

https://processing.org/reference/beginShape_.html

Proposed fix

The fourth example should use beginShape(LINE_STRIP) and LINE_STRIP should be mentionned in mode's list.

noFill();
beginShape(LINE_STRIP);
vertex(30, 20);
vertex(85, 20);
endShape();
Dominant language
MDX
Stars
90
Forks
122
Avg merge
1h 43m
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from processing/processing-website

All issues in processing/processing-website

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.