Flutter Engine
The Flutter Engine
|
#include <SkResources.h>
Public Member Functions | |
virtual sk_sp< SkData > | load (const char[], const char[]) const |
virtual sk_sp< ImageAsset > | loadImageAsset (const char[], const char[], const char[]) const |
virtual sk_sp< ExternalTrackAsset > | loadAudioAsset (const char[], const char[], const char[]) |
virtual sk_sp< SkData > | loadFont (const char[], const char[]) const |
virtual sk_sp< SkTypeface > | loadTypeface (const char[], const char[]) const |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
ResourceProvider is an interface that lets rich-content modules defer loading of external resources (images, fonts, etc.) to embedding clients.
Definition at line 150 of file SkResources.h.
|
inlinevirtual |
Load a generic resource (currently only nested animations) specified by |path| + |name|, and return as an SkData.
Reimplemented in skresources::FileResourceProvider, and skresources::ResourceProviderProxyBase.
Definition at line 156 of file SkResources.h.
|
inlinevirtual |
Load an external audio track specified by |path|/|name|/|id|.
Reimplemented in skresources::ResourceProviderProxyBase.
Definition at line 174 of file SkResources.h.
|
inlinevirtual |
DEPRECATED: implement loadTypeface() instead.
Load an external font and return as SkData.
name | font name ("fName" Lottie property) |
url | web font URL ("fPath" Lottie property) |
– Note –
This mechanism assumes monolithic fonts (single data blob). Some web font providers may serve multiple font blobs, segmented for various unicode ranges, depending on user agent capabilities (woff, woff2). In that case, the embedder would need to advertise no user agent capabilities when fetching the URL, in order to receive full font data.
Reimplemented in skresources::ResourceProviderProxyBase.
Definition at line 195 of file SkResources.h.
|
inlinevirtual |
Load an image asset specified by |path| + |name|, and returns the corresponding ImageAsset proxy.
Reimplemented in skresources::FileResourceProvider, and skresources::ResourceProviderProxyBase.
Definition at line 165 of file SkResources.h.
|
inlinevirtual |
Load an external font and return as SkTypeface.
name | font name |
url | web font URL |
Reimplemented in skresources::ResourceProviderProxyBase.
Definition at line 206 of file SkResources.h.