LMMS
Loading...
Searching...
No Matches
juce_RelativePointPath.h
Go to the documentation of this file.
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11 Agreement and JUCE Privacy Policy.
12
13 End User License Agreement: www.juce.com/juce-7-licence
14 Privacy Policy: www.juce.com/juce-privacy-policy
15
16 Or: You may also use this code under the terms of the GPL v3 (see
17 www.gnu.org/licenses).
18
19 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21 DISCLAIMED.
22
23 ==============================================================================
24*/
25
26namespace juce
27{
28
29//==============================================================================
41{
42public:
43 //==============================================================================
46 explicit RelativePointPath (const Path& path);
48
49 bool operator== (const RelativePointPath&) const noexcept;
50 bool operator!= (const RelativePointPath&) const noexcept;
51
52 //==============================================================================
54 void createPath (Path& path, Expression::Scope* scope) const;
55
57 bool containsAnyDynamicPoints() const;
58
60 void swapWith (RelativePointPath&) noexcept;
61
62 //==============================================================================
75
76 //==============================================================================
80 {
81 public:
83 virtual ~ElementBase() = default;
84 virtual void addToPath (Path& path, Expression::Scope*) const = 0;
85 virtual RelativePoint* getControlPoints (int& numPoints) = 0;
86 virtual ElementBase* clone() const = 0;
87 bool isDynamic();
88
90
91 private:
93 };
94
95 //==============================================================================
98 {
99 public:
100 StartSubPath (const RelativePoint& pos);
101 void addToPath (Path& path, Expression::Scope*) const override;
102 RelativePoint* getControlPoints (int& numPoints) override;
103 ElementBase* clone() const override;
104
106
107 private:
109 };
110
111 //==============================================================================
114 {
115 public:
116 CloseSubPath();
117 void addToPath (Path& path, Expression::Scope*) const override;
118 RelativePoint* getControlPoints (int& numPoints) override;
119 ElementBase* clone() const override;
120
121 private:
123 };
124
125 //==============================================================================
128 {
129 public:
131 void addToPath (Path& path, Expression::Scope*) const override;
132 RelativePoint* getControlPoints (int& numPoints) override;
133 ElementBase* clone() const override;
134
136
137 private:
139 };
140
141 //==============================================================================
144 {
145 public:
146 QuadraticTo (const RelativePoint& controlPoint, const RelativePoint& endPoint);
148 void addToPath (Path& path, Expression::Scope*) const override;
149 RelativePoint* getControlPoints (int& numPoints) override;
150 ElementBase* clone() const override;
151
153
154 private:
156 };
157
158 //==============================================================================
161 {
162 public:
163 CubicTo (const RelativePoint& controlPoint1, const RelativePoint& controlPoint2, const RelativePoint& endPoint);
165 void addToPath (Path& path, Expression::Scope*) const override;
166 RelativePoint* getControlPoints (int& numPoints) override;
167 ElementBase* clone() const override;
168
170
171 private:
173 };
174
175 //==============================================================================
176 void addElement (ElementBase* newElement);
177
178 //==============================================================================
181
182private:
183 class Positioner;
184 friend class Positioner;
186
187 void applyTo (DrawablePath& path) const;
188
191};
192
193} // namespace juce
static Audio_Scope * scope
Definition player.cpp:26
Definition juce_DrawablePath.h:40
Definition juce_Expression.h:109
Definition juce_OwnedArray.h:51
Definition juce_Path.h:65
Definition juce_RelativePoint.h:38
RelativePoint * getControlPoints(int &numPoints) override
Definition juce_RelativePointPath.cpp:176
CloseSubPath()
Definition juce_RelativePointPath.cpp:166
void addToPath(Path &path, Expression::Scope *) const override
Definition juce_RelativePointPath.cpp:171
void addToPath(Path &path, Expression::Scope *) const override
Definition juce_RelativePointPath.cpp:244
RelativePoint * getControlPoints(int &numPoints) override
Definition juce_RelativePointPath.cpp:251
RelativePoint controlPoints[3]
Definition juce_RelativePointPath.h:169
CubicTo(const RelativePoint &controlPoint1, const RelativePoint &controlPoint2, const RelativePoint &endPoint)
Definition juce_RelativePointPath.cpp:236
Definition juce_RelativePointPath.h:80
virtual void addToPath(Path &path, Expression::Scope *) const =0
ElementBase(ElementType type)
Definition juce_RelativePointPath.cpp:127
bool isDynamic()
Definition juce_RelativePointPath.cpp:131
virtual RelativePoint * getControlPoints(int &numPoints)=0
const ElementType type
Definition juce_RelativePointPath.h:89
virtual ElementBase * clone() const =0
void addToPath(Path &path, Expression::Scope *) const override
Definition juce_RelativePointPath.cpp:193
RelativePoint endPoint
Definition juce_RelativePointPath.h:135
RelativePoint * getControlPoints(int &numPoints) override
Definition juce_RelativePointPath.cpp:198
LineTo(const RelativePoint &endPoint)
Definition juce_RelativePointPath.cpp:188
RelativePoint * getControlPoints(int &numPoints) override
Definition juce_RelativePointPath.cpp:223
QuadraticTo(const RelativePoint &controlPoint, const RelativePoint &endPoint)
Definition juce_RelativePointPath.cpp:210
void addToPath(Path &path, Expression::Scope *) const override
Definition juce_RelativePointPath.cpp:217
RelativePoint controlPoints[2]
Definition juce_RelativePointPath.h:152
RelativePoint * getControlPoints(int &numPoints) override
Definition juce_RelativePointPath.cpp:154
void addToPath(Path &path, Expression::Scope *) const override
Definition juce_RelativePointPath.cpp:149
StartSubPath(const RelativePoint &pos)
Definition juce_RelativePointPath.cpp:144
RelativePoint startPos
Definition juce_RelativePointPath.h:105
bool usesNonZeroWinding
Definition juce_RelativePointPath.h:180
ElementType
Definition juce_RelativePointPath.h:67
@ cubicToElement
Definition juce_RelativePointPath.h:73
@ nullElement
Definition juce_RelativePointPath.h:68
@ startSubPathElement
Definition juce_RelativePointPath.h:69
@ quadraticToElement
Definition juce_RelativePointPath.h:72
@ lineToElement
Definition juce_RelativePointPath.h:71
@ closeSubPathElement
Definition juce_RelativePointPath.h:70
RelativePointPath()
Definition juce_RelativePointPath.cpp:29
void createPath(Path &path, Expression::Scope *scope) const
Definition juce_RelativePointPath.cpp:106
void applyTo(DrawablePath &path) const
void swapWith(RelativePointPath &) noexcept
Definition juce_RelativePointPath.cpp:99
bool containsAnyDynamicPoints() const
Definition juce_RelativePointPath.cpp:112
friend class Positioner
Definition juce_RelativePointPath.h:184
void addElement(ElementBase *newElement)
Definition juce_RelativePointPath.cpp:117
bool containsDynamicPoints
Definition juce_RelativePointPath.h:185
OwnedArray< ElementBase > elements
Definition juce_RelativePointPath.h:179
Definition juce_ValueTree.h:72
CARLA_PLUGIN_EXPORT int clone(int(*)(void *), void *, int, void *,...)
Definition interposer-safe.cpp:46
#define JUCE_LEAK_DETECTOR(OwnerClass)
Definition juce_LeakedObjectDetector.h:138
#define JUCE_DECLARE_NON_COPYABLE(className)
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
#define LineTo