diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-12-02 15:08:51 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-12-13 17:26:53 -0800 |
commit | 73324ae2f886ac32fc673c996b00faf0383d93c0 (patch) | |
tree | 829dee646209180689a993ef85d3ba7cf6e76668 /platform/darwin | |
parent | 62e6c04c730b7c461b418c093da63aef3e1fa9e6 (diff) | |
download | qtlocation-mapboxgl-73324ae2f886ac32fc673c996b00faf0383d93c0.tar.gz |
[osx] Commented private headers and implementation files
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/MGLGeometry_Private.h | 8 | ||||
-rw-r--r-- | platform/darwin/MGLMultiPoint_Private.h | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/platform/darwin/MGLGeometry_Private.h b/platform/darwin/MGLGeometry_Private.h index 936695fecf..08d1ad3695 100644 --- a/platform/darwin/MGLGeometry_Private.h +++ b/platform/darwin/MGLGeometry_Private.h @@ -1,5 +1,7 @@ #import "MGLGeometry.h" +#import <TargetConditionals.h> + #import <mbgl/map/map.hpp> #import <mbgl/util/geo.hpp> @@ -26,6 +28,12 @@ NS_INLINE BOOL MGLCoordinateInCoordinateBounds(CLLocationCoordinate2D coordinate return bounds.contains(MGLLatLngFromLocationCoordinate2D(coordinate)); } +#if TARGET_OS_MAC NS_INLINE mbgl::EdgeInsets MGLEdgeInsetsFromNSEdgeInsets(NSEdgeInsets insets) { return { insets.top, insets.left, insets.bottom, insets.right }; } +#elif TARGET_OS_IOS +NS_INLINE mbgl::EdgeInsets MGLEdgeInsetsFromNSEdgeInsets(UIEdgeInsets insets) { + return { insets.top, insets.left, insets.bottom, insets.right }; +} +#endif diff --git a/platform/darwin/MGLMultiPoint_Private.h b/platform/darwin/MGLMultiPoint_Private.h index e0d875d88a..c1f1fa1584 100644 --- a/platform/darwin/MGLMultiPoint_Private.h +++ b/platform/darwin/MGLMultiPoint_Private.h @@ -21,16 +21,27 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count; - (BOOL)intersectsOverlayBounds:(MGLCoordinateBounds)overlayBounds; +/** Adds a shape annotation to the given vector by asking the delegate for style values. */ - (void)addShapeAnnotationObjectToCollection:(std::vector<mbgl::ShapeAnnotation> &)shapes withDelegate:(id <MGLMultiPointDelegate>)delegate; + +/** Constructs a shape annotation properties object by asking the delegate for style values. */ - (mbgl::ShapeAnnotation::Properties)shapeAnnotationPropertiesObjectWithDelegate:(id <MGLMultiPointDelegate>)delegate; @end +/** An object that tells the MGLMultiPoint instance how to style itself. */ @protocol MGLMultiPointDelegate <NSObject> +/** Returns the fill alpha value for the given annotation. */ - (double)alphaForShapeAnnotation:(MGLShape *)annotation; + +/** Returns the stroke color object for the given annotation. */ - (mbgl::Color)strokeColorForShapeAnnotation:(MGLShape *)annotation; + +/** Returns the fill color object for the given annotation. */ - (mbgl::Color)fillColorForPolygonAnnotation:(MGLPolygon *)annotation; + +/** Returns the stroke width object for the given annotation. */ - (CGFloat)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation; @end |