Skip to content

Commit

Permalink
add polygon rounding examples
Browse files Browse the repository at this point in the history
  • Loading branch information
astearns committed Sep 11, 2024
1 parent b53255a commit 25dc09f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions css-shapes-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,15 @@ Supported Shapes</h3>
and that is tangential
to both sides of the vertex.

<div class="example">
<figure>
<img src="images/vertex-rounding.png" alt="rounding concave and convex polygon vertices">
<figcaption>
Rounding polygon vertices that are both convex and concave.
</figcaption>
</figure>
</div>

To avoid rounding more
than half of any line segment,
the rounding of each vertex
Expand All @@ -506,8 +515,14 @@ Supported Shapes</h3>
the smaller of <code>tan(angle/2) segment / 2</code>
evaluated against both vertex line segments.


Note: vertex rounding needs examples and tests.
<div class="example">
<figure>
<img src="images/clamp-explanation.png" alt="visualization of clamp formula">
<figcaption>
This diagram shows the intent of the clamping formula.
</figcaption>
</figure>
</div>

* Each <<length-percentage>> pair
specifies a vertex of the polygon,
Expand Down
Binary file added css-shapes-1/images/clamp-explanation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added css-shapes-1/images/vertex-rounding.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 25dc09f

Please sign in to comment.