本文整理汇总了C++中SkFlattenableReadBuffer::readRect方法的典型用法代码示例。如果您正苦于以下问题:C++ SkFlattenableReadBuffer::readRect方法的具体用法?C++ SkFlattenableReadBuffer::readRect怎么用?C++ SkFlattenableReadBuffer::readRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkFlattenableReadBuffer
的用法示例。
在下文中一共展示了SkFlattenableReadBuffer::readRect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CropRect
SkImageFilter::SkImageFilter(int inputCount, SkFlattenableReadBuffer& buffer) {
fInputCount = buffer.readInt();
if (buffer.validate((fInputCount >= 0) && ((inputCount < 0) || (fInputCount == inputCount)))) {
fInputs = new SkImageFilter*[fInputCount];
for (int i = 0; i < fInputCount; i++) {
if (buffer.readBool()) {
fInputs[i] = buffer.readImageFilter();
} else {
fInputs[i] = NULL;
}
if (!buffer.isValid()) {
fInputCount = i; // Do not use fInputs past that point in the destructor
break;
}
}
SkRect rect;
buffer.readRect(&rect);
if (buffer.isValid() && buffer.validate(SkIsValidRect(rect))) {
uint32_t flags = buffer.readUInt();
fCropRect = CropRect(rect, flags);
}
} else {
fInputCount = 0;
fInputs = NULL;
}
}
示例2: INHERITED
SkRectShape::SkRectShape(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
buffer.readRect(&fBounds);
fRadii.fWidth = buffer.readScalar();
fRadii.fHeight = buffer.readScalar();
}
示例3: INHERITED
SkPictureImageFilter::SkPictureImageFilter(SkFlattenableReadBuffer& buffer)
: INHERITED(0, buffer),
fPicture(NULL) {
// FIXME: unflatten picture here.
buffer.readRect(&fRect);
}