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


C++ SVGPathByteStream类代码示例

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


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

示例1: ASSERT

void SVGAnimatedPathAnimator::addAnimatedTypes(SVGAnimatedType* from, SVGAnimatedType* to)
{
    ASSERT(from->type() == AnimatedPath);
    ASSERT(from->type() == to->type());

    SVGPathByteStream* fromPath = from->path();
    SVGPathByteStream* toPath = to->path();
    unsigned fromPathSize = fromPath->size();
    if (!fromPathSize || fromPathSize != toPath->size())
        return;
    addToSVGPathByteStream(toPath, fromPath);
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: buildStringFromByteStream

bool buildStringFromByteStream(const SVGPathByteStream& stream, String& result, PathParsingMode parsingMode)
{
    if (stream.isEmpty())
        return true;

    SVGPathByteStreamSource source(stream);
    return SVGPathParser::parseToString(source, result, parsingMode);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:8,代码来源:SVGPathUtilities.cpp

示例7: 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

示例8: 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

示例9: buildPathFromByteStream

bool buildPathFromByteStream(const SVGPathByteStream& stream, Path& result)
{
    if (stream.isEmpty())
        return true;

    SVGPathBuilder builder(result);
    SVGPathByteStreamSource source(stream);
    return SVGPathParser::parse(source, builder);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:9,代码来源:SVGPathUtilities.cpp

示例10: buildSVGPathSegListFromByteStream

bool buildSVGPathSegListFromByteStream(const SVGPathByteStream& stream, SVGPathElement& element, SVGPathSegList& result, PathParsingMode parsingMode)
{
    if (stream.isEmpty())
        return true;

    SVGPathSegListBuilder builder(element, result, parsingMode == NormalizedParsing ? PathSegNormalizedRole : PathSegUnalteredRole);
    SVGPathByteStreamSource source(stream);
    return SVGPathParser::parse(source, builder, parsingMode);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:9,代码来源:SVGPathUtilities.cpp

示例11: buildPathFromByteStream

bool buildPathFromByteStream(const SVGPathByteStream& stream, Path& result)
{
    if (stream.isEmpty())
        return true;

    SVGPathBuilder builder(result);
    SVGPathByteStreamSource source(stream);
    SVGPathParser parser(&source, &builder);
    return parser.parsePathDataFromSource(NormalizedParsing);
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:10,代码来源:SVGPathUtilities.cpp

示例12: getPointAtLengthOfSVGPathByteStream

FloatPoint getPointAtLengthOfSVGPathByteStream(const SVGPathByteStream& stream, float length)
{
    if (stream.isEmpty())
        return FloatPoint();

    SVGPathTraversalStateBuilder builder(PathTraversalState::TraversalPointAtLength, length);
    SVGPathByteStreamSource source(stream);
    SVGPathParser parser(&source, &builder);
    parser.parsePathDataFromSource(NormalizedParsing);
    return builder.currentPoint();
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:11,代码来源:SVGPathUtilities.cpp

示例13: getTotalLengthOfSVGPathByteStream

float getTotalLengthOfSVGPathByteStream(const SVGPathByteStream& stream)
{
    if (stream.isEmpty())
        return 0;

    SVGPathTraversalStateBuilder builder(PathTraversalState::TraversalTotalLength);
    SVGPathByteStreamSource source(stream);
    SVGPathParser parser(&source, &builder);
    parser.parsePathDataFromSource(NormalizedParsing);
    return builder.totalLength();
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:11,代码来源:SVGPathUtilities.cpp

示例14: getSVGPathSegAtLengthFromSVGPathByteStream

unsigned getSVGPathSegAtLengthFromSVGPathByteStream(const SVGPathByteStream& stream, float length)
{
    if (stream.isEmpty())
        return 0;

    SVGPathTraversalStateBuilder builder(PathTraversalState::TraversalSegmentAtLength, length);
    SVGPathByteStreamSource source(stream);
    SVGPathParser parser(&source, &builder);
    parser.parsePathDataFromSource(NormalizedParsing);
    return builder.pathSegmentIndex();
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:11,代码来源:SVGPathUtilities.cpp

示例15: buildStringFromByteStream

bool buildStringFromByteStream(const SVGPathByteStream& stream, String& result, PathParsingMode parsingMode)
{
    if (stream.isEmpty())
        return true;

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


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