LMMS
Loading...
Searching...
No Matches
juce_DrawableShape.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//==============================================================================
39{
40protected:
41 //==============================================================================
44
45public:
47 ~DrawableShape() override;
48
49 //==============================================================================
57 void setFill (const FillType& newFill);
58
62 const FillType& getFill() const noexcept { return mainFill; }
63
67 void setStrokeFill (const FillType& newStrokeFill);
68
73
78 void setStrokeType (const PathStrokeType& newStrokeType);
79
83 void setStrokeThickness (float newThickness);
84
87
89 void setDashLengths (const Array<float>& newDashLengths);
90
93
94 //==============================================================================
96 Rectangle<float> getDrawableBounds() const override;
98 void paint (Graphics&) override;
100 bool hitTest (int x, int y) override;
102 bool replaceColour (Colour originalColour, Colour replacementColour) override;
104 Path getOutlineAsPath() const override;
105
106protected:
107 //==============================================================================
109 void pathChanged();
111 void strokeChanged();
113 bool isStrokeVisible() const noexcept;
114
115 //==============================================================================
119
120private:
122
124};
125
126} // namespace juce
#define noexcept
Definition DistrhoDefines.h:72
Definition juce_Array.h:56
Definition juce_Colour.h:38
Drawable()
Definition juce_Drawable.cpp:29
PathStrokeType strokeType
Definition juce_DrawableShape.h:116
const FillType & getFill() const noexcept
Definition juce_DrawableShape.h:62
const FillType & getStrokeFill() const noexcept
Definition juce_DrawableShape.h:72
const Array< float > & getDashLengths() const noexcept
Definition juce_DrawableShape.h:92
FillType strokeFill
Definition juce_DrawableShape.h:121
void setFill(const FillType &newFill)
Definition juce_DrawableShape.cpp:50
Path path
Definition juce_DrawableShape.h:118
Array< float > dashLengths
Definition juce_DrawableShape.h:117
Path strokePath
Definition juce_DrawableShape.h:118
FillType mainFill
Definition juce_DrawableShape.h:121
const PathStrokeType & getStrokeType() const noexcept
Definition juce_DrawableShape.h:86
DrawableShape()
Definition juce_DrawableShape.cpp:29
Definition juce_FillType.h:41
Definition juce_GraphicsContext.h:45
Definition juce_Path.h:65
Definition juce_PathStrokeType.h:42
Definition juce_Rectangle.h:67
int y
Definition inflate.c:1588
unsigned x[BMAX+1]
Definition inflate.c:1586
#define JUCE_API
Definition juce_StandardHeader.h:152
Definition carla_juce.cpp:31
#define const
Definition zconf.h:137