iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
ISCIAssetManager2D
@protocol ISCIAssetManager2D <ISCIDisposable>
Defines protocol with method for creation of assets used for drawing on IRenderSurface
via IRenderContext2D
methods.
See
ISCIRenderSurface
.
See
ISCIRenderContext2D
.
-
Creates a
ISCIPen2D
instance from specifiedSCIPenStyle
.Declaration
Objective-C
- (nonnull id<ISCIPen2D>)penWithStyle:(nonnull SCIPenStyle *)style;
Swift
func pen(with style: SCIPenStyle) -> ISCIPen2D
Parameters
style
The SCIPenStyle to create pen from.
Return Value
The
ISCIPen2D
instance. -
Creates a
ISCIPen2D
instance from specifiedSCIPenStyle
.Declaration
Objective-C
- (nonnull id<ISCIPen2D>)penWithStyle:(nonnull SCIPenStyle *)style andOpacity:(float)opacity;
Swift
func pen(with style: SCIPenStyle, andOpacity opacity: Float) -> ISCIPen2D
Parameters
style
The SCIPenStyle to create pen from.
opacity
The opacity of created pen.
Return Value
The
ISCIPen2D
instance. -
Creates a
ISCIBrush2D
instance from specifiedSCIBrushStyle
.Declaration
Objective-C
- (nonnull id<ISCIBrush2D>)brushWithStyle:(nonnull SCIBrushStyle *)style;
Swift
func brush(with style: SCIBrushStyle) -> ISCIBrush2D
Parameters
style
The BrushStyle to create brush from.
Return Value
The
ISCIBrush2D
instance. -
Creates a
ISCIBrush2D
instance from specifiedSCIBrushStyle
Declaration
Objective-C
- (nonnull id<ISCIBrush2D>)brushWithStyle:(nonnull SCIBrushStyle *)style textureMappingMode: (SCITextureMappingMode)textureMappingMode;
Swift
func brush(with style: SCIBrushStyle, textureMappingMode: SCITextureMappingMode) -> ISCIBrush2D
Parameters
style
The BrushStyle to create brush from.
textureMappingMode
The texture mapping which will be used by created brush.
Return Value
The
ISCIBrush2D
instance. -
Creates a
ISCIBrush2D
instance from specifiedSCIBrushStyle
.Declaration
Objective-C
- (nonnull id<ISCIBrush2D>)brushWithStyle:(nonnull SCIBrushStyle *)style textureMappingMode: (SCITextureMappingMode)textureMappingMode andOpacity:(float)opacity;
Swift
func brush(with style: SCIBrushStyle, textureMappingMode: SCITextureMappingMode, andOpacity opacity: Float) -> ISCIBrush2D
Parameters
style
The BrushStyle to create brush from.
textureMappingMode
The texture mapping which will be used by created brush.
opacity
The opacity of created brush.
Return Value
The
ISCIBrush2D
instance. -
Creates a
ISCITexture2D
instance fromSCIBitmap
.Declaration
Objective-C
- (nonnull id<ISCITexture2D>)textureWithBitmap:(nonnull SCIBitmap *)bitmap;
Swift
func texture(with bitmap: SCIBitmap) -> ISCITexture2D
Parameters
bitmap
The SCIBitmap instance to create texture from.
Return Value
The
ISCITexture2D
instance. -
Creates a
ISCITexture2D
instance from region ofSCIBitmap
.Declaration
Objective-C
- (nonnull id<ISCITexture2D>)textureWithBitmap:(nonnull SCIBitmap *)bitmap region:(CGRect)bitmapRegion;
Swift
func texture(with bitmap: SCIBitmap, region bitmapRegion: CGRect) -> ISCITexture2D
Parameters
bitmap
The SCIBitmap instance to create texture from.
bitmapRegion
The region of bitmap in pixels to create texture from.
Return Value
The
ISCITexture2D
instance. -
Creates a
ISCITexture2D
instance with specified width and height which can be rendered onISCIRenderSurface
viaISCIRenderContext2D
methods.Declaration
Objective-C
- (nonnull id<ISCITexture2D>)textureWithWidth:(int)width height:(int)height;
Swift
func texture(withWidth width: Int32, height: Int32) -> ISCITexture2D
Parameters
width
The width of texture in pixels.
height
The hegith of texture in pixels.
Return Value
The
ISCITexture2D
instance. -
Creates a
ISCITexture2D instance with specified width and height which can be rendered on
ISCIRenderSurfacevia
ISCIRenderContext2D` methods.Declaration
Objective-C
- (nonnull id<ISCITexture2D>)textureWithData:(nonnull void *)data andSize:(CGSize)size;
Swift
func texture(withData data: UnsafeMutableRawPointer, andSize size: CGSize) -> ISCITexture2D
Parameters
data
The data with which texture will be initialized.
size
The size of texture in pixels.
Return Value
The
ISCITexture2D
instance. -
Creates a
ISCITexture2D instance with specified width and height which can be rendered on
ISCIRenderSurfacevia
ISCIRenderContext2D` methods.Declaration
Objective-C
- (nonnull id<ISCITexture2D>)textureWithFloatData:(nonnull void *)data andSize:(CGSize)size;
Swift
func texture(withFloatData data: UnsafeMutableRawPointer, andSize size: CGSize) -> ISCITexture2D
Parameters
data
The data with which texture will be initialized.
size
The size of texture in pixels.
Return Value
The
ISCITexture2D
instance. -
Gets the resource by specified
resourceId
.Declaration
Objective-C
- (nonnull id<ISCIDisposable>)getResource:(nonnull SCIResourceId *)resourceId;
Swift
func getResource(_ resourceId: SCIResourceId) -> ISCIDisposable
Parameters
resourceId
The resource id.
Return Value
The resource associated with specified
resourceId
. -
Checks if asset manager contains any resource associated with
resourceId
.Declaration
Objective-C
- (BOOL)hasResource:(nonnull SCIResourceId *)resourceId;
Swift
func hasResource(_ resourceId: SCIResourceId) -> Bool
Parameters
resourceId
The resource id.
Return Value
YES if asset manager contains any resource, otherwise - NO.
-
Store the specified
resource
in this asset manager.Declaration
Objective-C
- (void)storeResource:(nonnull SCIResourceId *)resourceId resource:(nonnull id<ISCIDisposable>)resource;
Swift
func storeResource(_ resourceId: SCIResourceId, resource: ISCIDisposable)
Parameters
resourceId
The resource id.
resource
The resource to store.
-
Tries to dispose resource associated with specified
resourceId
.Declaration
Objective-C
- (void)disposeResource:(nonnull SCIResourceId *)resourceId;
Swift
func disposeResource(_ resourceId: SCIResourceId)
Parameters
resourceId
The resource id.