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


C++ SkFlattenableReadBuffer::readScalar方法代码示例

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


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

示例1: INHERITED

SkDashPathEffect::SkDashPathEffect(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    fInitialDashIndex = buffer.readInt();
    fInitialDashLength = buffer.readScalar();
    fIntervalLength = buffer.readScalar();
    fScaleToFit = buffer.readBool();

    fCount = buffer.getArrayCount();
    fIntervals = (SkScalar*)sk_malloc_throw(sizeof(SkScalar) * fCount);
    buffer.readScalarArray(fIntervals);
}
开发者ID:killvxk,项目名称:KUI,代码行数:10,代码来源:SkDashPathEffect.cpp

示例2: INHERITED

SkBicubicImageFilter::SkBicubicImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    SkDEBUGCODE(bool success =) buffer.readScalarArray(fCoefficients, 16);
    SkASSERT(success);
    fScale.fWidth = buffer.readScalar();
    fScale.fHeight = buffer.readScalar();
    buffer.validate(SkScalarIsFinite(fScale.fWidth) &&
                    SkScalarIsFinite(fScale.fHeight) &&
                    (fScale.fWidth >= 0) &&
                    (fScale.fHeight >= 0));
}
开发者ID:rzr,项目名称:Tizen_Crosswalk,代码行数:10,代码来源:SkBicubicImageFilter.cpp

示例3: SkDEBUGF

SkPath1DPathEffect::SkPath1DPathEffect(SkFlattenableReadBuffer& buffer) {
    fAdvance = buffer.readScalar();
    if (fAdvance > 0) {
        fPath.unflatten(buffer);
        fInitialOffset = buffer.readScalar();
        fStyle = (Style) buffer.readU8();
    } else {
        SkDEBUGF(("SkPath1DPathEffect can't use advance <= 0\n"));
        // Make Coverity happy.
        fInitialOffset = 0;
        fStyle = kStyleCount;
    }
}
开发者ID:ghub,项目名称:NVprSDK,代码行数:13,代码来源:Sk1DPathEffect.cpp

示例4: INHERITED

SkLayerDrawLooper::SkLayerDrawLooper(SkFlattenableReadBuffer& buffer)
        : INHERITED(buffer),
          fRecs(NULL),
          fCount(0),
          fCurrRec(NULL) {
    int count = buffer.readInt();

    for (int i = 0; i < count; i++) {
        LayerInfo info;
        info.fPaintBits = buffer.readInt();
        info.fColorMode = (SkXfermode::Mode)buffer.readInt();
        info.fOffset.fX = buffer.readScalar();
        info.fOffset.fY = buffer.readScalar();
        info.fPostTranslate = buffer.readBool();
        this->addLayer(info)->unflatten(buffer);
    }
    SkASSERT(count == fCount);

    // we're in reverse order, so fix it now
    fRecs = Rec::Reverse(fRecs);
    
#ifdef SK_DEBUG
    {
        Rec* rec = fRecs;
        int n = 0;
        while (rec) {
            rec = rec->fNext;
            n += 1;
        }
        SkASSERT(count == n);
    }
#endif
}
开发者ID:ghub,项目名称:NVprSDK,代码行数:33,代码来源:SkLayerDrawLooper.cpp

示例5: INHERITED

SkDisplacementMapEffect::SkDisplacementMapEffect(SkFlattenableReadBuffer& buffer)
  : INHERITED(buffer)
{
    fXChannelSelector = (SkDisplacementMapEffect::ChannelSelectorType) buffer.readInt();
    fYChannelSelector = (SkDisplacementMapEffect::ChannelSelectorType) buffer.readInt();
    fScale            = buffer.readScalar();
}
开发者ID:IllusionRom-deprecated,项目名称:android_platform_external_chromium_org_third_party_skia_src,代码行数:7,代码来源:SkDisplacementMapEffect.cpp

示例6: SkMaskFilter

SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkFlattenableReadBuffer& buffer) : SkMaskFilter(buffer)
{
    fRadius = buffer.readScalar();
    fBlurStyle = (SkBlurMaskFilter::BlurStyle)buffer.readS32();
    fBlurFlags = buffer.readU32() & SkBlurMaskFilter::kAll_BlurFlag;
    SkASSERT(fRadius >= 0);
    SkASSERT((unsigned)fBlurStyle < SkBlurMaskFilter::kBlurStyleCount);
}
开发者ID:sergecodd,项目名称:FireFox-OS,代码行数:8,代码来源:SkBlurMaskFilter.cpp

示例7:

SkBlurDrawLooper::SkBlurDrawLooper(SkFlattenableReadBuffer& buffer)
{
    fDx = buffer.readScalar();
    fDy = buffer.readScalar();
    fBlurColor = buffer.readU32();
    fBlur = static_cast<SkMaskFilter*>(buffer.readFlattenable());
    fColorFilter = static_cast<SkColorFilter*>(buffer.readFlattenable());
    fBlurFlags = buffer.readU32() & kAll_BlurFlag;
}
开发者ID:achellies,项目名称:DUI_LIb,代码行数:9,代码来源:SkBlurDrawLooper.cpp

