89 explicit ImageComponentAccessibilityHandler (
ImageComponent& imageComponentToWrap)
91 imageComponent (imageComponentToWrap)
95 String getHelp()
const override {
return imageComponent.getTooltip(); }
104 return std::make_unique<ImageComponentAccessibilityHandler> (*
this);
Base class for accessible Components.
The base class for all JUCE user-interface objects.
void repaint()
Marks the whole component as needing to be redrawn.
Rectangle< int > getLocalBounds() const noexcept
Returns the component's bounds, relative to its own origin.
A graphics context, used for drawing a component or image.
void drawImage(const Image &imageToDraw, int destX, int destY, int destWidth, int destHeight, int sourceX, int sourceY, int sourceWidth, int sourceHeight, bool fillAlphaChannelWithCurrentBrush=false) const
Draws part of an image, rescaling it to fit in a given target region.
void setOpacity(float newOpacity)
Changes the opacity to use with the current colour.
A component that simply displays an image.
const Image & getImage() const
Returns the current image.
ImageComponent(const String &componentName=String())
Creates an ImageComponent.
~ImageComponent() override
Destructor.
void setImage(const Image &newImage)
Sets the image that should be displayed.
std::unique_ptr< AccessibilityHandler > createAccessibilityHandler() override
Override this method to return a custom AccessibilityHandler for this component.
void paint(Graphics &) override
Components can override this method to draw their content.
void setImagePlacement(RectanglePlacement newPlacement)
Sets the method of positioning that will be used to fit the image within the component's bounds.
RectanglePlacement getImagePlacement() const
Returns the current image placement.
Holds a fixed-size bitmap.
Defines the method used to position some kind of rectangular object within a rectangular viewport.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...