openshot-audio  0.1.7
juce_RelativeParallelogram.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_RELATIVEPARALLELOGRAM_H_INCLUDED
26 #define JUCE_RELATIVEPARALLELOGRAM_H_INCLUDED
27 
28 
29 //==============================================================================
36 {
37 public:
38  //==============================================================================
40  RelativeParallelogram (const Rectangle<float>& simpleRectangle);
41  RelativeParallelogram (const RelativePoint& topLeft, const RelativePoint& topRight, const RelativePoint& bottomLeft);
42  RelativeParallelogram (const String& topLeft, const String& topRight, const String& bottomLeft);
44 
45  //==============================================================================
46  void resolveThreePoints (Point<float>* points, Expression::Scope* scope) const;
47  void resolveFourCorners (Point<float>* points, Expression::Scope* scope) const;
48  const Rectangle<float> getBounds (Expression::Scope* scope) const;
49  void getPath (Path& path, Expression::Scope* scope) const;
50  AffineTransform resetToPerpendicular (Expression::Scope* scope);
51  bool isDynamic() const;
52 
53  bool operator== (const RelativeParallelogram&) const noexcept;
54  bool operator!= (const RelativeParallelogram&) const noexcept;
55 
56  static Point<float> getInternalCoordForPoint (const Point<float>* parallelogramCorners, Point<float> point) noexcept;
57  static Point<float> getPointForInternalCoord (const Point<float>* parallelogramCorners, Point<float> internalPoint) noexcept;
58  static Rectangle<float> getBoundingBox (const Point<float>* parallelogramCorners) noexcept;
59 
60  //==============================================================================
61  RelativePoint topLeft, topRight, bottomLeft;
62 };
63 
64 
65 #endif // JUCE_RELATIVEPARALLELOGRAM_H_INCLUDED
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_Expression.h:113
Definition: juce_Point.h:39
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
Definition: juce_RelativePoint.h:35
RelativePoint topRight
Definition: juce_RelativeParallelogram.h:61
Definition: juce_Rectangle.h:36
Definition: juce_Path.h:62
bool operator==(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:565
Definition: juce_RelativeParallelogram.h:35
Definition: juce_AffineTransform.h:40
bool operator!=(const var &v1, const var &v2) noexcept
Definition: juce_Variant.cpp:566