iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

ISCIResizingGrip

@protocol ISCIResizingGrip <NSObject>

Defines the protocol for Resizing Grip which is used to resize ISCIAnnotation instance.

  • Draw this resizing grip at specified point.

    Declaration

    Objective-C

    - (void)onDrawGripAt:(CGPoint)point inCGContext:(nonnull CGContextRef)context;

    Swift

    func onDraw(at point: CGPoint, in context: CGContext)

    Parameters

    point

    The coordinates of point to draw in pixels.

    context

    The CGContext to draw resizing grip on.

  • Checks whether this reising grip is hit.

    Declaration

    Objective-C

    - (BOOL)isHitAtPoint:(CGPoint)hitPoint andDrawnPoint:(CGPoint)drawnPoint;

    Swift

    func isHit(at hitPoint: CGPoint, andDrawnPoint drawnPoint: CGPoint) -> Bool

    Parameters

    hitPoint

    The hit test point in pixels.

    drawnPoint

    The point where resizing grip was drawn.

    Return Value

    YES - if hit test point is within resizing grip, otherwise NO;

  • Draw this resizing custom grip at specified point.

    Declaration

    Objective-C

    - (void)onDrawCustomGripAt:(CGContextRef _Nonnull)context
                       imgGrip:(UIImage *_Nonnull)imgGrip
                  isHorizontal:(BOOL)isHorizontal
                      drawRect:(CGRect)drawRect;

    Swift

    func onDrawCustomGrip(at context: CGContext, imgGrip: UIImage, isHorizontal: Bool, draw drawRect: CGRect)

    Parameters

    context

    The CGContext to draw resizing grip on.

    imgGrip

    The custom UIImage to draw.

    isHorizontal

    BOOL flag to determine chart is horizontal or vertical

    drawRect

    The CGRect to draw grip.

  • Checks whether this reising grip is hit.

    Declaration

    Objective-C

    - (BOOL)customGripIsHitAtPoint:(CGPoint)hitPoint
                     andDrawnFrame:(CGRect)drawnFrame;

    Swift

    func customGripIsHit(at hitPoint: CGPoint, andDrawnFrame drawnFrame: CGRect) -> Bool

    Parameters

    hitPoint

    The hit test point in pixels.

    drawnFrame

    The frame where resizing grip was drawn.

    Return Value

    YES - if hit test point is within resizing grip, otherwise NO;

  • Draws the grip helper when the window gap is too small for standard grips.

    Declaration

    Objective-C

    - (void)onDrawGripHelper:(CGContextRef _Nonnull)context
                     pointX1:(CGFloat)pointX1
                     pointX2:(CGFloat)pointX2
                        size:(CGSize)size
                isHorizontal:(BOOL)isHorizontal;

    Swift

    func onDrawHelper(_ context: CGContext, pointX1: CGFloat, pointX2: CGFloat, size: CGSize, isHorizontal: Bool)

    Parameters

    context

    The CGContext to draw resizing grip on.

    pointX1

    The X1 coordinate of point to draw in pixels.

    pointX2

    The X2 coordinate of point to draw in pixels.

    size

    The size of the helper grip to draw in pixels.

    isHorizontal

    BOOL flag to determine chart is horizontal or vertical