5 #ifndef __cbitmapfilter__ 6 #define __cbitmapfilter__ 15 namespace BitmapFilter {
47 Type getType ()
const {
return type; }
49 int32_t getInteger ()
const;
50 double getFloat ()
const;
52 const CRect& getRect ()
const;
53 const CPoint& getPoint ()
const;
54 const CColor& getColor ()
const;
62 template<
typename T>
void assign (T value);
74 virtual bool run (
bool replaceInputBitmap =
false) = 0;
76 virtual UTF8StringPtr getDescription ()
const = 0;
77 virtual bool setProperty (IdStringPtr name,
const Property& property) = 0;
78 virtual bool setProperty (IdStringPtr name,
Property&& property) = 0;
79 virtual const Property& getProperty (IdStringPtr name)
const = 0;
81 virtual uint32_t getNumProperties ()
const = 0;
82 virtual IdStringPtr getPropertyName (uint32_t index)
const = 0;
83 virtual Property::Type getPropertyType (uint32_t index)
const = 0;
84 virtual Property::Type getPropertyType (IdStringPtr name)
const = 0;
86 using CreateFunction =
IFilter* (*) (IdStringPtr name);
99 uint32_t getNumFilters ()
const;
100 IdStringPtr getFilterName (uint32_t index)
const;
102 IFilter* createFilter (IdStringPtr name)
const;
104 bool registerFilter (IdStringPtr name, IFilter::CreateFunction createFunction);
105 bool unregisterFilter (IdStringPtr name, IFilter::CreateFunction createFunction);
107 using FilterMap = std::map<std::string, IFilter::CreateFunction>;
123 static const IdStringPtr kBoxBlur =
"Box Blur";
133 static const IdStringPtr kGrayscale =
"Grayscale";
145 static const IdStringPtr kReplaceColor =
"Replace Color";
158 static const IdStringPtr kSetColor =
"Set Color";
170 static const IdStringPtr kScaleBilinear =
"Scale Biliniear";
182 static const IdStringPtr kScaleLinear =
"Scale Linear";
187 static const IdStringPtr kInputBitmap =
"InputBitmap";
188 static const IdStringPtr kOutputBitmap =
"OutputBitmap";
189 static const IdStringPtr kRadius =
"Radius";
190 static const IdStringPtr kInputColor =
"InputColor";
191 static const IdStringPtr kOutputColor =
"OutputColor";
192 static const IdStringPtr kOutputRect =
"OutputRect";
193 static const IdStringPtr kIgnoreAlphaColorValue =
"IgnoreAlphaColorValue";
208 bool registerProperty (IdStringPtr name,
const Property& defaultProperty);
209 CBitmap* getInputBitmap ()
const;
211 UTF8StringPtr getDescription ()
const override;
212 bool setProperty (IdStringPtr name,
const Property& property)
override;
213 bool setProperty (IdStringPtr name,
Property&& property)
override;
214 const Property& getProperty (IdStringPtr name)
const override;
216 uint32_t getNumProperties ()
const override;
217 IdStringPtr getPropertyName (uint32_t index)
const override;
218 Property::Type getPropertyType (uint32_t index)
const override;
219 Property::Type getPropertyType (IdStringPtr name)
const override;
222 using PropertyMap = std::map<std::string, Property>;
223 std::string description;
224 PropertyMap properties;
231 #endif // __cbitmapfilter__ Bitmap Filter Factory.
Definition: cbitmapfilter.h:94
Rect structure.
Definition: crect.h:17
RGBA Color structure.
Definition: ccolor.h:15
Filter Interface.
Definition: cbitmapfilter.h:71
A Base Class for Implementing Bitmap Filters.
Definition: cbitmapfilter.h:203
Filter Property.
Definition: cbitmapfilter.h:21
Encapsulates various platform depended kinds of bitmaps.
Definition: cbitmap.h:21
Definition: customcontrols.cpp:8
Definition: vstguibase.h:247
Definition: vstguibase.h:238
Point structure.
Definition: cpoint.h:17