Mobile API Reference  MicroStrategy 2019
MSIGraphicUtils Class Reference

#import <MSIGraphicUtils.h>

Inheritance diagram for MSIGraphicUtils:

Class Methods

(CGPathRef) + newRoundedRectPathForBounds:radius:strokeWidth:
 
(UIColor *) + colorForColorCode:defaultColor:
 
(UIColor *) + colorForColorCode:
 
(NSString *) + mstrWebColorTohexColorCode:
 
(UIView *) + newImageViewOfView:
 
(UIImage *) + imageOfView:
 
(const CGFloat *) + getColorComponentsFromUIColor:
 
(NSString *) + getQuickSymbolUnicode:
 
(UIColor *) + getColorForColorDecimal:defaultColor:
 
(NSInteger) + getColorDecimalForColor:
 
(UIImageView *) + imageViewWithImage:constrainedByframe:
 
(CGSize) + imageSizeWithAspectRatioForImageSize:inFrame:
 

Method Documentation

◆ colorForColorCode:()

+ (UIColor*) colorForColorCode: (NSString *)  colorCode

Returns the UIColor object. The input colorCode could be a. "-1" (transparent) b. @"af345a" (hexcode) c. @"af345a:0.5" (hexcode:alpha float value) The alpha value between 0 and 1. If the input is @"-1", returns a [UIColor clearColor]. If the input is anything else returns a nil.

◆ colorForColorCode:defaultColor:()

+ (UIColor*) colorForColorCode: (NSString *)  colorCode
defaultColor: (UIColor *)  defColor 

Returns the UIColor object pertaining to the colorCode, for some reason if the colorCode cannot be decoded, returns a supplied defColor The input colorCode could be a. "-1" (transparent) b. @"af345a" (hexcode) c. @"af345a:0.5" (hexcode:alpha float value) The alpha value between 0 and 1.

◆ getColorComponentsFromUIColor:()

+ (const CGFloat*) getColorComponentsFromUIColor: (UIColor *)  color

Returns color components array from UIColor object. Returns a nil if the color is nil, else a 4 element array. [0] red, [1] blue, [2] green and [3] alpha. The r, g, b are from 0.0 and 1.0 (inclusive)

◆ getColorDecimalForColor:()

+ (NSInteger) getColorDecimalForColor: (UIColor *)  color

◆ getColorForColorDecimal:defaultColor:()

+ (UIColor*) getColorForColorDecimal: (NSInteger)  colorDecimal
defaultColor: (UIColor *)  defColor 

◆ getQuickSymbolUnicode:()

+ (NSString*) getQuickSymbolUnicode: (NSString *)  symbol

Returns the unicode symbol string for the given code.

◆ imageOfView:()

+ (UIImage*) imageOfView: (UIView *)  view

◆ imageSizeWithAspectRatioForImageSize:inFrame:()

+ (CGSize) imageSizeWithAspectRatioForImageSize: (CGSize)  imageSize
inFrame: (CGSize)  frame 

◆ imageViewWithImage:constrainedByframe:()

+ (UIImageView*) imageViewWithImage: (UIImage *)  image
constrainedByframe: (CGRect)  frame 

◆ mstrWebColorTohexColorCode:()

+ (NSString*) mstrWebColorTohexColorCode: (NSString *)  webColor

Returns a hex color code. Converts the input web color code and returns a corresponding hex color code. Returns an empty string if the webColor is not valid.

◆ newImageViewOfView:()

+ (UIView*) newImageViewOfView: (UIView *)  view

Returns the new image of the view. It is responsibility of the caller to release the view. This is useful if you need a snapshot of the current view while showing the transition effects.

◆ newRoundedRectPathForBounds:radius:strokeWidth:()

+ (CGPathRef) newRoundedRectPathForBounds: (CGRect)  rrect
radius: (CGFloat)  radius
strokeWidth: (CGFloat)  strokeWidth