AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
IImageLoader Class Referenceabstract

Class-loader of abstract images that can be displayed on the screen.

#include <AUI/Image/IImageLoader.h>

Public Member Functions#

virtual bool matches (AByteBufferView buffer)=0
 
virtual _< IImageFactorygetImageFactory (AByteBufferView buffer)
 The drawable (vector) image loader implementation.
 
virtual _< AImagegetRasterImage (AByteBufferView buffer)=0
 The image loader implementation (raster).
 

Member Function Documentation#

◆ getImageFactory()#

virtual _< IImageFactory > IImageLoader::getImageFactory ( AByteBufferView buffer)
inlinevirtual
Note
Called if and only if matches returned true.
Returns
image factory. Can be nullptr if getRasterImage implemented.

Reimplemented in GifImageLoader, SvgImageLoader, and WebpImageLoader.

◆ getRasterImage()#

virtual _< AImage > IImageLoader::getRasterImage ( AByteBufferView buffer)
pure virtual
Note
Called if and only if matches returned true.
Returns
raster image. Can be nullptr if getDrawable implemented.

Implemented in GifImageLoader, StbImageLoader, SvgImageLoader, and WebpImageLoader.

◆ matches()#

virtual bool IImageLoader::matches ( AByteBufferView buffer)
pure virtual
Parameters
bufferbuffer with the raw image file contents.
Returns
true, if this IImageLoader accepts image stored in this buffer

Implemented in BmpImageLoader, GifImageLoader, JpgImageLoader, PngImageLoader, SvgImageLoader, and WebpImageLoader.