ScaledToSizeWithRoundedCornersFilter
public struct ScaledToSizeWithRoundedCornersFilter : CompositeImageFilter
Scales an image to a specified size, then rounds the corners to the specified radius.
-
Initializes the
ScaledToSizeWithRoundedCornersFilterinstance with the given size and radius.Declaration
Swift
public init(size: CGSize, radius: CGFloat, divideRadiusByImageScale: Bool = false)Parameters
sizeThe size.
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
ScaledToSizeWithRoundedCornersFilterinstance. -
The image filters to apply to the image in sequential order.
Declaration
Swift
public let filters: [ImageFilter]
View on GitHub
Install in Dash
ScaledToSizeWithRoundedCornersFilter Structure Reference