# Crate math2d

Expand description

2D Mathematics library designed for use with 2D drawing applications.

Primarily designed for the needs of Direct2D, but this library should be perfectly capable of filling in the needs of other libraries such as Cairo. If you would like interoperability defitions added please feel free to open a pull request on the repository.

Currently compatible with:

• Direct2D (winapi types)
• Mint

## Re-exports

pub use color::Color;

## Modules

RGBA Colors. Many colors have predefined constants for convenience.

## Structs

Describes an elliptical arc between two points. The starting point is implicit when an ArcSegment is used as part of a Path, as it is a continuation from the previous segment.
Represents a cubic bezier segment drawn between two points. The first point in the bezier segment is implicitly the end point of the previous segment.
2D Affine Transformation Matrix.
Mathematical point on the 2D (x, y) plane.
Mathematical point on the 2D (x, y) plane.
Mathematical point on the 2D (x, y) plane.
Contains the control point and end point for a quadratic Bezier segment.
Represents a rectangle defined by the coordinates of the upper-left corner (left, top) and the coordinates of the lower-right corner (right, bottom).
Represents a rectangle defined by the coordinates of the upper-left corner (left, top) and the coordinates of the lower-right corner (right, bottom).
Represents a rectangle defined by the coordinates of the upper-left corner (left, top) and the coordinates of the lower-right corner (right, bottom).
Represents a rectangle with rounded corners described by ellipses that touch the internal edges of the rectangle at the tangent points.
Stores an ordered pair of floating-point values, typically the width and height of a rectangle.
Stores an ordered pair of unsigned integer values, typically the width and height of a rectangle.
Represents a margin around an axis-aligned rectangle.
Represents a triangle described by its 3 corners.
Mathematical vector on the 2D (x, y) plane.
Mathematical vector on the 2D (x, y) plane.

## Enums

Specifies whether an arc should be greater than 180 degrees.
Represents a corner of the rectangle
Defines the direction that an elliptical arc is drawn.