Represents a colour or fill pattern to use for rendering paths.
More...
#include <juce_FillType.h>
Represents a colour or fill pattern to use for rendering paths.
This is used by the Graphics and DrawablePath classes as a way to encapsulate a brush type. It can either be a solid colour, a gradient, or a tiled image.
- See also
- Graphics::setFillType, DrawablePath::setFill
◆ FillType() [1/6]
Creates a default fill type, of solid black.
◆ FillType() [2/6]
FillType::FillType |
( |
Colour |
colour | ) |
|
|
noexcept |
Creates a fill type of a solid colour.
- See also
- setColour
◆ FillType() [3/6]
◆ FillType() [4/6]
Creates a tiled image fill type.
The transform allows you to set the scaling, offset and rotation of the pattern.
- See also
- setTiledImage
◆ FillType() [5/6]
◆ FillType() [6/6]
◆ ~FillType()
◆ getOpacity()
float FillType::getOpacity |
( |
| ) |
const |
|
inlinenoexcept |
◆ isColour()
bool FillType::isColour |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if this is a solid colour fill, and not a gradient or image.
References Image::isNull().
◆ isGradient()
bool FillType::isGradient |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if this is a gradient fill.
◆ isInvisible()
bool FillType::isInvisible |
( |
| ) |
const |
|
noexcept |
Returns true if this fill type is completely transparent.
◆ isTiledImage()
bool FillType::isTiledImage |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if this is a tiled image pattern fill.
References Image::isValid().
◆ operator!=()
bool FillType::operator!= |
( |
const FillType & |
| ) |
const |
◆ operator=() [1/2]
◆ operator=() [2/2]
Move assignment operator.
◆ operator==()
bool FillType::operator== |
( |
const FillType & |
| ) |
const |
◆ setColour()
void FillType::setColour |
( |
Colour |
newColour | ) |
|
|
noexcept |
Turns this object into a solid colour fill.
If the object was an image or gradient, those fields will no longer be valid.
◆ setGradient()
Turns this object into a gradient fill.
◆ setOpacity()
void FillType::setOpacity |
( |
float |
newOpacity | ) |
|
|
noexcept |
Changes the opacity that should be used.
If the fill is a solid colour, this just changes the opacity of that colour. For gradients and image tiles, it changes the opacity that will be used for them.
◆ setTiledImage()
Turns this object into a tiled image fill type.
The transform allows you to set the scaling, offset and rotation of the pattern.
◆ transformed()
Returns a copy of this fill, adding the specified transform applied to the existing transform.
◆ colour
The solid colour being used.
If the fill type is not a solid colour, the alpha channel of this colour indicates the opacity that should be used for the fill, and the RGB channels are ignored.
◆ gradient
Returns the gradient that should be used for filling.
This will be zero if the object is some other type of fill. If a gradient is active, the overall opacity with which it should be applied is indicated by the alpha channel of the colour variable.
◆ image
The image that should be used for tiling.
If an image fill is active, the overall opacity with which it should be applied is indicated by the alpha channel of the colour variable.
◆ transform
The transform that should be applied to the image or gradient that's being drawn.
The documentation for this class was generated from the following file: