Functions
The following functions are available globally.
-
Undocumented
Declaration
Objective-C
CGFloat CGPointDistance(CGPoint p1, CGPoint p2)
Swift
func CGPointDistance(_ p1: CGPoint, _ p2: CGPoint) -> CGFloat
-
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
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
MB_EXTERN CGRect MBIscanningRegionForFrameInBounds(CGRect frame, CGRect bounds)
Swift
func MBIscanningRegionForFrameInBounds(_ frame: CGRect, _ bounds: CGRect) -> CGRect
-
Method which creates a image extension factors structure
Declaration
Objective-C
static inline MBIImageExtensionFactors MBIMakeImageExtensionFactors(CGFloat top, CGFloat right, CGFloat bottom, CGFloat left)
-
Undocumented
Declaration
Objective-C
static inline NSString * MBI_LOCALIZED_DEFAULT_STRING(NSString *key) { return ([NSString stringWithFormat:@"[[%@]]", key]); }
Swift
func MBI_LOCALIZED_DEFAULT_STRING(_ key: String!) -> String!
-
Undocumented
Declaration
Objective-C
static inline NSString * MBI_LOCALIZED_FOR_LANGUAGE(NSString *key, NSString *language) { NSString *overridenStringFromCustomBundle = NSLocalizedStringWithDefaultValue(key, language, [MBIMicroblinkApp sharedInstance].customResourcesBundle, @"", @""); if ( overridenStringFromCustomBundle != nil && ![overridenStringFromCustomBundle isEqualToString:key]) { return overridenStringFromCustomBundle; } return NSLocalizedStringWithDefaultValue(key, language, [MBIMicroblinkApp sharedInstance].resourcesBundle, MBI_LOCALIZED_DEFAULT_STRING(key), nil); }
Swift
func MBI_LOCALIZED_FOR_LANGUAGE(_ key: String!, _ language: String!) -> String!
-
Undocumented
Declaration
Objective-C
static inline NSString * MBI_LOCALIZED(NSString *key) { NSString *localizationFileName = [MBIMicroblinkApp sharedInstance].customLocalizationFileName; if (localizationFileName) { NSString *overridenStringFromCustomLocalizationFile = NSLocalizedStringWithDefaultValue(key, localizationFileName, [NSBundle mainBundle], @"", @""); if (![overridenStringFromCustomLocalizationFile isEqualToString:key]) { return overridenStringFromCustomLocalizationFile; } } NSString *localizedString = MBI_LOCALIZED_FOR_LANGUAGE(key, [MBIMicroblinkApp sharedInstance].language); #ifndef DNDEBUG return localizedString; #else if ([localizedString isEqualToString:MBI_LOCALIZED_DEFAULT_STRING(key)] && ![MBIMicroblinkApp.sharedInstance.language isEqualToString:@"en"]) { localizedString = MBI_LOCALIZED_FOR_LANGUAGE(key, @"en"); } return localizedString; #endif }
Swift
func MBI_LOCALIZED(_ key: String!) -> String!