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


C++ SkWriteBuffer::writePaint方法代码示例

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


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

示例1: flattenToBuffer

void SkPictureData::flattenToBuffer(SkWriteBuffer& buffer) const {
    int i, n;

    // we never record bitmaps anymore, only images
    SkASSERT(fBitmaps.count() == 0);

    if ((n = fPaints.count()) > 0) {
        write_tag_size(buffer, SK_PICT_PAINT_BUFFER_TAG, n);
        for (i = 0; i < n; i++) {
            buffer.writePaint(fPaints[i]);
        }
    }

    if ((n = fPaths.count()) > 0) {
        write_tag_size(buffer, SK_PICT_PATH_BUFFER_TAG, n);
        buffer.writeInt(n);
        for (int i = 0; i < n; i++) {
            buffer.writePath(fPaths[i]);
        }
    }

    if (fTextBlobCount > 0) {
        write_tag_size(buffer, SK_PICT_TEXTBLOB_BUFFER_TAG, fTextBlobCount);
        for (i = 0; i  < fTextBlobCount; ++i) {
            fTextBlobRefs[i]->flatten(buffer);
        }
    }

    if (fImageCount > 0) {
        write_tag_size(buffer, SK_PICT_IMAGE_BUFFER_TAG, fImageCount);
        for (i = 0; i  < fImageCount; ++i) {
            buffer.writeImage(fImageRefs[i]);
        }
    }
}
开发者ID:HansMuller,项目名称:skia,代码行数:35,代码来源:SkPictureData.cpp

示例2: flatten

void SkLayerRasterizer::flatten(SkWriteBuffer& buffer) const {
    this->INHERITED::flatten(buffer);

    SkASSERT(fLayers);
    buffer.writeInt(fLayers->count());

    SkDeque::F2BIter                iter(*fLayers);
    const SkLayerRasterizer_Rec*    rec;

    while ((rec = (const SkLayerRasterizer_Rec*)iter.next()) != NULL) {
        buffer.writePaint(rec->fPaint);
        buffer.writePoint(rec->fOffset);
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:14,代码来源:SkLayerRasterizer.cpp

示例3: flatten

void SkLayerDrawLooper::flatten(SkWriteBuffer& buffer) const {
    buffer.writeInt(fCount);

    Rec* rec = fRecs;
    for (int i = 0; i < fCount; i++) {
        // Legacy "flagsmask" field -- now ignored, remove when we bump version
        buffer.writeInt(0);

        buffer.writeInt(rec->fInfo.fPaintBits);
        buffer.writeInt(rec->fInfo.fColorMode);
        buffer.writePoint(rec->fInfo.fOffset);
        buffer.writeBool(rec->fInfo.fPostTranslate);
        buffer.writePaint(rec->fPaint);
        rec = rec->fNext;
    }
}
开发者ID:435420057,项目名称:soui,代码行数:16,代码来源:SkLayerDrawLooper.cpp

示例4: flatten

 void flatten(SkWriteBuffer& buffer) const override {
     buffer.writePaint(fPaint);
 }
开发者ID:android,项目名称:platform_external_skia,代码行数:3,代码来源:FlattenDrawableTest.cpp

示例5: flatten

void SkPaintImageFilter::flatten(SkWriteBuffer& buffer) const {
    this->INHERITED::flatten(buffer);
    buffer.writePaint(fPaint);
}
开发者ID:blizardxsi,项目名称:123,代码行数:4,代码来源:SkPaintImageFilter.cpp


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