Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Static Public Member Functions | Protected Member Functions | List of all members
SkSVGFeSpecularLighting Class Referencefinal

#include <SkSVGFeLighting.h>

Inheritance diagram for SkSVGFeSpecularLighting:
SkSVGFeLighting SkSVGFe SkSVGHiddenContainer SkSVGContainer SkSVGTransformableNode SkSVGNode SkRefCnt SkRefCntBase

Static Public Member Functions

static sk_sp< SkSVGFeSpecularLightingMake ()
 
- Static Public Member Functions inherited from SkSVGFe
static bool IsFilterEffect (const sk_sp< SkSVGNode > &node)
 

Protected Member Functions

bool parseAndSetAttribute (const char *, const char *) override
 
sk_sp< SkImageFiltermakeDistantLight (const SkSVGRenderContext &, const SkSVGFilterContext &, const SkSVGFeDistantLight *) const final
 
sk_sp< SkImageFiltermakePointLight (const SkSVGRenderContext &, const SkSVGFilterContext &, const SkSVGFePointLight *) const final
 
sk_sp< SkImageFiltermakeSpotLight (const SkSVGRenderContext &, const SkSVGFilterContext &, const SkSVGFeSpotLight *) const final
 
- Protected Member Functions inherited from SkSVGFeLighting
 SkSVGFeLighting (SkSVGTag t)
 
std::vector< SkSVGFeInputTypegetInputs () const final
 
sk_sp< SkImageFilteronMakeImageFilter (const SkSVGRenderContext &, const SkSVGFilterContext &) const final
 
SkColor resolveLightingColor (const SkSVGRenderContext &) const
 
SkPoint3 resolveXYZ (const SkSVGRenderContext &, const SkSVGFilterContext &, SkSVGNumberType, SkSVGNumberType, SkSVGNumberType) const
 
- Protected Member Functions inherited from SkSVGFe
 SkSVGFe (SkSVGTag t)
 
- Protected Member Functions inherited from SkSVGHiddenContainer
 SkSVGHiddenContainer (SkSVGTag t)
 
void onRender (const SkSVGRenderContext &) const final
 
- Protected Member Functions inherited from SkSVGContainer
 SkSVGContainer (SkSVGTag)
 
SkPath onAsPath (const SkSVGRenderContext &) const override
 
SkRect onObjectBoundingBox (const SkSVGRenderContext &) const override
 
bool hasChildren () const final
 
- Protected Member Functions inherited from SkSVGTransformableNode
 SkSVGTransformableNode (SkSVGTag)
 
bool onPrepareToRender (SkSVGRenderContext *) const override
 
void onSetAttribute (SkSVGAttribute, const SkSVGValue &) override
 
void mapToParent (SkPath *) const
 
void mapToParent (SkRect *) const
 
- Protected Member Functions inherited from SkSVGNode
 SkSVGNode (SkSVGTag)
 
virtual bool onAsPaint (const SkSVGRenderContext &, SkPaint *) const
 

Additional Inherited Members

- Public Member Functions inherited from SkSVGFe
sk_sp< SkImageFiltermakeImageFilter (const SkSVGRenderContext &ctx, const SkSVGFilterContext &fctx) const
 
SkRect resolveFilterSubregion (const SkSVGRenderContext &, const SkSVGFilterContext &) const
 
virtual SkSVGColorspace resolveColorspace (const SkSVGRenderContext &, const SkSVGFilterContext &) const
 
void applyProperties (SkSVGRenderContext *) const
 
- Public Member Functions inherited from SkSVGContainer
void appendChild (sk_sp< SkSVGNode >) override
 
- Public Member Functions inherited from SkSVGTransformableNode
void setTransform (const SkSVGTransformType &t)
 
- Public Member Functions inherited from SkSVGNode
 ~SkSVGNode () override
 
SkSVGTag tag () const
 
void render (const SkSVGRenderContext &) const
 
bool asPaint (const SkSVGRenderContext &, SkPaint *) const
 
SkPath asPath (const SkSVGRenderContext &) const
 
SkRect objectBoundingBox (const SkSVGRenderContext &) const
 
void setAttribute (SkSVGAttribute, const SkSVGValue &)
 
bool setAttribute (const char *attributeName, const char *attributeValue)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 
- Static Protected Member Functions inherited from SkSVGNode
static SkMatrix ComputeViewboxMatrix (const SkRect &, const SkRect &, SkSVGPreserveAspectRatio)
 
- Protected Attributes inherited from SkSVGContainer
skia_private::STArray< 1, sk_sp< SkSVGNode >, true > fChildren
 

Detailed Description

Definition at line 62 of file SkSVGFeLighting.h.

