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

#include <SkSVGFeLighting.h>

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

Static Public Member Functions

static sk_sp< SkSVGFeDiffuseLightingMake ()
 
- 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
 
bool parseAndSetAttribute (const char *, const char *) override
 
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 92 of file SkSVGFeLighting.h.

Member Function Documentation

◆ Make()

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

◆ makeDistantLight()

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

Implements SkSVGFeLighting.

Definition at line 147 of file SkSVGFeLighting.cpp.

150 {
151 const SkPoint3 dir = light->computeDirection();
153 this->resolveXYZ(ctx, fctx, dir.fX, dir.fY, dir.fZ),
154 this->resolveLightingColor(ctx),
155 this->getSurfaceScale(),
156 this->getDiffuseConstant(),
157 fctx.resolveInput(ctx, this->getIn(), this->resolveColorspace(ctx, fctx)),
158 this->resolveFilterSubregion(ctx, fctx));
159}
static sk_sp< SkImageFilter > DistantLitDiffuse(const SkPoint3 &direction, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, 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 > SkSVGFeDiffuseLighting::makePointLight ( const SkSVGRenderContext ctx,
const SkSVGFilterContext fctx,
const SkSVGFePointLight light 
) const
finalprotectedvirtual

Implements SkSVGFeLighting.

Definition at line 161 of file SkSVGFeLighting.cpp.

163 {
165 this->resolveXYZ(ctx, fctx, light->getX(), light->getY(), light->getZ()),
166 this->resolveLightingColor(ctx),
167 this->getSurfaceScale(),
168 this->getDiffuseConstant(),
169 fctx.resolveInput(ctx, this->getIn(), this->resolveColorspace(ctx, fctx)),
170 this->resolveFilterSubregion(ctx, fctx));
171}
static sk_sp< SkImageFilter > PointLitDiffuse(const SkPoint3 &location, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, sk_sp< SkImageFilter > input, const CropRect &cropRect={})

◆ makeSpotLight()

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

Implements SkSVGFeLighting.

Definition at line 173 of file SkSVGFeLighting.cpp.

175 {
176 const auto& limitingConeAngle = light->getLimitingConeAngle();
177 const float cutoffAngle = limitingConeAngle.isValid() ? *limitingConeAngle : 180.f;
178
180 this->resolveXYZ(ctx, fctx, light->getX(), light->getY(), light->getZ()),
181 this->resolveXYZ(
182 ctx, fctx, light->getPointsAtX(), light->getPointsAtY(), light->getPointsAtZ()),
183 light->getSpecularExponent(),
184 cutoffAngle,
185 this->resolveLightingColor(ctx),
186 this->getSurfaceScale(),
187 this->getDiffuseConstant(),
188 fctx.resolveInput(ctx, this->getIn(), this->resolveColorspace(ctx, fctx)),
189 this->resolveFilterSubregion(ctx, fctx));
190}
static sk_sp< SkImageFilter > SpotLitDiffuse(const SkPoint3 &location, const SkPoint3 &target, SkScalar falloffExponent, SkScalar cutoffAngle, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, sk_sp< SkImageFilter > input, const CropRect &cropRect={})

◆ parseAndSetAttribute()

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

Reimplemented from SkSVGFe.

Definition at line 141 of file SkSVGFeLighting.cpp.

141 {
142 return INHERITED::parseAndSetAttribute(n, v) ||
143 this->setDiffuseConstant(
144 SkSVGAttributeParser::parse<SkSVGNumberType>("diffuseConstant", n, v));
145}
bool parseAndSetAttribute(const char *, const char *) override

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