示例8: INHERITED

SkBlurDrawLooper::SkBlurDrawLooper(SkFlattenableReadBuffer& buffer)
: INHERITED(buffer) {

    fDx = buffer.readScalar();
    fDy = buffer.readScalar();
    fBlurColor = buffer.readColor();
    fBlur = buffer.readMaskFilter();
    fColorFilter = buffer.readColorFilter();
    fBlurFlags = buffer.readUInt() & kAll_BlurFlag;
}
开发者ID:CriGio,项目名称:platform_external_skia,代码行数:10,代码来源:SkBlurDrawLooper.cpp

示例9: SkMaskFilter

SkEmbossMaskFilter::SkEmbossMaskFilter(SkFlattenableReadBuffer& buffer)
    : SkMaskFilter(buffer) {
    SkASSERT(buffer.getArrayCount() == sizeof(Light));
    buffer.readByteArray(&fLight);
    SkASSERT(fLight.fPad == 0); // for the font-cache lookup to be clean
    fBlurSigma = buffer.readScalar();
#ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO
    // Fixing this must be done in two stages. When the skps are recaptured in V13,
    // remove the ConvertRadiusToSigma but retain the absolute value.
    // At the same time, switch the code in flatten to write a positive value.
    // When the skps are captured in V14 the absolute value can be removed.
    if (fBlurSigma > 0) {
        fBlurSigma = SkBlurMask::ConvertRadiusToSigma(fBlurSigma);
    } else {
        fBlurSigma = -fBlurSigma;
    }
#endif
}
开发者ID:shuowen,项目名称:kalpa,代码行数:18,代码来源:SkEmbossMaskFilter.cpp

示例10: paint_read

static void paint_read(SkPaint* paint, SkFlattenableReadBuffer& buffer)
{
    paint->setAntiAlias(buffer.readBool());
    paint->setStyle((SkPaint::Style)buffer.readU8());
    paint->setAlpha(buffer.readU8());
    
    if (paint->getStyle() != SkPaint::kFill_Style)
    {
        paint->setStrokeWidth(buffer.readScalar());
        paint->setStrokeMiter(buffer.readScalar());
        paint->setStrokeCap((SkPaint::Cap)buffer.readU8());
        paint->setStrokeJoin((SkPaint::Join)buffer.readU8());
    }

    paint->setMaskFilter((SkMaskFilter*)buffer.readFlattenable())->safeUnref();
    paint->setPathEffect((SkPathEffect*)buffer.readFlattenable())->safeUnref();
    paint->setRasterizer((SkRasterizer*)buffer.readFlattenable())->safeUnref();
    paint->setXfermode((SkXfermode*)buffer.readFlattenable())->safeUnref();
}
开发者ID:Dieken,项目名称:SurfaceFlinger,代码行数:19,代码来源:SkLayerRasterizer.cpp

示例11: SkRasterizer

SkLayerRasterizer::SkLayerRasterizer(SkFlattenableReadBuffer& buffer)
    : SkRasterizer(buffer), fLayers(sizeof(SkLayerRasterizer_Rec))
{
    int count = buffer.readS32();
    
    for (int i = 0; i < count; i++)
    {
        SkLayerRasterizer_Rec* rec = (SkLayerRasterizer_Rec*)fLayers.push_back();
    
#if 0
        new (&rec->fPaint) SkPaint(buffer);
#else
        new (&rec->fPaint) SkPaint;
        paint_read(&rec->fPaint, buffer);
#endif
        rec->fOffset.fX = buffer.readScalar();
        rec->fOffset.fY = buffer.readScalar();
    }
}
开发者ID:Dieken,项目名称:SurfaceFlinger,代码行数:19,代码来源:SkLayerRasterizer.cpp

示例12: INHERITED

SkRectShape::SkRectShape(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    buffer.readRect(&fBounds);
    fRadii.fWidth = buffer.readScalar();
    fRadii.fHeight = buffer.readScalar();
}
开发者ID:bunhere,项目名称:skia,代码行数:5,代码来源:SkRectShape.cpp

示例13:

SkCornerPathEffect::SkCornerPathEffect(SkFlattenableReadBuffer& buffer)
{
    fRadius = buffer.readScalar();
}
开发者ID:Dieken,项目名称:SurfaceFlinger,代码行数:4,代码来源:SkCornerPathEffect.cpp

示例14: INHERITED

SkDownSampleImageFilter::SkDownSampleImageFilter(SkFlattenableReadBuffer& buffer) : INHERITED(buffer) {
    fScale = buffer.readScalar();
}
开发者ID:AshishNamdev,项目名称:mozilla-central,代码行数:3,代码来源:SkTestImageFilters.cpp

示例15: INHERITED

SkBlurImageFilter::SkBlurImageFilter(SkFlattenableReadBuffer& buffer)
  : INHERITED(buffer) {
    fSigma.fWidth = buffer.readScalar();
    fSigma.fHeight = buffer.readScalar();
}
开发者ID:ghub,项目名称:NVprSDK,代码行数:5,代码来源:SkBlurImageFilter.cpp


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