diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2020-02-27 13:09:39 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2020-02-27 17:14:20 -0800 |
commit | 206b9bde5ed9204de6ec18c0d37495db7c30aa09 (patch) | |
tree | 0049d4d6bd9195c194c0fe96665ba72c92f00da5 /platform/darwin/src/MGLAttributedExpression.m | |
parent | bd252e16a3574efd11cca57917f52e6d1b2dd0a2 (diff) | |
download | qtlocation-mapboxgl-206b9bde5ed9204de6ec18c0d37495db7c30aa09.tar.gz |
[ios, macos] Deleted iOS/macOS map SDK sources, resources, scripts
Diffstat (limited to 'platform/darwin/src/MGLAttributedExpression.m')
-rw-r--r-- | platform/darwin/src/MGLAttributedExpression.m | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/platform/darwin/src/MGLAttributedExpression.m b/platform/darwin/src/MGLAttributedExpression.m deleted file mode 100644 index a34480a957..0000000000 --- a/platform/darwin/src/MGLAttributedExpression.m +++ /dev/null @@ -1,68 +0,0 @@ -#import "MGLAttributedExpression.h" -#import "MGLLoggingConfiguration_Private.h" - -const MGLAttributedExpressionKey MGLFontNamesAttribute = @"text-font"; -const MGLAttributedExpressionKey MGLFontScaleAttribute = @"font-scale"; -const MGLAttributedExpressionKey MGLFontColorAttribute = @"text-color"; - -@implementation MGLAttributedExpression - -- (instancetype)initWithExpression:(NSExpression *)expression { - self = [self initWithExpression:expression attributes:@{}]; - return self; -} - -+ (instancetype)attributedExpression:(NSExpression *)expression fontNames:(nullable NSArray<NSString *> *)fontNames fontScale:(nullable NSNumber *)fontScale { - MGLAttributedExpression *attributedExpression; - - NSMutableDictionary *attrs = [NSMutableDictionary dictionary]; - - if (fontNames && fontNames.count > 0) { - attrs[MGLFontNamesAttribute] = [NSExpression expressionForConstantValue:fontNames]; - } - - if (fontScale) { - attrs[MGLFontScaleAttribute] = [NSExpression expressionForConstantValue:fontScale]; - } - - attributedExpression = [[self alloc] initWithExpression:expression attributes:attrs]; - return attributedExpression; -} - -+ (instancetype)attributedExpression:(NSExpression *)expression attributes:(nonnull NSDictionary<MGLAttributedExpressionKey, NSExpression *> *)attrs { - MGLAttributedExpression *attributedExpression; - - attributedExpression = [[self alloc] initWithExpression:expression attributes:attrs]; - - return attributedExpression; -} - -- (instancetype)initWithExpression:(NSExpression *)expression attributes:(nonnull NSDictionary<MGLAttributedExpressionKey, NSExpression *> *)attrs { - if (self = [super init]) - { - MGLLogInfo(@"Starting %@ initialization.", NSStringFromClass([self class])); - _expression = expression; - _attributes = attrs; - - MGLLogInfo(@"Finalizing %@ initialization.", NSStringFromClass([self class])); - } - return self; -} - -- (BOOL)isEqual:(id)object { - BOOL result = NO; - - if ([object isKindOfClass:[self class]]) { - MGLAttributedExpression *otherObject = object; - result = [self.expression isEqual:otherObject.expression] && - [_attributes isEqual:otherObject.attributes]; - } - - return result; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"MGLAttributedExpression<Expression: %@ Attributes: %@>", self.expression, self.attributes]; -} - -@end |