From 16bd95b689efebf7a213d26aaa3f318cab7fb54b Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Fri, 7 Sep 2018 11:12:19 -0700 Subject: [PATCH] Expose `RCTBorderDrawing.h` as a public header Summary: @public We will use that in RCTFabric module. Reviewed By: sahrens Differential Revision: D9631866 fbshipit-source-id: a8e4074189359ad6014d0506d6a1e020b5d0d330 --- React/Views/RCTBorderDrawing.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/React/Views/RCTBorderDrawing.h b/React/Views/RCTBorderDrawing.h index 089f92fa01c..cf5f432a711 100644 --- a/React/Views/RCTBorderDrawing.h +++ b/React/Views/RCTBorderDrawing.h @@ -8,6 +8,7 @@ #import #import +#import typedef struct { CGFloat topLeft; @@ -33,24 +34,24 @@ typedef struct { /** * Determine if the border widths, colors and radii are all equal. */ -BOOL RCTBorderInsetsAreEqual(UIEdgeInsets borderInsets); -BOOL RCTCornerRadiiAreEqual(RCTCornerRadii cornerRadii); -BOOL RCTBorderColorsAreEqual(RCTBorderColors borderColors); +RCT_EXTERN BOOL RCTBorderInsetsAreEqual(UIEdgeInsets borderInsets); +RCT_EXTERN BOOL RCTCornerRadiiAreEqual(RCTCornerRadii cornerRadii); +RCT_EXTERN BOOL RCTBorderColorsAreEqual(RCTBorderColors borderColors); /** * Convert RCTCornerRadii to RCTCornerInsets by applying border insets. * Effectively, returns radius - inset, with a lower bound of 0.0. */ -RCTCornerInsets RCTGetCornerInsets(RCTCornerRadii cornerRadii, - UIEdgeInsets borderInsets); +RCT_EXTERN RCTCornerInsets RCTGetCornerInsets(RCTCornerRadii cornerRadii, + UIEdgeInsets borderInsets); /** * Create a CGPath representing a rounded rectangle with the specified bounds * and corner insets. Note that the CGPathRef must be released by the caller. */ -CGPathRef RCTPathCreateWithRoundedRect(CGRect bounds, - RCTCornerInsets cornerInsets, - const CGAffineTransform *transform); +RCT_EXTERN CGPathRef RCTPathCreateWithRoundedRect(CGRect bounds, + RCTCornerInsets cornerInsets, + const CGAffineTransform *transform); /** * Draw a CSS-compliant border as an image. You can determine if it's scalable @@ -58,10 +59,10 @@ CGPathRef RCTPathCreateWithRoundedRect(CGRect bounds, * * `borderInsets` defines the border widths for each edge. */ -UIImage *RCTGetBorderImage(RCTBorderStyle borderStyle, - CGSize viewSize, - RCTCornerRadii cornerRadii, - UIEdgeInsets borderInsets, - RCTBorderColors borderColors, - CGColorRef backgroundColor, - BOOL drawToEdge); +RCT_EXTERN UIImage *RCTGetBorderImage(RCTBorderStyle borderStyle, + CGSize viewSize, + RCTCornerRadii cornerRadii, + UIEdgeInsets borderInsets, + RCTBorderColors borderColors, + CGColorRef backgroundColor, + BOOL drawToEdge);