#include <SkSVGFeLighting.h>
|
| SkSVGFeLighting (SkSVGTag t) |
|
std::vector< SkSVGFeInputType > | getInputs () const final |
|
bool | parseAndSetAttribute (const char *, const char *) override |
|
sk_sp< SkImageFilter > | onMakeImageFilter (const SkSVGRenderContext &, const SkSVGFilterContext &) const final |
|
virtual sk_sp< SkImageFilter > | makeDistantLight (const SkSVGRenderContext &, const SkSVGFilterContext &, const SkSVGFeDistantLight *) const =0 |
|
virtual sk_sp< SkImageFilter > | makePointLight (const SkSVGRenderContext &, const SkSVGFilterContext &, const SkSVGFePointLight *) const =0 |
|
virtual sk_sp< SkImageFilter > | makeSpotLight (const SkSVGRenderContext &, const SkSVGFilterContext &, const SkSVGFeSpotLight *) const =0 |
|
SkColor | resolveLightingColor (const SkSVGRenderContext &) const |
|
SkPoint3 | resolveXYZ (const SkSVGRenderContext &, const SkSVGFilterContext &, SkSVGNumberType, SkSVGNumberType, SkSVGNumberType) const |
|
| SkSVGFe (SkSVGTag t) |
|
| SkSVGHiddenContainer (SkSVGTag t) |
|
void | onRender (const SkSVGRenderContext &) const final |
|
| SkSVGContainer (SkSVGTag) |
|
SkPath | onAsPath (const SkSVGRenderContext &) const override |
|
SkRect | onObjectBoundingBox (const SkSVGRenderContext &) const override |
|
bool | hasChildren () const final |
|
| SkSVGTransformableNode (SkSVGTag) |
|
bool | onPrepareToRender (SkSVGRenderContext *) const override |
|
void | onSetAttribute (SkSVGAttribute, const SkSVGValue &) override |
|
void | mapToParent (SkPath *) const |
|
void | mapToParent (SkRect *) const |
|
| SkSVGNode (SkSVGTag) |
|
virtual bool | onAsPaint (const SkSVGRenderContext &, SkPaint *) const |
|
|
sk_sp< SkImageFilter > | makeImageFilter (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 |
|
void | appendChild (sk_sp< SkSVGNode >) override |
|
void | setTransform (const SkSVGTransformType &t) |
|
| ~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) |
|
| SkRefCntBase () |
|
virtual | ~SkRefCntBase () |
|
bool | unique () const |
|
void | ref () const |
|
void | unref () const |
|
static bool | IsFilterEffect (const sk_sp< SkSVGNode > &node) |
|
static SkMatrix | ComputeViewboxMatrix (const SkRect &, const SkRect &, SkSVGPreserveAspectRatio) |
|
skia_private::STArray< 1, sk_sp< SkSVGNode >, true > | fChildren |
|
Definition at line 18 of file SkSVGFeLighting.h.
◆ SkSVGFeLighting()
SkSVGFeLighting::SkSVGFeLighting |
( |
SkSVGTag |
t | ) |
|
|
inlineexplicitprotected |
◆ getInputs()
|
inlinefinalprotectedvirtual |
◆ makeDistantLight()
◆ makePointLight()
◆ makeSpotLight()
◆ onMakeImageFilter()
Implements SkSVGFe.
Definition at line 38 of file SkSVGFeLighting.cpp.
39 {
41 switch (child->tag()) {
51 default:
52
53 break;
54 }
55 }
56
57 SkDebugf(
"lighting filter effect needs exactly one light source\n");
58 return nullptr;
59}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
skia_private::STArray< 1, sk_sp< SkSVGNode >, true > fChildren
virtual sk_sp< SkImageFilter > makePointLight(const SkSVGRenderContext &, const SkSVGFilterContext &, const SkSVGFePointLight *) const =0
virtual sk_sp< SkImageFilter > makeDistantLight(const SkSVGRenderContext &, const SkSVGFilterContext &, const SkSVGFeDistantLight *) const =0
virtual sk_sp< SkImageFilter > makeSpotLight(const SkSVGRenderContext &, const SkSVGFilterContext &, const SkSVGFeSpotLight *) const =0
◆ parseAndSetAttribute()
bool SkSVGFeLighting::parseAndSetAttribute |
( |
const char * |
n, |
|
|
const char * |
v |
|
) |
| |
|
overrideprotectedvirtual |
Reimplemented from SkSVGFe.
Reimplemented in SkSVGFeSpecularLighting.
Definition at line 17 of file SkSVGFeLighting.cpp.
17 {
19 this->setSurfaceScale(
20 SkSVGAttributeParser::parse<SkSVGNumberType>("surfaceScale", n, v)) ||
21 this->setKernelUnitLength(SkSVGAttributeParser::parse<SkSVGFeLighting::KernelUnitLength>(
22 "kernelUnitLength", n, v));
23}
bool parseAndSetAttribute(const char *, const char *) override
◆ resolveLightingColor()
Definition at line 61 of file SkSVGFeLighting.cpp.
61 {
62 const auto color = this->getLightingColor();
63 if (!
color.isValue()) {
64
65 SkDebugf(
"unhandled: lighting-color has no value\n");
67 }
68
70}
constexpr SkColor SK_ColorWHITE
SkSVGColorType resolveSvgColor(const SkSVGColor &) const
◆ resolveXYZ()
Definition at line 72 of file SkSVGFeLighting.cpp.
76 {
78 const auto xy =
SkV2{
x,
y} * obbt.scale + obbt.offset;
83}
const SkSVGObjectBoundingBoxUnits & primitiveUnits() const
OBBTransform transformForCurrentOBB(SkSVGObjectBoundingBoxUnits) const
static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z)
The documentation for this class was generated from the following files: