Skip to content

Commit

Permalink
Add more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kimci86 committed Nov 19, 2023
1 parent d313553 commit f324459
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions include/SFML/Graphics/Shape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,24 @@ class SFML_GRAPHICS_API Shape : public Drawable, public Transformable
////////////////////////////////////////////////////////////
/// \brief Set the limit on the ratio between miter length and outline thickness
///
/// The edges of the shape's outline around sharp angles can meet
/// well beyond the outline thickness. When the ratio between the
/// miter length (distance between the outline's tip and the shape's
/// corner) and the outline thickness exceeds the given limit, then
/// the join is converted from a miter to a bevel.
/// Outline segments around each shape corner are joined either
/// with a miter or a bevel join.
/// - A miter join is formed by extending outline segments until
/// they intersect. The distance between the point of
/// intersection and the shape's corner is the miter length.
/// - A bevel join is formed by connecting outline segments with
/// a straight line perpendicular to the corner's bissector.
///
/// The miter limit is used to determine whether ouline segments
/// around a corner are joined with a bevel or a miter.
/// When the ratio between the miter length and outline thickness
/// exceeds the miter limit, a bevel is used instead of a miter.
///
/// The miter limit is linked to the maximum inner angle of a
/// corner below which a bevel is used by the following formula:
///
/// miterLimit = 1 / sin(angle / 2)
///
/// The miter limit must be greater than or equal to 1.
/// By default, the miter limit is 10.
///
Expand Down

0 comments on commit f324459

Please sign in to comment.