Member Function Documentation

◆ Make()

static sk_sp< SkSVGFeSpecularLighting > SkSVGFeSpecularLighting::Make ( )
inlinestatic

◆ makeDistantLight()

sk_sp< SkImageFilter > SkSVGFeSpecularLighting::makeDistantLight ( const SkSVGRenderContext ctx,
const SkSVGFilterContext fctx,
const SkSVGFeDistantLight light 
) const
finalprotectedvirtual

Implements SkSVGFeLighting.

Definition at line 93 of file SkSVGFeLighting.cpp.

96 {
97 const SkPoint3 dir = light->computeDirection();
99 this->resolveXYZ(ctx, fctx, dir.fX, dir.fY, dir.fZ),
100 this->resolveLightingColor(ctx),
101 this->getSurfaceScale(),
102 fSpecularConstant,
103 fSpecularExponent,
104 fctx.resolveInput(ctx, this->getIn(), this->resolveColorspace(ctx, fctx)),
105 this->resolveFilterSubregion(ctx, fctx));
106}
static sk_sp< SkImageFilter > DistantLitSpecular(const SkPoint3 &direction, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
SkPoint3 computeDirection() const
SkPoint3 resolveXYZ(const SkSVGRenderContext &, const SkSVGFilterContext &, SkSVGNumberType, SkSVGNumberType, SkSVGNumberType) const
sk_sp< SkImageFilter > resolveInput(const SkSVGRenderContext &, const SkSVGFeInputType &) const
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets dir
Definition switches.h:145

◆ makePointLight()

sk_sp< SkImageFilter > SkSVGFeSpecularLighting::makePointLight ( const SkSVGRenderContext ctx,
const SkSVGFilterContext fctx,
const SkSVGFePointLight light 
) const
finalprotectedvirtual

Implements SkSVGFeLighting.

Definition at line 108 of file SkSVGFeLighting.cpp.

110 {
112 this->resolveXYZ(ctx, fctx, light->getX(), light->getY(), light->getZ()),
113 this->resolveLightingColor(ctx),
114 this->getSurfaceScale(),
115 fSpecularConstant,
116 fSpecularExponent,
117 fctx.resolveInput(ctx, this->getIn(), this->resolveColorspace(ctx, fctx)),
118 this->resolveFilterSubregion(ctx, fctx));
119}
static sk_sp< SkImageFilter > PointLitSpecular(const SkPoint3 &location, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, sk_sp< SkImageFilter > input, const CropRect &cropRect={})

◆ makeSpotLight()

sk_sp< SkImageFilter > SkSVGFeSpecularLighting::makeSpotLight ( const SkSVGRenderContext ctx,
const SkSVGFilterContext fctx,
const SkSVGFeSpotLight light 
) const
finalprotectedvirtual

Implements SkSVGFeLighting.

Definition at line 121 of file SkSVGFeLighting.cpp.

123 {
124 const auto& limitingConeAngle = light->getLimitingConeAngle();
125 const float cutoffAngle = limitingConeAngle.isValid() ? *limitingConeAngle : 180.f;
126
128 this->resolveXYZ(ctx, fctx, light->getX(), light->getY(), light->getZ()),
129 this->resolveXYZ(
130 ctx, fctx, light->getPointsAtX(), light->getPointsAtY(), light->getPointsAtZ()),
131 light->getSpecularExponent(),
132 cutoffAngle,
133 this->resolveLightingColor(ctx),
134 this->getSurfaceScale(),
135 fSpecularConstant,
136 fSpecularExponent,
137 fctx.resolveInput(ctx, this->getIn(), this->resolveColorspace(ctx, fctx)),
138 this->resolveFilterSubregion(ctx, fctx));
139}
static sk_sp< SkImageFilter > SpotLitSpecular(const SkPoint3 &location, const SkPoint3 &target, SkScalar falloffExponent, SkScalar cutoffAngle, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, sk_sp< SkImageFilter > input, const CropRect &cropRect={})

◆ parseAndSetAttribute()

bool SkSVGFeSpecularLighting::parseAndSetAttribute ( const char *  n,
const char *  v 
)
overrideprotectedvirtual

Reimplemented from SkSVGFeLighting.

Definition at line 85 of file SkSVGFeLighting.cpp.

85 {
87 this->setSpecularConstant(
88 SkSVGAttributeParser::parse<SkSVGNumberType>("specularConstant", n, v)) ||
89 this->setSpecularExponent(
90 SkSVGAttributeParser::parse<SkSVGNumberType>("specularExponent", n, v));
91}
bool parseAndSetAttribute(const char *, const char *) override

The documentation for this class was generated from the following files: