本文整理汇总了C++中SkWriteBuffer::writeScalar方法的典型用法代码示例。如果您正苦于以下问题:C++ SkWriteBuffer::writeScalar方法的具体用法?C++ SkWriteBuffer::writeScalar怎么用?C++ SkWriteBuffer::writeScalar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkWriteBuffer
的用法示例。
在下文中一共展示了SkWriteBuffer::writeScalar方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeFloat
void SkColor4Shader::flatten(SkWriteBuffer& buffer) const {
buffer.writeScalar(fColor4.fR); // writeFloat()
buffer.writeScalar(fColor4.fG);
buffer.writeScalar(fColor4.fB);
buffer.writeScalar(fColor4.fA);
buffer.writeBool(false); // TODO how do we flatten colorspaces?
}
示例2: flatten
void SkBlurDrawLooper::flatten(SkWriteBuffer& buffer) const {
buffer.writeColor(fBlurColor);
buffer.writeScalar(fSigma);
buffer.writeScalar(fDx);
buffer.writeScalar(fDy);
buffer.write32(fBlurFlags);
}
示例3:
void SkPath1DPathEffect::flatten(SkWriteBuffer& buffer) const {
buffer.writeScalar(fAdvance);
if (fAdvance > 0) {
buffer.writePath(fPath);
buffer.writeScalar(fInitialOffset);
buffer.writeUInt(fStyle);
}
}
示例4: flatten
void SkDropShadowImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeScalar(fDx);
buffer.writeScalar(fDy);
buffer.writeScalar(fSigmaX);
buffer.writeScalar(fSigmaY);
buffer.writeColor(fColor);
buffer.writeInt(static_cast<int>(fShadowMode));
}
示例5: flatten
void SkPerlinNoiseShader::flatten(SkWriteBuffer& buffer) const {
buffer.writeInt((int) fType);
buffer.writeScalar(fBaseFrequencyX);
buffer.writeScalar(fBaseFrequencyY);
buffer.writeInt(fNumOctaves);
buffer.writeScalar(fSeed);
buffer.writeInt(fTileSize.fWidth);
buffer.writeInt(fTileSize.fHeight);
}
示例6: flatten
void SkDashPathEffect::flatten(SkWriteBuffer& buffer) const {
SkASSERT(fInitialDashLength >= 0);
this->INHERITED::flatten(buffer);
buffer.writeInt(fInitialDashIndex);
buffer.writeScalar(fInitialDashLength);
buffer.writeScalar(fIntervalLength);
buffer.writeBool(fScaleToFit);
buffer.writeScalarArray(fIntervals, fCount);
}
示例7: flatten
void flatten(SkWriteBuffer& buffer) const override {
this->INHERITED::flatten(buffer);
for (int i = 0; i < 4; ++i) {
buffer.writeScalar(fK[i]);
}
buffer.writeBool(fEnforcePMColor);
}
示例8: flatten
void SkEmbossMaskFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
Light tmpLight = fLight;
tmpLight.fPad = 0; // for the font-cache lookup to be clean
buffer.writeByteArray(&tmpLight, sizeof(tmpLight));
buffer.writeScalar(fBlurSigma);
}
示例9: flatten
void SkMatrixConvolutionImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeInt(fKernelSize.fWidth);
buffer.writeInt(fKernelSize.fHeight);
buffer.writeScalarArray(fKernel, fKernelSize.fWidth * fKernelSize.fHeight);
buffer.writeScalar(fGain);
buffer.writeScalar(fBias);
buffer.writeInt(fKernelOffset.fX);
buffer.writeInt(fKernelOffset.fY);
buffer.writeInt((int) fTileMode);
buffer.writeBool(fConvolveAlpha);
}
示例10: flatten
void SkLights::flatten(SkWriteBuffer& buf) const {
buf.writeScalarArray(&this->ambientLightColor().fX, 3);
buf.writeInt(this->numLights());
for (int l = 0; l < this->numLights(); ++l) {
const Light& light = this->light(l);
bool isPoint = Light::kPoint_LightType == light.type();
buf.writeBool(isPoint);
buf.writeScalarArray(&light.color().fX, 3);
buf.writeScalarArray(&light.dir().fX, 3);
if (isPoint) {
buf.writeScalar(light.intensity());
}
}
}
示例11: flatten
void SkDisplacementMapEffect::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeInt((int) fXChannelSelector);
buffer.writeInt((int) fYChannelSelector);
buffer.writeScalar(fScale);
}
示例12: flatten
void SkComposeShader::flatten(SkWriteBuffer& buffer) const {
buffer.writeFlattenable(fDst.get());
buffer.writeFlattenable(fSrc.get());
buffer.write32((int)fMode);
buffer.writeScalar(fLerpT);
}
示例13: flatten
void SkBlurImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeScalar(fSigma.fWidth);
buffer.writeScalar(fSigma.fHeight);
}
示例14: flatten
void SkGammaColorFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeScalar(fGamma);
}
示例15: flatten
void SkMagnifierImageFilter::flatten(SkWriteBuffer& buffer) const {
this->INHERITED::flatten(buffer);
buffer.writeRect(fSrcRect);
buffer.writeScalar(fInset);
}