aboutsummaryrefslogtreecommitdiff
path: root/iosApp/WhirlyGlobeMaplyComponent.xcframework/ios-arm64/WhirlyGlobeMaplyComponent.framework/Headers/MaplyScreenObject.h
blob: 48028ae378ec774f325588b94e013d7bdc55aee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
 *  MaplyScreenObject
 *  WhirlyGlobeComponent
 *
 *  Created by Steve Gifford on 2/28/15
 *  Copyright 2011-2022 mousebird consulting
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

#import <UIKit/UIKit.h>
#import <WhirlyGlobeMaplyComponent/MaplyCoordinate.h>
#import <WhirlyGlobeMaplyComponent/MaplyRenderController.h>

/** 
    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.
  */
@interface MaplyScreenObject : NSObject

/** 
    Add a string to the screen object
    
    @param str The string to add
    
    @param font The font to use
    
    @param color The foreground color of the string.
  */
- (void)addString:(NSString *)str font:(UIFont *)font color:(UIColor *)color;

/** 
    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.
  */
- (void)addAttributedString:(NSAttributedString *)str;

/** 
    Add an image scaled to the given size.
    
    Adds a UIImage or MaplyTexture object scaled to the given size.
  */
- (void)addImage:(id)image color:(UIColor *)color size:(CGSize)size;

/**
    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.
 */
- (void)addImage:(id)image color:(UIColor *)color size:(CGSize)size offset:(CGPoint)offset;

/** 
    Calculate and return the current bounding box of the screen object.
  */
- (MaplyBoundingBox)getSize;

/** 
    Apply a scale to all the pieces of the screen object.
  */
- (void)scaleX:(double)x y:(double)y;

/** 
    Apply a translation to all the pieces of the screen object.
  */
- (void)translateX:(double)x y:(double)y;

/** 
    Add the contents of the given screen object to this screen object.
  */
- (void)addScreenObject:(MaplyScreenObject *)screenObj;

@end

/**
 Features missing to replicate ScreenMarker and ScreenLabel.
    rotation
    images (for animation)
    period (for animation)
    color
    layoutImportance
    layoutSize
    layoutPlacement (right, left, above, below)
    vertexAttributes
    keepUpright
 
 ScreenObjectInstance (new object)
    location
    endLoc/duration (moving fields)
    selectable
    ScreenObject pointer
    Selected version ScreenObject pointer
    uniqueID
    userObject (for selection)
 */