openshot-audio  0.1.6
Public Member Functions | List of all members
ImageComponent Class Reference

#include <juce_ImageComponent.h>

Inheritance diagram for ImageComponent:
SettableTooltipClient TooltipClient

Public Member Functions

 ImageComponent (const String &componentName=String::empty)
 
 ~ImageComponent ()
 
void setImage (const Image &newImage)
 
void setImage (const Image &newImage, RectanglePlacement placementToUse)
 
const ImagegetImage () const
 
void setImagePlacement (RectanglePlacement newPlacement)
 
RectanglePlacement getImagePlacement () const
 
void paint (Graphics &) override
 
- Public Member Functions inherited from SettableTooltipClient
virtual ~SettableTooltipClient ()
 
virtual void setTooltip (const String &newTooltip)
 
virtual String getTooltip ()
 
- Public Member Functions inherited from TooltipClient
virtual ~TooltipClient ()
 

Additional Inherited Members

- Protected Member Functions inherited from SettableTooltipClient
 SettableTooltipClient ()
 

Detailed Description

A component that simply displays an image.

Use setImage to give it an image, and it'll display it - simple as that!

Constructor & Destructor Documentation

ImageComponent::ImageComponent ( const String componentName = String::empty)

Creates an ImageComponent.

ImageComponent::~ImageComponent ( )

Destructor.

Member Function Documentation

const Image & ImageComponent::getImage ( ) const

Returns the current image.

RectanglePlacement ImageComponent::getImagePlacement ( ) const

Returns the current image placement.

void ImageComponent::paint ( Graphics g)
override
void ImageComponent::setImage ( const Image newImage)

Sets the image that should be displayed.

void ImageComponent::setImage ( const Image newImage,
RectanglePlacement  placementToUse 
)

Sets the image that should be displayed, and its placement within the component.

void ImageComponent::setImagePlacement ( RectanglePlacement  newPlacement)

Sets the method of positioning that will be used to fit the image within the component's bounds. By default the positioning is centred, and will fit the image inside the component's bounds whilst keeping its aspect ratio correct, but you can change it to whatever layout you need.


The documentation for this class was generated from the following files: