/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include #include #import NS_ASSUME_NONNULL_BEGIN @interface RCTGradientUtils : NSObject + (std::vector)getFixedColorStops: (const std::vector &)colorStops gradientLineLength:(CGFloat)gradientLineLength; // CAGradientLayer linear gradient squishes the non-square gradient to square gradient. // This function fixes the "squished" effect. // See https://stackoverflow.com/a/43176174 for more information. + (std::pair)pointsForCAGradientLayerLinearGradient:(CGPoint)startPoint endPoint:(CGPoint)endPoint bounds:(CGSize)bounds; + (void)getColors:(NSMutableArray *)colors andLocations:(NSMutableArray *)locations fromColorStops:(const std::vector &)colorStops; @end NS_ASSUME_NONNULL_END