mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added some methods ColourGradient::vertical and ColourGradient::horizontal, and also some missing move operators for that class
This commit is contained in:
parent
8589f38cfb
commit
c3a218ab49
10 changed files with 110 additions and 55 deletions
|
|
@ -190,7 +190,7 @@ void Graphics::setColour (Colour newColour)
|
|||
context.setFill (newColour);
|
||||
}
|
||||
|
||||
void Graphics::setOpacity (const float newOpacity)
|
||||
void Graphics::setOpacity (float newOpacity)
|
||||
{
|
||||
saveStateIfPending();
|
||||
context.setOpacity (newOpacity);
|
||||
|
|
@ -201,6 +201,11 @@ void Graphics::setGradientFill (const ColourGradient& gradient)
|
|||
setFillType (gradient);
|
||||
}
|
||||
|
||||
void Graphics::setGradientFill (ColourGradient&& gradient)
|
||||
{
|
||||
setFillType (static_cast<ColourGradient&&> (gradient));
|
||||
}
|
||||
|
||||
void Graphics::setTiledImageFill (const Image& imageToUse, const int anchorX, const int anchorY, const float opacity)
|
||||
{
|
||||
saveStateIfPending();
|
||||
|
|
|
|||
|
|
@ -82,10 +82,12 @@ public:
|
|||
*/
|
||||
void setOpacity (float newOpacity);
|
||||
|
||||
/** Sets the context to use a gradient for its fill pattern.
|
||||
*/
|
||||
/** Sets the context to use a gradient for its fill pattern. */
|
||||
void setGradientFill (const ColourGradient& gradient);
|
||||
|
||||
/** Sets the context to use a gradient for its fill pattern. */
|
||||
void setGradientFill (ColourGradient&& gradient);
|
||||
|
||||
/** Sets the context to use a tiled image pattern for filling.
|
||||
Make sure that you don't delete this image while it's still being used by
|
||||
this context!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue