载入中...
搜索中...
未找到
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()

void eve::graphics::Path2D::clear ( )
noexcept

Removes all verbs and points while retaining capacity.

在文件 PrimitivePath.cpp 第 104 行定义.

◆ close()

Path2D & eve::graphics::Path2D::close ( )

Closes the current contour.

在文件 PrimitivePath.cpp 第 97 行定义.

引用了 EV_PARAM_CHECK.

◆ cubicTo()

Path2D & eve::graphics::Path2D::cubicTo ( glm::vec2  control1,
glm::vec2  control2,
glm::vec2  point 
)

Adds a cubic Bezier segment.

在文件 PrimitivePath.cpp 第 85 行定义.

引用了 EV_PARAM_CHECK , 以及 point.

◆ empty()

bool eve::graphics::Path2D::empty ( ) const
inlinenoexcept

Empty.

在文件 PrimitivePath.h 第 53 行定义.

◆ fillRule()

PathFillRule eve::graphics::Path2D::fillRule ( ) const
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.

参数
toleranceMaximum control-point deviation in path units; positive and finite.
maxDepthHard recursion bound used for adversarial curves.

在文件 PrimitivePath.cpp 第 110 行定义.

引用了 current, end , 以及 EV_PARAM_CHECK.

◆ lineTo()

Path2D & eve::graphics::Path2D::lineTo ( glm::vec2  point)

Adds a straight segment to point.

在文件 PrimitivePath.cpp 第 67 行定义.

引用了 EV_PARAM_CHECK , 以及 point.

◆ moveTo()

Path2D & eve::graphics::Path2D::moveTo ( glm::vec2  point)

Starts a new contour at point.

在文件 PrimitivePath.cpp 第 59 行定义.

引用了 point.

◆ quadTo()

Path2D & eve::graphics::Path2D::quadTo ( glm::vec2  control,
glm::vec2  point 
)

Adds a quadratic Bezier segment.

在文件 PrimitivePath.cpp 第 75 行定义.

引用了 EV_PARAM_CHECK , 以及 point.

◆ setFillRule()

void eve::graphics::Path2D::setFillRule ( PathFillRule  rule)
inlinenoexcept

在文件 PrimitivePath.h 第 49 行定义.


该类的文档由以下文件生成: