1
0
Fork 0
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:
jules 2017-11-08 15:00:47 +00:00
parent 8589f38cfb
commit c3a218ab49
10 changed files with 110 additions and 55 deletions

View file

@ -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();

View file

@ -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!