iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SCIBitmap

@interface SCIBitmap : SCIDisposableBase

Defines and obj-c wrapper around CGContextRef bitmap context.

  • Gets the underlying CGContextRef bitmap.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGContextRef _Nonnull context;

    Swift

    var context: CGContext { get }
  • A pointer to the destination in memory where the bitmap data is stores.

    Declaration

    Objective-C

    @property (readonly, nonatomic) unsigned int *_Nonnull data;

    Swift

    var data: UnsafeMutablePointer<UInt32> { get }
  • Gets the width of the underlying CGContextRef bitmap.

    Declaration

    Objective-C

    @property (readonly, nonatomic) unsigned int width;

    Swift

    var width: UInt32 { get }
  • Gets the height of the underlying CGContextRef bitmap.

    Declaration

    Objective-C

    @property (readonly, nonatomic) unsigned int height;

    Swift

    var height: UInt32 { get }
  • Creates a new SCIBitmap instance from passed in SCIBitmap region.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithBitmap:(nonnull SCIBitmap *)bitmap
                                    region:(CGRect)region;

    Swift

    init(bitmap: SCIBitmap, region: CGRect)

    Parameters

    bitmap

    The origin bitmap to take region from.

    region

    The region of the bitmap, to be used as new bitmap.

  • Creates a new SCIBitmap instance.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSize:(CGSize)size;

    Swift

    init(size: CGSize)

    Parameters

    size

    The size of the desired bitmap, in pixels.

  • Creates a new SCIBitmap instance.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithData:(nonnull unsigned int *)data
                                   width:(unsigned int)width
                                  height:(unsigned int)height;

    Swift

    init(data: UnsafeMutablePointer<UInt32>, width: UInt32, height: UInt32)

    Parameters

    data

    The origin bitmap to take the region from.

    width

    The width of the required bitmap, in pixels, .

    height

    The height of the required bitmap, in pixels, .

  • Returns the raw value of the pixel at [x, y] from underlying SCIBitmap instance.

    Declaration

    Objective-C

    - (unsigned int)pixelAtX:(unsigned int)x y:(unsigned int)y;

    Swift

    func pixelAt(x: UInt32, y: UInt32) -> UInt32

    Parameters

    x

    The x coordinate, to get pixel at.

    y

    The y coordinate, to get pixel at.

    Return Value

    The raw value of the pixel at [x, y].

  • Creates and returns a bitmap object that uses the specified image data.

    Declaration

    Objective-C

    + (nonnull SCIBitmap *)bitmapWithImage:(nonnull UIImage *)image;

    Swift

    /*not inherited*/ init(image: UIImage)