当前位置: 首页>>代码示例>>C++>>正文


C++ SVGPathByteStream::clear方法代码示例

本文整理汇总了C++中SVGPathByteStream::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGPathByteStream::clear方法的具体用法?C++ SVGPathByteStream::clear怎么用?C++ SVGPathByteStream::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SVGPathByteStream的用法示例。


在下文中一共展示了SVGPathByteStream::clear方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: buildSVGPathByteStreamFromSVGPathSegList

bool buildSVGPathByteStreamFromSVGPathSegList(const SVGPathSegList& list, SVGPathByteStream& result, PathParsingMode parsingMode)
{
    result.clear();
    if (list.isEmpty())
        return true;

    SVGPathSegListSource source(list);
    return SVGPathParser::parseToByteStream(source, result, parsingMode);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:9,代码来源:SVGPathUtilities.cpp

示例2: buildSVGPathByteStreamFromString

bool buildSVGPathByteStreamFromString(const String& d, SVGPathByteStream& result, PathParsingMode parsingMode)
{
    result.clear();
    if (d.isEmpty())
        return true;

    SVGPathStringSource source(d);
    return SVGPathParser::parseToByteStream(source, result, parsingMode);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:9,代码来源:SVGPathUtilities.cpp

示例3: buildAnimatedSVGPathByteStream

bool buildAnimatedSVGPathByteStream(const SVGPathByteStream& fromStream, const SVGPathByteStream& toStream, SVGPathByteStream& result, float progress)
{
    ASSERT(&toStream != &result);
    result.clear();
    if (toStream.isEmpty())
        return true;

    SVGPathByteStreamBuilder builder(result);

    SVGPathByteStreamSource fromSource(fromStream);
    SVGPathByteStreamSource toSource(toStream);
    return SVGPathBlender::blendAnimatedPath(fromSource, toSource, builder, progress);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:13,代码来源:SVGPathUtilities.cpp

示例4: addToSVGPathByteStream

bool addToSVGPathByteStream(SVGPathByteStream& fromStream, const SVGPathByteStream& byStream, unsigned repeatCount)
{
    if (fromStream.isEmpty() || byStream.isEmpty())
        return true;

    OwnPtr<SVGPathByteStream> fromStreamCopy = fromStream.copy();
    fromStream.clear();

    SVGPathByteStreamBuilder builder(fromStream);
    SVGPathByteStreamSource fromSource(*fromStreamCopy);
    SVGPathByteStreamSource bySource(byStream);
    SVGPathBlender blender(&fromSource, &bySource, &builder);
    return blender.addAnimatedPath(repeatCount);
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:14,代码来源:SVGPathUtilities.cpp

示例5: buildSVGPathByteStreamFromString

bool buildSVGPathByteStreamFromString(const String& d, SVGPathByteStream& result, PathParsingMode parsingMode)
{
    result.clear();
    if (d.isEmpty())
        return true;

    // The string length is typically a minor overestimate of eventual byte stream size, so it avoids us a lot of reallocs.
    result.reserveInitialCapacity(d.length());

    SVGPathByteStreamBuilder builder(result);
    SVGPathStringSource source(d);
    SVGPathParser parser(&source, &builder);
    bool ok = parser.parsePathDataFromSource(parsingMode);
    result.shrinkToFit();
    return ok;
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:16,代码来源:SVGPathUtilities.cpp

示例6: addToSVGPathByteStream

bool addToSVGPathByteStream(SVGPathByteStream& streamToAppendTo, const SVGPathByteStream& byStream, unsigned repeatCount)
{
    // Why return when streamToAppendTo is empty? Don't we still need to append?
    if (streamToAppendTo.isEmpty() || byStream.isEmpty())
        return true;

    // Is it OK to make the SVGPathByteStreamBuilder from a stream, and then clear that stream?
    SVGPathByteStreamBuilder builder(streamToAppendTo);

    SVGPathByteStream fromStreamCopy = streamToAppendTo;
    streamToAppendTo.clear();

    SVGPathByteStreamSource fromSource(fromStreamCopy);
    SVGPathByteStreamSource bySource(byStream);
    return SVGPathBlender::addAnimatedPath(fromSource, bySource, builder, repeatCount);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:16,代码来源:SVGPathUtilities.cpp


注:本文中的SVGPathByteStream::clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。