The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

71 lines
2.1KB

  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 drawable object which renders a filled or outlined shape.
  18. For details on how to change the fill and stroke, see the DrawableShape class.
  19. @see Drawable, DrawableShape
  20. @tags{GUI}
  21. */
  22. class JUCE_API DrawablePath : public DrawableShape
  23. {
  24. public:
  25. //==============================================================================
  26. /** Creates a DrawablePath. */
  27. DrawablePath();
  28. DrawablePath (const DrawablePath&);
  29. /** Destructor. */
  30. ~DrawablePath() override;
  31. //==============================================================================
  32. /** Changes the path that will be drawn.
  33. @see setFill, setStrokeType
  34. */
  35. void setPath (const Path& newPath);
  36. /** Changes the path that will be drawn.
  37. @see setFill, setStrokeType
  38. */
  39. void setPath (Path&& newPath);
  40. /** Returns the current path. */
  41. const Path& getPath() const;
  42. /** Returns the current path for the outline. */
  43. const Path& getStrokePath() const;
  44. //==============================================================================
  45. /** @internal */
  46. std::unique_ptr<Drawable> createCopy() const override;
  47. private:
  48. //==============================================================================
  49. DrawablePath& operator= (const DrawablePath&);
  50. JUCE_LEAK_DETECTOR (DrawablePath)
  51. };
  52. } // namespace juce