载入中...
搜索中...
未找到
eve::graphics::Path2D类 参考
Owning backend-neutral 2D vector path. 更多...
#include <PrimitivePath.h>
Public 成员函数 | |
| Path2D & | moveTo (glm::vec2 point) |
| Starts a new contour at point. | |
| Path2D & | lineTo (glm::vec2 point) |
| Adds a straight segment to point. | |
| Path2D & | quadTo (glm::vec2 control, glm::vec2 point) |
| Adds a quadratic Bezier segment. | |
| Path2D & | cubicTo (glm::vec2 control1, glm::vec2 control2, glm::vec2 point) |
| Adds a cubic Bezier segment. | |
| Path2D & | close () |
| Closes the current contour. | |
| void | clear () noexcept |
| Removes all verbs and points while retaining capacity. | |
| std::vector< FlattenedContour2D > | flatten (float tolerance=0.25f, std::uint32_t maxDepth=12) const |
| Flattens curves into owning line contours. | |
| void | setFillRule (PathFillRule rule) noexcept |
| PathFillRule | fillRule () const noexcept |
| Fill rule. | |
| bool | empty () const noexcept |
| Empty. | |
详细描述
Owning backend-neutral 2D vector path.
Path mutation and flattening are CPU-only and thread-compatible when each instance has one owner. The object retains no Canvas or backend pointers.
在文件 PrimitivePath.h 第 27 行定义.
成员函数说明
◆ clear()
|
noexcept |
Removes all verbs and points while retaining capacity.
在文件 PrimitivePath.cpp 第 104 行定义.
◆ close()
| Path2D & eve::graphics::Path2D::close | ( | ) |
◆ cubicTo()
| Path2D & eve::graphics::Path2D::cubicTo | ( | glm::vec2 | control1, |
| glm::vec2 | control2, | ||
| glm::vec2 | point | ||
| ) |
◆ empty()
|
inlinenoexcept |
Empty.
在文件 PrimitivePath.h 第 53 行定义.
◆ fillRule()
|
inlinenoexcept |
Fill rule.
在文件 PrimitivePath.h 第 51 行定义.
◆ flatten()
| std::vector< FlattenedContour2D > eve::graphics::Path2D::flatten | ( | float | tolerance = 0.25f, |
| std::uint32_t | maxDepth = 12 |
||
| ) | const |
Flattens curves into owning line contours.
- 参数
-
tolerance Maximum control-point deviation in path units; positive and finite. maxDepth Hard recursion bound used for adversarial curves.
在文件 PrimitivePath.cpp 第 110 行定义.
引用了 current, end , 以及 EV_PARAM_CHECK.
◆ lineTo()
| Path2D & eve::graphics::Path2D::lineTo | ( | glm::vec2 | point | ) |
◆ moveTo()
| Path2D & eve::graphics::Path2D::moveTo | ( | glm::vec2 | point | ) |
◆ quadTo()
| Path2D & eve::graphics::Path2D::quadTo | ( | glm::vec2 | control, |
| glm::vec2 | point | ||
| ) |
◆ setFillRule()
|
inlinenoexcept |
在文件 PrimitivePath.h 第 49 行定义.
该类的文档由以下文件生成:
- src/modules/graphics/PrimitivePath.h
- src/modules/graphics/PrimitivePath.cpp