Class: Toybox.Graphics.BufferedBitmap
- Inherits:
-
Toybox.Lang.Object
Overview
This class represents an off-screen bitmap. It provides methods to modify the bitmap palette, and get a drawable context.
See Also:
Instance Method Summary collapse
-
getDc() as Graphics.Dc
Get the Dc to draw on the buffered bitmap.
-
getHeight() as Lang.Number
Get the height of a bitmap.
-
getPalette() as Lang.Array<Graphics.ColorType>
null
if this surface uses the system palette. -
getWidth() as Lang.Number
Get the width of a bitmap.
-
initialize(options as { :width as Lang.Number, :height as Lang.Number, :palette as Lang.Array<Graphics.ColorType>, :colorDepth as Lang.Number, :bitmapResource as WatchUi.BitmapResource, :alphaBlending as Graphics.AlphaBlending })
Constructor.
-
isCached() as Lang.Boolean
Check if the memory for the bitmap is still loaded in the memory User can invoke this method to check if the underlying resource is still available in the memory since last used if
true
, the resource such as BufferedBitmap has been cached and can be used directly without re-drawing. - setPalette(palette as Lang.Array<Graphics.ColorType>) as Void
Instance Method Details
getDc() as Graphics.Dc
Get the Dc to draw on the buffered bitmap.
getHeight() as Lang.Number
Get the height of a bitmap.
getPalette() as Lang.Array<Graphics.ColorType>
null
if this surface uses the system palette
getWidth() as Lang.Number
Get the width of a bitmap.
initialize(options as { :width as Lang.Number, :height as Lang.Number, :palette as Lang.Array<Graphics.ColorType>, :colorDepth as Lang.Number, :bitmapResource as WatchUi.BitmapResource, :alphaBlending as Graphics.AlphaBlending })
Constructor
isCached() as Lang.Boolean
Check if the memory for the bitmap is still loaded in the memory
User can invoke this method to check if the underlying resource is still available in the memory since last used
if true
, the resource such as BufferedBitmap has been cached and can be used directly without re-drawing.