1 Star 0 Fork 5.4K

Wu.Right / docs

forked from OpenHarmony / docs 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
geometry2d-h.md 5.98 KB
Copy Edit Raw Blame History
wenjun authored 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

geometry2d.h

Overview

Related Modules:

Graphic

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

Data Structure Name

Description

OHOS::Line

Defines a line, which consists of the start and end points.

OHOS::Polygon

Defines a polygon, including vertex coordinates and the maximum number of vertices (defined by MAX_VERTEX_NUM).

Functions

Function Name

Description

OHOS::Intersect (const Line &a, const Line &b, Vector2< int16_t > &out)

bool 

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)

bool 

Chekcs whether line segment a and line segment b intersect.

OHOS::Clip (Polygon &poly, const Line &line)

void 

Clips a polygon by using a line segment.

OHOS::SuthHodgClip (const Rect &clipRect, const Polygon &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)

void 

Clips a polygon by using a line segment and obtains the intersections.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wx_9846855d06/docs.git
git@gitee.com:wx_9846855d06/docs.git
wx_9846855d06
docs
docs
master

Search

344bd9b3 5694891 D2dac590 5694891