Functions

The following functions are available globally.

  • Method which creates a range structure

    Declaration

    Objective-C

    static inline MBRange MBMakeRange(CGFloat start, CGFloat stop)

    Swift

    func MBMakeRange(_ start: Int32, _ stop: Int32) -> MBRange
  • Method which creates a scale structure

    Declaration

    Objective-C

    static inline MBScale MBMakeScale(CGFloat scale, CGFloat tolerance)

    Swift

    func MBMakeScale(_ scale: Int32, _ tolerance: Int32) -> MBScale
  • Undocumented

    Declaration

    Objective-C

    CGDelta CGDeltaMake(CGFloat deltaX, CGFloat deltaY)

    Swift

    func CGDeltaMake(_ deltaX: CGFloat, _ deltaY: CGFloat) -> CGDelta
  • Undocumented

    Declaration

    Objective-C

    CGPoint CGPointWithDelta(CGPoint point, CGDelta delta)

    Swift

    func CGPointWithDelta(_ point: CGPoint, _ delta: CGDelta) -> CGPoint
  • Undocumented

    Declaration

    Objective-C

    CGFloat CGPointDistance(CGPoint p1, CGPoint p2)

    Swift

    func CGPointDistance(_ p1: CGPoint, _ p2: CGPoint) -> CGFloat
  • Undocumented

    Declaration

    Objective-C

    CGPoint CGPointAlongLine(CGLine line, CGFloat distance)

    Swift

    func CGPointAlongLine(_ line: CGLine, _ distance: CGFloat) -> CGPoint
  • Undocumented

    Declaration

    Objective-C

    CGPoint CGPointRotatedAroundPoint(CGPoint point, CGPoint pivot, CGFloat degrees)

    Swift

    func CGPointRotatedAroundPoint(_ point: CGPoint, _ pivot: CGPoint, _ degrees: CGFloat) -> CGPoint
  • Undocumented

    Declaration

    Objective-C

    CGPoint CGRectTopLeftPoint(CGRect rect)

    Swift

    func CGRectTopLeftPoint(_ rect: CGRect) -> CGPoint
  • Undocumented

    Declaration

    Objective-C

    CGPoint CGRectTopRightPoint(CGRect rect)

    Swift

    func CGRectTopRightPoint(_ rect: CGRect) -> CGPoint
  • Undocumented

    Declaration

    Objective-C

    CGPoint CGRectBottomLeftPoint(CGRect rect)

    Swift

    func CGRectBottomLeftPoint(_ rect: CGRect) -> CGPoint
  • Undocumented

    Declaration

    Objective-C

    CGPoint CGRectBottomRightPoint(CGRect rect)

    Swift

    func CGRectBottomRightPoint(_ rect: CGRect) -> CGPoint
  • Undocumented

    Declaration

    Objective-C

    CGRect CGRectResize(CGRect rect, CGSize newSize)

    Swift

    func CGRectResize(_ rect: CGRect, _ newSize: CGSize) -> CGRect
  • Undocumented

    Declaration

    Objective-C

    CGRect CGRectInsetEdge(CGRect rect, CGRectEdge edge, CGFloat amount)

    Swift

    func CGRectInsetEdge(_ rect: CGRect, _ edge: CGRectEdge, _ amount: CGFloat) -> CGRect
  • Calculates the stacking of rectangles within a larger rectangle. The resulting rectangle is stacked counter clockwise along the edge specified. As soon as there are more rects than will fit, a new row is started, thus, they are stacked by column, then by row. reverse will cause them to be stacked counter-clockwise along the specified edge.

    Declaration

    Objective-C

    CGRect CGRectStackedWithinRectFromEdge(CGRect rect, CGSize size, int count,
                                           CGRectEdge edge, _Bool reverse)

    Swift

    func CGRectStackedWithinRectFromEdge(_ rect: CGRect, _ size: CGSize, _ count: Int32, _ edge: CGRectEdge, _ reverse: Bool) -> CGRect
  • Undocumented

    Declaration

    Objective-C

    CGPoint CGRectCenterPoint(CGRect rect)

    Swift

    func CGRectCenterPoint(_ rect: CGRect) -> CGPoint
  • Undocumented

    Declaration

    Objective-C

    void CGRectClosestTwoCornerPoints(CGRect rect, CGPoint point, CGPoint *point1, CGPoint *point2)

    Swift

    func CGRectClosestTwoCornerPoints(_ rect: CGRect, _ point: CGPoint, _ point1: UnsafeMutablePointer<CGPoint>!, _ point2: UnsafeMutablePointer<CGPoint>!)
  • Undocumented

    Declaration

    Objective-C

    CGPoint CGLineIntersectsRectAtPoint(CGRect rect, CGLine line)

    Swift

    func CGLineIntersectsRectAtPoint(_ rect: CGRect, _ line: CGLine) -> CGPoint
  • Undocumented

    Declaration

    Objective-C

    void CGControlPointsForArcBetweenPointsWithRadius(CGPoint startPoint, CGPoint endPoint, CGFloat radius, bool rightHandRule,
                                                      CGPoint *controlPoint1, CGPoint *controlPoint2)

    Swift

    func CGControlPointsForArcBetweenPointsWithRadius(_ startPoint: CGPoint, _ endPoint: CGPoint, _ radius: CGFloat, _ rightHandRule: Bool, _ controlPoint1: UnsafeMutablePointer<CGPoint>!, _ controlPoint2: UnsafeMutablePointer<CGPoint>!)
  • Undocumented

    Declaration

    Objective-C

    PP_EXTERN CGRect scanningRegionForFrameInBounds(CGRect frame, CGRect bounds)

    Swift

    func scanningRegionForFrameInBounds(_ frame: CGRect, _ bounds: CGRect) -> CGRect