openframeworks / openframeworks/openFrameworks

ofPath::arc adding radial line

Open
#5,236 6 comments 1 reaction 1 assignee View on GitHub

@ofTheo is already working on this.

Since Aug 26, 2016.

bug core
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

From the forums:
https://forum.openframeworks.cc/t/arc-without-drawing-radius-lines/24343

Note this issue appears with current master.

The following code produces an unexpected straight line:

    ofPath path;

    //draw an arc with a center starting at 300, 300, radius of 150 over 180 degrees
    //should appear like a semi-circle
    path.arc(300, 300, 150, 150, -180, 0);
    path.setFilled(false);
    path.setStrokeWidth(1);

    path.draw();
screen shot 2016-08-26 at 4 38 55 pm

But ofPolyline::arc looks correct.

    ofPolyline poly;

    //draw an arc with a center starting at 300, 300, radius of 150 over 180 degrees
    //should appear like a semi-circle
    poly.arc(300, 300, 150, 150, -180, 0);

   poly.draw();
screen shot 2016-08-26 at 4 40 25 pm

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.