|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
An image that will be resampled before it is drawn. More...
#include "juce_ScaledImage.h"
Public Member Functions | |
| ScaledImage ()=default | |
| Creates a ScaledImage with an invalid image and unity scale. | |
| ScaledImage (const Image &imageIn) | |
| Creates a ScaledImage from an Image, where the dimensions of the image in pixels are exactly equal to its dimensions in points. | |
| ScaledImage (const Image &imageIn, double scaleIn) | |
| Creates a ScaledImage from an Image, using a custom scale factor. | |
| Image | getImage () const |
| Returns the image at its original dimensions. | |
| double | getScale () const |
| Returns the image's scale. | |
| Rectangle< double > | getScaledBounds () const |
| Returns the bounds of this image expressed in points. | |
An image that will be resampled before it is drawn.
A plain Image only stores plain pixels, but does not store any information about how these pixels correspond to points. This means that if the image's dimensions are interpreted as points, then the image will be blurry when drawn on high resolution displays. If the image's dimensions are instead interpreted as corresponding to exact pixel positions, then the logical size of the image will change depending on the scale factor of the screen used to draw it.
The ScaledImage class is designed to store an image alongside a scale factor that informs a renderer how to convert between the image's pixels and points.
@tags{GUI}
Definition at line 46 of file juce_ScaledImage.h.
Creates a ScaledImage from an Image, where the dimensions of the image in pixels are exactly equal to its dimensions in points.
Definition at line 56 of file juce_ScaledImage.h.
Creates a ScaledImage from an Image, using a custom scale factor.
A scale of 1.0 means that the image's dimensions in pixels is equal to its dimensions in points.
A scale of 2.0 means that the image contains 2 pixels per point in each direction.
Definition at line 67 of file juce_ScaledImage.h.
| Image juce::ScaledImage::getImage | ( | ) | const |
Returns the image at its original dimensions.
Definition at line 71 of file juce_ScaledImage.h.
| double juce::ScaledImage::getScale | ( | ) | const |
Returns the image's scale.
Definition at line 74 of file juce_ScaledImage.h.
Returns the bounds of this image expressed in points.
Definition at line 77 of file juce_ScaledImage.h.