1 Star 0 Fork 4.9K

平凡 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
geometry2d-h.md 5.98 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 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.

1
https://gitee.com/pingfan_vs_hs/docs.git
git@gitee.com:pingfan_vs_hs/docs.git
pingfan_vs_hs
docs
docs
master

搜索帮助