Class: Toybox.Graphics.ResourceReference
- Inherits:
-
Toybox.Lang.Object
Overview
Object represents a reference for the resource allocated from the graphics memory pool rather than from the app's local memory.
The underlying resource object could be temporarily purged from the system memory pool when all strong
references are destroyed.
The memory allocation is performed only when ResourceReference::get() method is invoked.
Direct Known Subclasses
Graphics.BitmapReference, Graphics.BufferedBitmapReference, Graphics.FontReference
Typedef Summary collapse
- Options as { :resource as WatchUi.FontResource or WatchUi.BitmapResource or Graphics.BufferedBitmap, :rezId as Lang.ResourceId, :bufferedBitmap as { :bitmapResource as Lang.ResourceId, :width as Lang.Number, :height as Lang.Number, :palette as Lang.Array<Graphics.ColorType>, :colorDepth as Lang.Number } }
Instance Method Summary collapse
-
get() as WatchUi.BitmapResource or Graphics.BufferedBitmap or WatchUi.FontResource or Null
Get the underlying resource object referenced by the ResourceReference, this trigger either the allocate from the system memory pool or return the existing resource in the pool.
Typedef Details
Options as { :resource as WatchUi.FontResource or WatchUi.BitmapResource or Graphics.BufferedBitmap, :rezId as Lang.ResourceId, :bufferedBitmap as { :bitmapResource as Lang.ResourceId, :width as Lang.Number, :height as Lang.Number, :palette as Lang.Array<Graphics.ColorType>, :colorDepth as Lang.Number } }
Instance Method Details
get() as WatchUi.BitmapResource or Graphics.BufferedBitmap or WatchUi.FontResource or Null
Get the underlying resource object referenced by the ResourceReference, this trigger either the allocate from the system memory pool or return the existing resource in the pool.