Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
2.5KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. namespace juce
  14. {
  15. //==============================================================================
  16. /**
  17. A parallelogram defined by three RelativePoint positions.
  18. @see RelativePoint, RelativeCoordinate
  19. @tags{GUI}
  20. */
  21. class JUCE_API RelativeParallelogram
  22. {
  23. public:
  24. //==============================================================================
  25. RelativeParallelogram();
  26. RelativeParallelogram (const Rectangle<float>& simpleRectangle);
  27. RelativeParallelogram (const RelativePoint& topLeft, const RelativePoint& topRight, const RelativePoint& bottomLeft);
  28. RelativeParallelogram (const String& topLeft, const String& topRight, const String& bottomLeft);
  29. ~RelativeParallelogram();
  30. //==============================================================================
  31. void resolveThreePoints (Point<float>* points, Expression::Scope* scope) const;
  32. void resolveFourCorners (Point<float>* points, Expression::Scope* scope) const;
  33. const Rectangle<float> getBounds (Expression::Scope* scope) const;
  34. void getPath (Path& path, Expression::Scope* scope) const;
  35. AffineTransform resetToPerpendicular (Expression::Scope* scope);
  36. bool isDynamic() const;
  37. bool operator== (const RelativeParallelogram&) const noexcept;
  38. bool operator!= (const RelativeParallelogram&) const noexcept;
  39. static Point<float> getInternalCoordForPoint (const Point<float>* parallelogramCorners, Point<float> point) noexcept;
  40. static Point<float> getPointForInternalCoord (const Point<float>* parallelogramCorners, Point<float> internalPoint) noexcept;
  41. static Rectangle<float> getBoundingBox (const Point<float>* parallelogramCorners) noexcept;
  42. //==============================================================================
  43. RelativePoint topLeft, topRight, bottomLeft;
  44. };
  45. } // namespace juce