RoundedCornersFilter
public struct RoundedCornersFilter : ImageFilter, Roundable
Rounds the corners of an image to the specified radius.
-
The radius of the filter.
Declaration
Swift
public let radius: CGFloat -
Whether to divide the radius by the image scale.
Declaration
Swift
public let divideRadiusByImageScale: Bool -
Initializes the
RoundedCornersFilterinstance with the given radius.Declaration
Swift
public init(radius: CGFloat, divideRadiusByImageScale: Bool = false)Parameters
radiusThe radius.
divideRadiusByImageScaleWhether to divide the radius by the image scale. Set to
truewhen the image has the same resolution for all screen scales such as @1x, @2x and @3x (i.e. single image from web server). Set tofalsefor images loaded from an asset catalog with varying resolutions for each screen scale.falseby default.Return Value
The new
RoundedCornersFilterinstance. -
The unique idenitifier for an
ImageFilterconforming to theRoundableprotocol.Declaration
Swift
public var identifier: String { get }
View on GitHub
Install in Dash
RoundedCornersFilter Structure Reference