summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLRendererConfiguration.h
blob: a2ad4d6cdcdb36cf5ae5401670bf0f2926c86317 (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
#import "MGLFoundation.h"
#import <Foundation/Foundation.h>
#import <mbgl/storage/default_file_source.hpp>
#import <mbgl/renderer/mode.hpp>

NS_ASSUME_NONNULL_BEGIN

/**
 The MGLRendererConfiguration object represents configuration values for the
 renderer.
 */
MGL_EXPORT
@interface MGLRendererConfiguration : NSObject

/** Returns an instance of the current renderer configuration. */
@property (class, nonatomic, readonly) MGLRendererConfiguration *currentConfiguration;

/** The file source to use. Defaults to `mbgl::DefaultFileSource` */
@property (nonatomic, readonly) mbgl::DefaultFileSource *fileSource;

/** The GL context mode to use. Defaults to `mbgl::GLContextMode::Unique` */
@property (nonatomic, readonly) mbgl::GLContextMode contextMode;

/** The scale factor to use.

 Based on the native scale where available, otherwise the standard screen scale. */
@property (nonatomic, readonly) const float scaleFactor;

/** The cache dir to use. */
@property (nonatomic, readonly) mbgl::optional<std::string> cacheDir;

/** The name of the font family to use for client-side text rendering.

 Currently only used for CJK glyphs. Changing this at run time is not currently
 supported. Enable client-side rendering of CJK glyphs by setting
 `MGLIdeographicFontFamilyName` in your containing app's Info.plist to a value
 which will be available at run time. Default font for local ideograph font family
 is "PingFang". */
@property (nonatomic, readonly) std::string localFontFamilyName;

/**
 A Boolean value indicating whether symbol layers may enable per-source symbol
 collision detection.
 
 Set `MGLCollisionBehaviorPre4_0` in your containing app's Info.plist or by using
 `[[NSUserDefaults standardUserDefaults] setObject:@(YES) forKey:@"MGLCollisionBehaviorPre4_0"]`.
 If both are set, the value from `NSUserDefaults` takes priority.
 
 Setting this property to `YES` in the plist results in symbol layers only running
 collision detection against other symbol layers that are part of the same source.
 */
@property (nonatomic, readonly) BOOL perSourceCollisions;

@end

NS_ASSUME_NONNULL_END