Gnash
0.8.11dev
|
2D Point class More...
#include <Point2d.h>
Public Member Functions | |
constexpr | Point2d () |
Construct a Point2d with default x and y coordinates. More... | |
constexpr | Point2d (std::int32_t cx, std::int32_t cy) |
Construct a Point2d with given x and y ordinates. More... | |
Point2d (const Point2d &p0, const Point2d &p1, float t) | |
Construct a Point2d as an interpolation of the given input points. More... | |
Point2d & | setTo (const std::int32_t cx, const std::int32_t cy) |
Set coordinates to given values. More... | |
Point2d & | setTo (const Point2d &p0, const Point2d &p1, float t) |
Set coordinates to the ones of the interpolation between the given input points. More... | |
std::int64_t | squareDistance (const Point2d &p) const |
Return square distance between this and the given point. More... | |
std::int32_t | distance (const Point2d &p) const |
Return distance between this and the given point. More... | |
bool | operator== (const Point2d &p) const |
bool | operator!= (const Point2d &p) const |
Static Public Member Functions | |
static std::int64_t | squareDistance (const Point2d &p0, const Point2d &p1) |
Return square distance between two given points. More... | |
Public Attributes | |
std::int32_t | x |
The x coordinate. More... | |
std::int32_t | y |
The y coordinate. More... | |
2D Point class
A point which contains a x and a y coorinate in TWIPS.
|
inline |
Construct a Point2d with default x and y coordinates.
|
inline |
Construct a Point2d with given x and y ordinates.
Construct a Point2d as an interpolation of the given input points.
p0 | first point |
p1 | second point |
t | interpolation factor, between 0 and 1 |
|
inline |
Return distance between this and the given point.
References squareDistance().
Referenced by gnash::renderer::opengl::trace_curve().
|
inline |
References gnash::key::p.
|
inline |
Set coordinates to given values.
Set coordinates to the ones of the interpolation between the given input points.
p0 | first point |
p1 | second point |
t | interpolation factor, between 0 and 1 |
References gnash::key::t, x, and y.
|
inlinestatic |
Return square distance between two given points.
Referenced by distance(), squareDistance(), gnash::Edge::squareDistancePtCurve(), and gnash::Edge::squareDistancePtSeg().
|
inline |
Return square distance between this and the given point.
References squareDistance().
std::int32_t gnash::geometry::Point2d::x |
The x coordinate.
Referenced by gnash::Renderer_cairo::add_path(), gnash::SWFRect::clamp(), gnash::renderer::openvg::Renderer_ovg::disable_mask(), gnash::renderer::openvg::Renderer_ovg::draw_poly(), gnash::SWFRect::enclose_transformed_rect(), gnash::DynamicShape::endFill(), gnash::SWFRect::expand_to_transformed_rect(), gnash::Path::expandBounds(), gnash::renderer::opengl::middle(), gnash::geometry::operator<<(), operator==(), gnash::Renderer::pixel_to_world(), gnash::Shape::pointInShape(), gnash::MorphShape::pointInShape(), gnash::TextField::pointInShape(), gnash::MovieClip::pointInVisibleShape(), gnash::geometry::pointTest(), gnash::renderer::openvg::preparepath(), gnash::registerMovieClipNative(), gnash::Path::reset(), gnash::movie_root::setDragState(), setTo(), squareDistance(), gnash::Edge::squareDistancePtSeg(), test_geometry(), gnash::Button::topmostMouseEntity(), gnash::TextField::topmostMouseEntity(), gnash::MovieClip::topmostMouseEntity(), gnash::SWFMatrix::transform(), gnash::renderer::DirectFB::Renderer_DirectFB::world_to_pixel(), gnash::renderer::openvg::Renderer_ovg::world_to_pixel(), gnash::renderer::gles1::Renderer_gles1::world_to_pixel(), and gnash::DisplayObject::MaskRenderer::~MaskRenderer().
std::int32_t gnash::geometry::Point2d::y |
The y coordinate.
Referenced by gnash::Renderer_cairo::add_path(), gnash::SWFRect::clamp(), gnash::renderer::openvg::Renderer_ovg::disable_mask(), gnash::renderer::openvg::Renderer_ovg::draw_poly(), gnash::SWFRect::enclose_transformed_rect(), gnash::DynamicShape::endFill(), gnash::SWFRect::expand_to_transformed_rect(), gnash::Path::expandBounds(), gnash::renderer::opengl::middle(), gnash::geometry::operator<<(), operator==(), gnash::Renderer::pixel_to_world(), gnash::Shape::pointInShape(), gnash::MorphShape::pointInShape(), gnash::TextField::pointInShape(), gnash::MovieClip::pointInVisibleShape(), gnash::geometry::pointTest(), gnash::renderer::openvg::preparepath(), gnash::registerMovieClipNative(), gnash::Path::reset(), gnash::movie_root::setDragState(), setTo(), squareDistance(), gnash::Edge::squareDistancePtSeg(), test_geometry(), gnash::Button::topmostMouseEntity(), gnash::TextField::topmostMouseEntity(), gnash::MovieClip::topmostMouseEntity(), gnash::SWFMatrix::transform(), gnash::renderer::DirectFB::Renderer_DirectFB::world_to_pixel(), gnash::renderer::openvg::Renderer_ovg::world_to_pixel(), gnash::renderer::gles1::Renderer_gles1::world_to_pixel(), and gnash::DisplayObject::MaskRenderer::~MaskRenderer().