1 // SPDX-License-Identifier: GPL-2.0-or-later 2 #ifndef SP_FEDISTANTLIGHT_H_SEEN 3 #define SP_FEDISTANTLIGHT_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 "../sp-object.h" 20 21 #define SP_FEDISTANTLIGHT(obj) (dynamic_cast<SPFeDistantLight*>((SPObject*)obj)) 22 #define SP_IS_FEDISTANTLIGHT(obj) (dynamic_cast<const SPFeDistantLight*>((SPObject*)obj) != NULL) 23 24 /* Distant light class */ 25 class SPFeDistantLight : public SPObject { 26 public: 27 SPFeDistantLight(); 28 ~SPFeDistantLight() override; 29 30 /** azimuth attribute */ 31 float azimuth; 32 unsigned int azimuth_set : 1; 33 /** elevation attribute */ 34 float elevation; 35 unsigned int elevation_set : 1; 36 37 protected: 38 void build(SPDocument* doc, Inkscape::XML::Node* repr) override; 39 void release() override; 40 41 void set(SPAttr key, char const* value) override; 42 43 void update(SPCtx* ctx, unsigned int flags) override; 44 45 Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags) override; 46 }; 47 48 #endif /* !SP_FEDISTANTLIGHT_H_SEEN */ 49 50 /* 51 Local Variables: 52 mode:c++ 53 c-file-style:"stroustrup" 54 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) 55 indent-tabs-mode:nil 56 fill-column:99 57 End: 58 */ 59 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : 60