1 // SPDX-License-Identifier: GPL-2.0-or-later 2 #ifndef SP_FESPOTLIGHT_H_SEEN 3 #define SP_FESPOTLIGHT_H_SEEN 4 5 /** \file 6 * SVG <filter> implementation, see sp-filter.cpp. 7 */ 8 /* 9 * Authors: 10 * Hugo Rodrigues <haa.rodrigues@gmail.com> 11 * Niko Kiirala <niko@kiirala.com> 12 * Jean-Rene Reinhard <jr@komite.net> 13 * 14 * Copyright (C) 2006,2007 Authors 15 * 16 * Released under GNU GPL v2+, read the file 'COPYING' for more information. 17 */ 18 19 #include "object/sp-object.h" 20 21 #define SP_FESPOTLIGHT(obj) (dynamic_cast<SPFeSpotLight*>((SPObject*)obj)) 22 #define SP_IS_FESPOTLIGHT(obj) (dynamic_cast<const SPFeSpotLight*>((SPObject*)obj) != NULL) 23 24 class SPFeSpotLight : public SPObject { 25 public: 26 SPFeSpotLight(); 27 ~SPFeSpotLight() override; 28 29 /** x coordinate of the light source */ 30 float x; 31 unsigned int x_set : 1; 32 /** y coordinate of the light source */ 33 float y; 34 unsigned int y_set : 1; 35 /** z coordinate of the light source */ 36 float z; 37 unsigned int z_set : 1; 38 /** x coordinate of the point the source is pointing at */ 39 float pointsAtX; 40 unsigned int pointsAtX_set : 1; 41 /** y coordinate of the point the source is pointing at */ 42 float pointsAtY; 43 unsigned int pointsAtY_set : 1; 44 /** z coordinate of the point the source is pointing at */ 45 float pointsAtZ; 46 unsigned int pointsAtZ_set : 1; 47 /** specular exponent (focus of the light) */ 48 float specularExponent; 49 unsigned int specularExponent_set : 1; 50 /** limiting cone angle */ 51 float limitingConeAngle; 52 unsigned int limitingConeAngle_set : 1; 53 //other fields 54 55 protected: 56 void build(SPDocument* doc, Inkscape::XML::Node* repr) override; 57 void release() override; 58 59 void set(SPAttr key, char const* value) override; 60 61 void update(SPCtx* ctx, unsigned int flags) override; 62 63 Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags) override; 64 }; 65 66 #endif /* !SP_FESPOTLIGHT_H_SEEN */ 67 68 /* 69 Local Variables: 70 mode:c++ 71 c-file-style:"stroustrup" 72 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) 73 indent-tabs-mode:nil 74 fill-column:99 75 End: 76 */ 77 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : 78