|
Gnash
0.8.11dev
|
Defines an edge with a control point and an anchor point. More...
#include <Geometry.h>
Public Member Functions | |
| constexpr | Edge () |
| constexpr | Edge (std::int32_t cx, std::int32_t cy, std::int32_t ax, std::int32_t ay) |
| constexpr | Edge (const Edge &from) |
| constexpr | Edge (const point &ncp, const point &nap) |
| bool | straight () const |
| void | transform (const SWFMatrix &mat) |
| Transform the edge according to the given SWFMatrix. More... | |
Static Public Member Functions | |
| static double | squareDistancePtSeg (const point &p, const point &A, const point &B) |
| Return squared distance between point pt and segment A-B. More... | |
| static double | distancePtSeg (const point &pt, const point &A, const point &B) |
| Return distance between point pt and segment A-B. More... | |
| static point | pointOnCurve (const point &A, const point &C, const point &B, float t) |
| Find point of the quadratic curve defined by points A,C,B. More... | |
| static std::int64_t | squareDistancePtCurve (const point &A, const point &C, const point &B, const point &p, float t) |
Public Attributes | |
| point | cp |
| point | ap |
Defines an edge with a control point and an anchor point.
Could be a quadratic bezier curve, or a straight line(degenerated curve).
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlinestatic |
Return distance between point pt and segment A-B.
References gnash::key::A, gnash::key::B, and squareDistancePtSeg().
|
inlinestatic |
Find point of the quadratic curve defined by points A,C,B.
| A | The first point |
| C | The second point (control point) |
| B | The third point (anchor point) |
| t | the step factor between 0 and 1 |
References gnash::key::A, gnash::key::B, gnash::key::C, gnash::key::R, and gnash::key::t.
Referenced by squareDistancePtCurve().
|
inlinestatic |
Return square distance between point pt and the point on curve found by applying the T parameter to the quadratic bezier curve function
| A | The first point of the bezier curve |
| C | The second point of the bezier curve (control point) |
| B | The third point of the bezier curve (anchor point) |
| p | The point we want to compute distance from |
| t | the step factor between 0 and 1 |
References gnash::key::A, gnash::key::B, gnash::key::C, gnash::key::p, pointOnCurve(), and gnash::key::t.
|
inlinestatic |
Return squared distance between point pt and segment A-B.
References gnash::key::A, gnash::key::B, gnash::key::p, and gnash::key::u.
Referenced by distancePtSeg().
|
inline |
Referenced by gnash::Renderer_cairo::add_path(), and gnash::renderer::openvg::preparepath().
|
inline |
Transform the edge according to the given SWFMatrix.
References ap, cp, and gnash::SWFMatrix::transform().
| point gnash::Edge::ap |
| point gnash::Edge::cp |