MaplyScreenObject
Objective-C
@interface MaplyScreenObject : NSObject
Swift
class MaplyScreenObject : NSObject
The Maply Screen Object is used to build up a more complex screen object from multiple pieces.
You can use one or more of these to build up a combination of labels and images that form a single marker, label, or billboard.
-
Add a string to the screen object
Declaration
Objective-C
- (void)addString:(NSString *)str font:(id)font color:(id)color;
Swift
func add(_ str: String!, font: Any!, color: Any!)
Parameters
str
The string to add
font
The font to use
color
The foreground color of the string.
-
Add an attributed string to the screen object.
This adds an annotated string to the screen object. The size will be based on the length of the string and the font.
Declaration
Objective-C
- (void)addAttributedString:(NSAttributedString *)str;
Swift
func add(_ str: NSAttributedString!)
-
Add an image scaled to the given size.
Adds a UIImage or MaplyTexture object scaled to the given size.
Declaration
Objective-C
- (void)addImage:(id)image color:(id)color size:(CGSize)size;
Swift
func addImage(_ image: Any!, color: Any!, size: CGSize)
-
Add an image scaled to the given size and offset by the given amount.
The other version of this call centers around (0,0) so this lets you nudge it.
Declaration
Objective-C
- (void)addImage:(id)image color:(id)color size:(CGSize)size offset:(CGPoint)offset;
Swift
func addImage(_ image: Any!, color: Any!, size: CGSize, offset: CGPoint)
-
Calculate and return the current bounding box of the screen object.
-
Apply a scale to all the pieces of the screen object.
Declaration
Objective-C
- (void)scaleX:(double)x y:(double)y;
Swift
func scaleX(_ x: Double, y: Double)
-
Apply a translation to all the pieces of the screen object.
Declaration
Objective-C
- (void)translateX:(double)x y:(double)y;
Swift
func translateX(_ x: Double, y: Double)
-
Add the contents of the given screen object to this screen object.
Declaration
Objective-C
- (void)addScreenObject:(MaplyScreenObject *)screenObj;
Swift
func add(_ screenObj: MaplyScreenObject!)