geometry2d.h
Overview
Related Modules:
Description:
Defines attributes of 2D geometries (including points, lines, rectangles, and polygons) of the lightweight graphics system and provides functions for performing operations on the geometries.
Since:
1.0
Version:
1.0
Summary
Data Structures
Defines a polygon, including vertex coordinates and the maximum number of vertices (defined by MAX_VERTEX_NUM). |
Functions
OHOS::Intersect (const Line &a, const Line &b, Vector2< int16_t > &out) |
Checks whether line segment a and line segment b intersect, and returns the intersection point (if available). |
OHOS::IsIntersect (const Line &a, const Line &b) |
|
OHOS::Clip (Polygon &poly, const Line &line) |
|
OHOS::SuthHodgClip (const Rect &clipRect, const Polygon &polygon) |
Implements Sutherland-Hodgman, an algorithm used for clipping polygons. |
OHOS::Clip (const Line &line, const Polygon &poly, Vector2< int16_t > pOut, uint8_t pNum) |
Clips a polygon by using a line segment and obtains the intersections. |