gfx/skia/trunk/include/effects/SkCornerPathEffect.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/include/effects/SkCornerPathEffect.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +/*
     1.5 + * Copyright 2006 The Android Open Source Project
     1.6 + *
     1.7 + * Use of this source code is governed by a BSD-style license that can be
     1.8 + * found in the LICENSE file.
     1.9 + */
    1.10 +
    1.11 +#ifndef SkCornerPathEffect_DEFINED
    1.12 +#define SkCornerPathEffect_DEFINED
    1.13 +
    1.14 +#include "SkPathEffect.h"
    1.15 +
    1.16 +/** \class SkCornerPathEffect
    1.17 +
    1.18 +    SkCornerPathEffect is a subclass of SkPathEffect that can turn sharp corners
    1.19 +    into various treatments (e.g. rounded corners)
    1.20 +*/
    1.21 +class SK_API SkCornerPathEffect : public SkPathEffect {
    1.22 +public:
    1.23 +    /** radius must be > 0 to have an effect. It specifies the distance from each corner
    1.24 +        that should be "rounded".
    1.25 +    */
    1.26 +    static SkCornerPathEffect* Create(SkScalar radius) {
    1.27 +        return SkNEW_ARGS(SkCornerPathEffect, (radius));
    1.28 +    }
    1.29 +    virtual ~SkCornerPathEffect();
    1.30 +
    1.31 +    virtual bool filterPath(SkPath* dst, const SkPath& src,
    1.32 +                            SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
    1.33 +
    1.34 +    SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkCornerPathEffect)
    1.35 +
    1.36 +protected:
    1.37 +    SkCornerPathEffect(SkReadBuffer&);
    1.38 +    virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
    1.39 +
    1.40 +#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS
    1.41 +public:
    1.42 +#endif
    1.43 +    SkCornerPathEffect(SkScalar radius);
    1.44 +
    1.45 +private:
    1.46 +    SkScalar    fRadius;
    1.47 +
    1.48 +    typedef SkPathEffect INHERITED;
    1.49 +};
    1.50 +
    1.51 +#endif

mercurial