Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
anonymous_namespace{WaveformView.cpp}::WaveBitmapCacheElementWX Struct Referencefinal
Inheritance diagram for anonymous_namespace{WaveformView.cpp}::WaveBitmapCacheElementWX:
[legend]
Collaboration diagram for anonymous_namespace{WaveformView.cpp}::WaveBitmapCacheElementWX:
[legend]

Public Member Functions

uint8_t * Allocate (size_t width, size_t height) override
 
wxBitmap & GetBitmap ()
 
size_t Width () const override
 
size_t Height () const override
 
- Public Member Functions inherited from WaveBitmapCacheElement
 ~WaveBitmapCacheElement () override
 
virtual uint8_t * Allocate (size_t width, size_t height)=0
 
virtual size_t Width () const =0
 
virtual size_t Height () const =0
 
- Public Member Functions inherited from GraphicsDataCacheElementBase
virtual ~GraphicsDataCacheElementBase ()=default
 
virtual void Dispose ()
 This method is called when the item is evicted from the cache. Default implementation is empty. More...
 
virtual void Smooth (GraphicsDataCacheElementBase *prevElement)
 This method is called during the lookup when new items are inserted. prevElement can be nullptr. Default implementation is empty. More...
 

Private Attributes

wxBitmap mBitmap
 
wxImage mImage
 

Additional Inherited Members

- Public Attributes inherited from WaveBitmapCacheElement
size_t AvailableColumns { 0 }
 
- Public Attributes inherited from GraphicsDataCacheElementBase
uint64_t LastCacheAccess { 0 }
 Index filled by GraphicsDataCacheBase to implement LRU eviction policy. More...
 
uint64_t LastUpdate { 0 }
 The last time the item was updated. If (!IsComplete && LastUpdate < LastCacheAccess) the item will be updated. More...
 
bool IsComplete { false }
 Cache implementation is responsible to set this flag when all the data of the item is filled. More...
 
bool AwaitsEviction { false }
 This flag is used to simplify the eviction algorithm. More...
 

Detailed Description

Definition at line 174 of file WaveformView.cpp.

Member Function Documentation

◆ Allocate()

uint8_t * anonymous_namespace{WaveformView.cpp}::WaveBitmapCacheElementWX::Allocate ( size_t  width,
size_t  height 
)
inlineoverridevirtual

Implements WaveBitmapCacheElement.

Definition at line 176 of file WaveformView.cpp.

177 {
178 mImage = wxImage(width, height, false);
179 mBitmap = wxBitmap();
180 return mImage.GetData();
181 }
wxImage(22, 22)

References wxImage().

Here is the call graph for this function:

◆ GetBitmap()

wxBitmap & anonymous_namespace{WaveformView.cpp}::WaveBitmapCacheElementWX::GetBitmap ( )
inline

Definition at line 183 of file WaveformView.cpp.

184 {
185 if(!mBitmap.IsOk() && mImage.IsOk())
186 mBitmap = wxBitmap(mImage);
187 return mBitmap;
188 }

Referenced by anonymous_namespace{WaveformView.cpp}::WaveformPainter::Draw().

Here is the caller graph for this function:

◆ Height()

size_t anonymous_namespace{WaveformView.cpp}::WaveBitmapCacheElementWX::Height ( ) const
inlineoverridevirtual

Implements WaveBitmapCacheElement.

Definition at line 195 of file WaveformView.cpp.

196 {
197 return mImage.GetHeight();
198 }

◆ Width()

size_t anonymous_namespace{WaveformView.cpp}::WaveBitmapCacheElementWX::Width ( ) const
inlineoverridevirtual

Implements WaveBitmapCacheElement.

Definition at line 190 of file WaveformView.cpp.

191 {
192 return mImage.GetWidth();
193 }

Member Data Documentation

◆ mBitmap

wxBitmap anonymous_namespace{WaveformView.cpp}::WaveBitmapCacheElementWX::mBitmap
private

Definition at line 201 of file WaveformView.cpp.

◆ mImage

wxImage anonymous_namespace{WaveformView.cpp}::WaveBitmapCacheElementWX::mImage
private

Definition at line 202 of file WaveformView.cpp.


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