gfx/skia/trunk/src/effects/gradients/SkLinearGradient.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/effects/gradients/SkLinearGradient.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     1.4 +
     1.5 +/*
     1.6 + * Copyright 2012 Google Inc.
     1.7 + *
     1.8 + * Use of this source code is governed by a BSD-style license that can be
     1.9 + * found in the LICENSE file.
    1.10 + */
    1.11 +
    1.12 +#ifndef SkLinearGradient_DEFINED
    1.13 +#define SkLinearGradient_DEFINED
    1.14 +
    1.15 +#include "SkGradientShaderPriv.h"
    1.16 +
    1.17 +class SkLinearGradient : public SkGradientShaderBase {
    1.18 +public:
    1.19 +    SkLinearGradient(const SkPoint pts[2], const Descriptor&);
    1.20 +
    1.21 +    virtual bool setContext(const SkBitmap&, const SkPaint&, const SkMatrix&) SK_OVERRIDE;
    1.22 +    virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE;
    1.23 +    virtual void shadeSpan16(int x, int y, uint16_t dstC[], int count) SK_OVERRIDE;
    1.24 +    virtual BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const SK_OVERRIDE;
    1.25 +    virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
    1.26 +    virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint&) const SK_OVERRIDE;
    1.27 +
    1.28 +    SK_TO_STRING_OVERRIDE()
    1.29 +    SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLinearGradient)
    1.30 +
    1.31 +protected:
    1.32 +    SkLinearGradient(SkReadBuffer& buffer);
    1.33 +    virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
    1.34 +
    1.35 +private:
    1.36 +    typedef SkGradientShaderBase INHERITED;
    1.37 +    const SkPoint fStart;
    1.38 +    const SkPoint fEnd;
    1.39 +};
    1.40 +
    1.41 +#endif

mercurial