Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ISurface

interface ISurface
Extends com.amazon.apmf.IStandard ISurface represents a mutable drawable surface that provides access to a memory buffer for rendering operations.

Methods

getSize()

SizeI getSize()
Gets the SizeI of this surface.

Returns

SizeI SizeI representing the width and height of the surface.

getCanvas()

ICanvas* getCanvas()
Returns a canvas for immediate drawing operations on this surface. The returned canvas provides direct access to this surface’s memory buffer. Drawing commands execute synchronously in the current thread, and their effects are immediately visible in the surface. The canvas remains valid as long as the surface exists.

Returns

ICanvas* A canvas that draws directly to this surface

createSnapshot()

IImage* createSnapshot()
Creates a snapshot from this surface’s current contents. It captures the current state of this surface into a new immutable image object. The image is a snapshot so subsequent changes to the surface will not affect it.

Returns

IImage* A new IImage representing the current contents of the surface
Last modified on October 29, 2026