openshot-audio  0.1.6
juce_PathStrokeType.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission is granted to use this software under the terms of either:
8  a) the GPL v2 (or any later version)
9  b) the Affero GPL v3
10 
11  Details of these licenses can be found at: www.gnu.org/licenses
12 
13  JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
14  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15  A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 
17  ------------------------------------------------------------------------------
18 
19  To release a closed-source product which uses JUCE, commercial licenses are
20  available: visit www.juce.com for more information.
21 
22  ==============================================================================
23 */
24 
25 #ifndef JUCE_PATHSTROKETYPE_H_INCLUDED
26 #define JUCE_PATHSTROKETYPE_H_INCLUDED
27 
28 
29 //==============================================================================
40 {
41 public:
42  //==============================================================================
45  {
46  mitered,
52  beveled
54  };
55 
58  {
59  butt,
62  rounded
63  };
64 
65  //==============================================================================
67  explicit PathStrokeType (float strokeThickness) noexcept;
68 
75  PathStrokeType (float strokeThickness,
76  JointStyle jointStyle,
77  EndCapStyle endStyle = butt) noexcept;
78 
81 
83  PathStrokeType& operator= (const PathStrokeType&) noexcept;
84 
86  ~PathStrokeType() noexcept;
87 
88  //==============================================================================
105  void createStrokedPath (Path& destPath,
106  const Path& sourcePath,
107  const AffineTransform& transform = AffineTransform::identity,
108  float extraAccuracy = 1.0f) const;
109 
110 
111  //==============================================================================
135  void createDashedStroke (Path& destPath,
136  const Path& sourcePath,
137  const float* dashLengths,
138  int numDashLengths,
139  const AffineTransform& transform = AffineTransform::identity,
140  float extraAccuracy = 1.0f) const;
141 
142  //==============================================================================
162  void createStrokeWithArrowheads (Path& destPath,
163  const Path& sourcePath,
164  float arrowheadStartWidth, float arrowheadStartLength,
165  float arrowheadEndWidth, float arrowheadEndLength,
166  const AffineTransform& transform = AffineTransform::identity,
167  float extraAccuracy = 1.0f) const;
168 
169  //==============================================================================
171  float getStrokeThickness() const noexcept { return thickness; }
172 
174  void setStrokeThickness (float newThickness) noexcept { thickness = newThickness; }
175 
177  JointStyle getJointStyle() const noexcept { return jointStyle; }
178 
180  void setJointStyle (JointStyle newStyle) noexcept { jointStyle = newStyle; }
181 
183  EndCapStyle getEndStyle() const noexcept { return endStyle; }
184 
186  void setEndStyle (EndCapStyle newStyle) noexcept { endStyle = newStyle; }
187 
188  //==============================================================================
191 
193  bool operator!= (const PathStrokeType&) const noexcept;
194 
195 private:
196  //==============================================================================
197  float thickness;
198  JointStyle jointStyle;
199  EndCapStyle endStyle;
200 
202 };
203 
204 #endif // JUCE_PATHSTROKETYPE_H_INCLUDED
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_PathStrokeType.h:59
NumericType square(NumericType n) noexcept
Definition: juce_MathsFunctions.h:540
JointStyle getJointStyle() const noexcept
Definition: juce_PathStrokeType.h:177
void setJointStyle(JointStyle newStyle) noexcept
Definition: juce_PathStrokeType.h:180
Definition: juce_PathStrokeType.h:39
#define JUCE_API
Definition: juce_StandardHeader.h:139
#define const
void setStrokeThickness(float newThickness) noexcept
Definition: juce_PathStrokeType.h:174
void setEndStyle(EndCapStyle newStyle) noexcept
Definition: juce_PathStrokeType.h:186
Definition: juce_Path.h:62
Definition: juce_PathStrokeType.h:51
EndCapStyle getEndStyle() const noexcept
Definition: juce_PathStrokeType.h:183
JointStyle
Definition: juce_PathStrokeType.h:44
bool operator==(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:565
Definition: juce_AffineTransform.h:40
EndCapStyle
Definition: juce_PathStrokeType.h:57
#define JUCE_LEAK_DETECTOR(OwnerClass)
Definition: juce_LeakedObjectDetector.h:141