SDImageRoundCornerTransformer

@interface SDImageRoundCornerTransformer : NSObject <SDImageTransformer>

Image round corner transformer

  • The radius of each corner oval. Values larger than half the rectangle’s width or height are clamped appropriately to half the width or height.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat cornerRadius;

    Swift

    var cornerRadius: CGFloat { get }
  • A bitmask value that identifies the corners that you want rounded. You can use this parameter to round only a subset of the corners of the rectangle.

    Declaration

    Objective-C

    @property (readonly, nonatomic) SDRectCorner corners;

    Swift

    var corners: SDRectCorner { get }
  • The inset border line width. Values larger than half the rectangle’s width or height are clamped appropriately to half the width or height.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat borderWidth;

    Swift

    var borderWidth: CGFloat { get }
  • The border stroke color. nil means clear color.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) UIColor *borderColor;

    Swift

    var borderColor: UIColor? { get }
  • Unavailable

    Declaration

    Objective-C

    - (nonnull instancetype)init NS_UNAVAILABLE;
  • Declaration

    Objective-C

    + (nonnull instancetype)transformerWithRadius:(CGFloat)cornerRadius corners:(SDRectCorner)corners borderWidth:(CGFloat)borderWidth borderColor:(nullable UIColor *)borderColor;

    Swift

    convenience init(radius cornerRadius: CGFloat, corners: SDRectCorner, borderWidth: CGFloat, borderColor: UIColor?)