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


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

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


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

示例1: flatten

 void flatten(SkWriteBuffer& buf) const override {
     buf.writeBitmap(fDiffuseMap);
     buf.writeBitmap(fNormalMap);
     buf.writeScalarArray(&fLight.fDirection.fX, 3);
     buf.writeColor(fLight.fColor);
     buf.writeColor(fAmbientColor);
 }
开发者ID:mariospr,项目名称:chromium-browser,代码行数:7,代码来源:SampleLighting.cpp

示例2: 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());
        }
    }
}
开发者ID:jasonLaster,项目名称:gecko-dev,代码行数:18,代码来源:SkLights.cpp

示例3: 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);
}
开发者ID:JCROM-FxOS,项目名称:b2jc_gecko,代码行数:10,代码来源:SkDashPathEffect.cpp

示例4: 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);
}
开发者ID:Just-D,项目名称:skia,代码行数:12,代码来源:SkMatrixConvolutionImageFilter.cpp

示例5: flatten

void SkDashPathEffect::flatten(SkWriteBuffer& buffer) const {
    buffer.writeScalar(fPhase);
    buffer.writeScalarArray(fIntervals, fCount);
}
开发者ID:Crawping,项目名称:chromium_extract,代码行数:4,代码来源:SkDashPathEffect.cpp

示例6: Write

 static void Write(SkWriteBuffer& writer, SkScalar* data, uint32_t arraySize) {
     writer.writeScalarArray(data, arraySize);
 }
开发者ID:vschs007,项目名称:skia,代码行数:3,代码来源:SerializationTest.cpp

示例7: SkASSERT

void SkColorMatrixFilterRowMajor255::flatten(SkWriteBuffer& buffer) const {
    SkASSERT(sizeof(fMatrix)/sizeof(SkScalar) == 20);
    buffer.writeScalarArray(fMatrix, 20);
}
开发者ID:mokacao,项目名称:skia,代码行数:4,代码来源:SkColorMatrixFilterRowMajor255.cpp


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