From 73324ae2f886ac32fc673c996b00faf0383d93c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Wed, 2 Dec 2015 15:08:51 -0800 Subject: [osx] Commented private headers and implementation files --- platform/darwin/MGLGeometry_Private.h | 8 ++++++++ platform/darwin/MGLMultiPoint_Private.h | 11 +++++++++++ 2 files changed, 19 insertions(+) (limited to 'platform/darwin') 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 + #import #import @@ -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 &)shapes withDelegate:(id )delegate; + +/** Constructs a shape annotation properties object by asking the delegate for style values. */ - (mbgl::ShapeAnnotation::Properties)shapeAnnotationPropertiesObjectWithDelegate:(id )delegate; @end +/** An object that tells the MGLMultiPoint instance how to style itself. */ @protocol MGLMultiPointDelegate +/** 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 -- cgit v1.2.1