Interface IAssetManager2D
Defines interface with method for creation of assets used for drawing on IRenderSurface via IRenderContext2D methods See Also: IRenderSurface, IRenderContext2D
Implements
Namespace:
Assembly: .dll
Syntax
public interface IAssetManager2D extends IDisposable
Methods
createBrush(BrushStyle brushStyle)
Creates a IBrush2D instance from specified BrushStyle
Declaration
public abstract IBrush2D createBrush(BrushStyle brushStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| BrushStyle | brushStyle | The BrushStyle to create brush from |
Returns
| Type | Description |
|---|---|
| IBrush2D | The IBrush2D instance |
createBrush(BrushStyle brushStyle, TextureMappingMode textureMappingMode)
Creates a IBrush2D instance from specified BrushStyle
Declaration
public abstract IBrush2D createBrush(BrushStyle brushStyle, TextureMappingMode textureMappingMode)
Parameters
| Type | Name | Description |
|---|---|---|
| BrushStyle | brushStyle | The BrushStyle to create brush from |
| TextureMappingMode | textureMappingMode | The texture mapping which will be used by created brush |
Returns
| Type | Description |
|---|---|
| IBrush2D | The IBrush2D instance |
createBrush(BrushStyle brushStyle, TextureMappingMode textureMappingMode, float opacity)
Creates a IBrush2D instance from specified BrushStyle
Declaration
public abstract IBrush2D createBrush(BrushStyle brushStyle, TextureMappingMode textureMappingMode, float opacity)
Parameters
| Type | Name | Description |
|---|---|---|
| BrushStyle | brushStyle | The BrushStyle to create brush from |
| TextureMappingMode | textureMappingMode | The texture mapping which will be used by created brush |
| float | opacity | The opacity of created brush |
Returns
| Type | Description |
|---|---|
| IBrush2D | The IBrush2D instance |
createCanvasTexture(int width, int height)
Creates a special kind of ITexture2D with specified width and height which can be used by IRenderContext2D#drawCanvasTexture(ICanvasTexture2D, Action1) method which allows to render content of texture via Canvas API
Declaration
public abstract ICanvasTexture2D createCanvasTexture(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of texture in pixels |
| int | height | The hegith of texture in pixels |
Returns
| Type | Description |
|---|---|
| ICanvasTexture2D | The ITexture2D instance |
createFont(FontStyle fontStyle)
Declaration
public abstract IFont createFont(FontStyle fontStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| FontStyle | fontStyle | The FontStyle to create pen from |
Returns
| Type | Description |
|---|---|
| IFont | The IFont instance |
createPen(PenStyle penStyle)
Declaration
public abstract IPen2D createPen(PenStyle penStyle)
Parameters
| Type | Name | Description |
|---|---|---|
| PenStyle | penStyle | The PenStyle to create pen from |
Returns
| Type | Description |
|---|---|
| IPen2D | The IPen2D instance |
createPen(PenStyle penStyle, float opacity)
Declaration
public abstract IPen2D createPen(PenStyle penStyle, float opacity)
Parameters
| Type | Name | Description |
|---|---|---|
| PenStyle | penStyle | The FontStyle to create pen from |
| float | opacity | The opacity of created pen |
Returns
| Type | Description |
|---|---|
| IPen2D | The IPen2D instance |
createTexture(Bitmap bitmap)
Creates a ITexture2D instance from Bitmap
Declaration
public abstract IPixelTexture2D createTexture(Bitmap bitmap)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.Bitmap | bitmap | The bitmap to create texture from |
Returns
| Type | Description |
|---|---|
| IPixelTexture2D | The ITexture2D instance |
createTexture(Bitmap bitmap, RectF bitmapRegion)
Creates a ITexture2D instance from region of Bitmap
Declaration
public abstract IPixelTexture2D createTexture(Bitmap bitmap, RectF bitmapRegion)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.Bitmap | bitmap | The bitmap to create texture from |
| android.graphics.RectF | bitmapRegion | The region of bitmap in pixels to create texture from |
Returns
| Type | Description |
|---|---|
| IPixelTexture2D | The ITexture2D instance |
createTexture(int width, int height)
Creates a ITexture2D instance with specified width and height which can be rendered on IRenderSurface via IRenderContext2D methods
Declaration
public abstract IPixelTexture2D createTexture(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of texture in pixels |
| int | height | The height of texture in pixels |
Returns
| Type | Description |
|---|---|
| IPixelTexture2D | The ITexture2D instance |
createTexture(int width, int height, TextureFiltering textureFiltering)
Creates a ITexture2D instance with specified width and height which can be rendered on IRenderSurface via IRenderContext2D methods
Declaration
public abstract IPixelTexture2D createTexture(int width, int height, TextureFiltering textureFiltering)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of texture in pixels |
| int | height | The height of texture in pixels |
| TextureFiltering | textureFiltering | The sampling mode. |
Returns
| Type | Description |
|---|---|
| IPixelTexture2D | The ITexture2D instance |
disposeResource(ResourceId resourceId)
Tries to dispose resource associated with specified resourceId
Declaration
public abstract void disposeResource(ResourceId resourceId)
Parameters
| Type | Name | Description |
|---|---|---|
| ResourceId | resourceId | The resource id |
getResource(ResourceId resourceId)
Gets the resource by specified resourceId
Declaration
public abstract IDisposable getResource(ResourceId resourceId)
Parameters
| Type | Name | Description |
|---|---|---|
| ResourceId | resourceId | The resource id |
Returns
| Type | Description |
|---|---|
| IDisposable | The resource associated with specified |
hasResource(ResourceId resourceId)
Checks if asset manager contains any resource associated with resourceId
Declaration
public abstract boolean hasResource(ResourceId resourceId)
Parameters
| Type | Name | Description |
|---|---|---|
| ResourceId | resourceId | The resource id |
Returns
| Type | Description |
|---|---|
| boolean | True if asset manager contains any resource, otherwise returns false |
storeResource(ResourceId resourceId, IDisposable resource)
Store the specified resource in this asset manager
Declaration
public abstract void storeResource(ResourceId resourceId, IDisposable resource)
Parameters
| Type | Name | Description |
|---|---|---|
| ResourceId | resourceId | The resource id |
| IDisposable | resource | The resource to store |