xref: /haiku/src/libs/icon/transformer/CompoundStyleTransformer.h (revision e1c4049fed1047bdb957b0529e1921e97ef94770)
1 /*
2  * Copyright 2023, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Zardshard
7  */
8 #ifndef COMPOUND_STYLE_TRANSFORMER_H
9 #define COMPOUND_STYLE_TRANSFORMER_H
10 
11 
12 #include <SupportDefs.h>
13 
14 #include "IconBuild.h"
15 #include "StyleTransformer.h"
16 
17 
18 _BEGIN_ICON_NAMESPACE
19 
20 class VertexSource;
21 class StyleTransformer;
22 
23 
24 /*! Allows turning an array of StyleTransformers into a single StyleTransformer.
25 
26 	\note This class is not meant to be exposed to the GUI or saved in a file. It
27 		is currently only used for rendering.
28 */
29 class CompoundStyleTransformer : public StyleTransformer {
30 public:
31 								CompoundStyleTransformer(
32 									StyleTransformer** transformers,
33 									int32 count);
34 	virtual						~CompoundStyleTransformer();
35 
36 	// StyleTransformer interface
37 	virtual	void				transform(double* x, double* y) const;
38 	virtual	void				Invert();
39 
40 	virtual bool				IsLinear();
41 
42 private:
43 			StyleTransformer**	fTransformers;
44 			int32				fCount;
45 };
46 
47 
48 _END_ICON_NAMESPACE
49 
50 
51 #endif	// COMPOUND_STYLE_TRANSFORMER_H
52