本文整理汇总了C++中SkWriteBuffer::writePath方法的典型用法代码示例。如果您正苦于以下问题:C++ SkWriteBuffer::writePath方法的具体用法?C++ SkWriteBuffer::writePath怎么用?C++ SkWriteBuffer::writePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkWriteBuffer
的用法示例。
在下文中一共展示了SkWriteBuffer::writePath方法的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]);
}
}
}
示例2:
void SkPath1DPathEffect::flatten(SkWriteBuffer& buffer) const {
buffer.writeScalar(fAdvance);
if (fAdvance > 0) {
buffer.writePath(fPath);
buffer.writeScalar(fInitialOffset);
buffer.writeUInt(fStyle);
}
}
示例3: flatten
void SkPathHeap::flatten(SkWriteBuffer& buffer) const {
int count = fPaths.count();
buffer.writeInt(count);
SkPath* const* iter = fPaths.begin();
SkPath* const* stop = fPaths.end();
while (iter < stop) {
buffer.writePath(**iter);
iter++;
}
}
示例4: Write
static void Write(SkWriteBuffer& writer, const SkPath* path) {
writer.writePath(*path);
}
示例5:
void SkPath2DPathEffect::flatten(SkWriteBuffer& buffer) const {
buffer.writeMatrix(this->getMatrix());
buffer.writePath(fPath);
}