[][src]Module nannou::geom::line::join

Items related to the geometry that joins two lines together.

Line joins describe the style of geometry used to fill the space at which two lines would intersect. The following diagram shows the space occuppied by a line join between A and B.

This example is not tested
                                 Line join fills this space.
                                 This one is a "miter" join.

                                            /
                                           /
                         Line A           /

          ^   ------------------------xxxx        ^
          |                           xxxxx       | half_thickness
thickness |   ------------------------xxxxxx      v
          |                           xxxx  \
          v   ------------------------x  \   \
                                      \   \   \
                                       \   \   \   Line B
                                        \   \   \
                                         \   \   \
                                          \   \   \

Nannou provides three common types of line joins:

  • miter: Extends the stroke to where the edges on each side bisect. This is the default join type.
  • round: Rounds the outside edge with a circle the diameter of the thickness.
  • bevel: Cuts the outside edge off where a circle the diameter of the thickness intersects

Modules

bevel
miter
round

Functions

intersect

The point of intersection between two straight lines.

intersections

Given three points that describe two lines and half the thickness of the line, return the two points that intersect on either side of the line.