本页内容

C

Qul::PlatformInterface::PathDataSegment Class

class Qul::PlatformInterface::PathDataSegment

表示Qul::PlatformInterface::PathData 类中的单个路径数据段。更多...

公共函数

const T *as() const
Qul::PlatformInterface::PathData::SegmentType type() const

详细说明

在使用type()函数查询段类型后,可通过as()模板函数将路径数据段向下转换为相应的子类。

示例:

Qul::PlatformInterface::PathDataIterator it(pathData);
Qul::PlatformInterface::PathDataSegment segment = it.next();
if (segment.type() == Qul::PathData::CubicBezierSegment) {
    // This down-cast is now safe
    const Qul::PlatformInterface::PathDataCubicBezierSegment *cubic =
        segment.as<Qul::PlatformInterface::PathDataCubicBezierSegment>();
}

成员函数文档

template <typename T> const T *PathDataSegment::as() const

将路径数据段向下转换为相应的子类。

如果子类与路径数据段类型不匹配,则将返回NULL 。

Qul::PlatformInterface::PathData::SegmentType PathDataSegment::type() const

返回路径数据段的类型。

在某些 Qt 许可下可用。
了解更多信息。