JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::detail::StandardCachedComponentImage Struct Reference

#include <juce_StandardCachedComponentImage.h>

Inheritance diagram for juce::detail::StandardCachedComponentImage:
Collaboration diagram for juce::detail::StandardCachedComponentImage:

Public Member Functions

 StandardCachedComponentImage (Component &c) noexcept
 
bool invalidate (const Rectangle< int > &area) override
 Invalidates a section of the cached image data.
 
bool invalidateAll () override
 Invalidates all cached image data.
 
void paint (Graphics &g) override
 Called as part of the parent component's paint method, this must draw the given component into the target graphics context, using the cached version where possible.
 
void releaseResources () override
 Called to indicate that the component is no longer active, so any cached data should be released if possible.
 

Private Attributes

Image image
 
Componentowner
 
float scale = 1.0f
 
RectangleList< int > validArea
 

Constructor & Destructor Documentation

◆ StandardCachedComponentImage()

juce::detail::StandardCachedComponentImage::StandardCachedComponentImage ( Component c)
inlineexplicitnoexcept

Member Function Documentation

◆ invalidate()

bool juce::detail::StandardCachedComponentImage::invalidate ( const Rectangle< int > &  area)
inlineoverridevirtual

Invalidates a section of the cached image data.

Returns
true if the peer should also be repainted, or false if this object handles all repaint work internally.

Implements juce::CachedComponentImage.

References juce::RectangleList< ValueType >::subtract(), and validArea.

◆ invalidateAll()

bool juce::detail::StandardCachedComponentImage::invalidateAll ( )
inlineoverridevirtual

Invalidates all cached image data.

Returns
true if the peer should also be repainted, or false if this object handles all repaint work internally.

Implements juce::CachedComponentImage.

References juce::RectangleList< ValueType >::clear(), and validArea.

◆ paint()

◆ releaseResources()

void juce::detail::StandardCachedComponentImage::releaseResources ( )
inlineoverridevirtual

Called to indicate that the component is no longer active, so any cached data should be released if possible.

Implements juce::CachedComponentImage.

References image.

Member Data Documentation

◆ image

Image juce::detail::StandardCachedComponentImage::image
private

Referenced by paint(), and releaseResources().

◆ owner

Component& juce::detail::StandardCachedComponentImage::owner
private

Referenced by paint().

◆ scale

float juce::detail::StandardCachedComponentImage::scale = 1.0f
private

Referenced by paint().

◆ validArea

RectangleList<int> juce::detail::StandardCachedComponentImage::validArea
private

Referenced by invalidate(), invalidateAll(), and paint().


The documentation for this struct was generated from the following file: