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
This commit is contained in:
parent
a3954ed5cb
commit
16bd95b689
|
@ -8,6 +8,7 @@
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
#import <React/RCTBorderStyle.h>
|
#import <React/RCTBorderStyle.h>
|
||||||
|
#import <React/RCTDefines.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
CGFloat topLeft;
|
CGFloat topLeft;
|
||||||
|
@ -33,24 +34,24 @@ typedef struct {
|
||||||
/**
|
/**
|
||||||
* Determine if the border widths, colors and radii are all equal.
|
* Determine if the border widths, colors and radii are all equal.
|
||||||
*/
|
*/
|
||||||
BOOL RCTBorderInsetsAreEqual(UIEdgeInsets borderInsets);
|
RCT_EXTERN BOOL RCTBorderInsetsAreEqual(UIEdgeInsets borderInsets);
|
||||||
BOOL RCTCornerRadiiAreEqual(RCTCornerRadii cornerRadii);
|
RCT_EXTERN BOOL RCTCornerRadiiAreEqual(RCTCornerRadii cornerRadii);
|
||||||
BOOL RCTBorderColorsAreEqual(RCTBorderColors borderColors);
|
RCT_EXTERN BOOL RCTBorderColorsAreEqual(RCTBorderColors borderColors);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert RCTCornerRadii to RCTCornerInsets by applying border insets.
|
* Convert RCTCornerRadii to RCTCornerInsets by applying border insets.
|
||||||
* Effectively, returns radius - inset, with a lower bound of 0.0.
|
* Effectively, returns radius - inset, with a lower bound of 0.0.
|
||||||
*/
|
*/
|
||||||
RCTCornerInsets RCTGetCornerInsets(RCTCornerRadii cornerRadii,
|
RCT_EXTERN RCTCornerInsets RCTGetCornerInsets(RCTCornerRadii cornerRadii,
|
||||||
UIEdgeInsets borderInsets);
|
UIEdgeInsets borderInsets);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a CGPath representing a rounded rectangle with the specified bounds
|
* Create a CGPath representing a rounded rectangle with the specified bounds
|
||||||
* and corner insets. Note that the CGPathRef must be released by the caller.
|
* and corner insets. Note that the CGPathRef must be released by the caller.
|
||||||
*/
|
*/
|
||||||
CGPathRef RCTPathCreateWithRoundedRect(CGRect bounds,
|
RCT_EXTERN CGPathRef RCTPathCreateWithRoundedRect(CGRect bounds,
|
||||||
RCTCornerInsets cornerInsets,
|
RCTCornerInsets cornerInsets,
|
||||||
const CGAffineTransform *transform);
|
const CGAffineTransform *transform);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draw a CSS-compliant border as an image. You can determine if it's scalable
|
* 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.
|
* `borderInsets` defines the border widths for each edge.
|
||||||
*/
|
*/
|
||||||
UIImage *RCTGetBorderImage(RCTBorderStyle borderStyle,
|
RCT_EXTERN UIImage *RCTGetBorderImage(RCTBorderStyle borderStyle,
|
||||||
CGSize viewSize,
|
CGSize viewSize,
|
||||||
RCTCornerRadii cornerRadii,
|
RCTCornerRadii cornerRadii,
|
||||||
UIEdgeInsets borderInsets,
|
UIEdgeInsets borderInsets,
|
||||||
RCTBorderColors borderColors,
|
RCTBorderColors borderColors,
|
||||||
CGColorRef backgroundColor,
|
CGColorRef backgroundColor,
|
||||||
BOOL drawToEdge);
|
BOOL drawToEdge);
|
||||||
|
|
Loading…
Reference in New Issue