CIFilter_Gradient_SmoothLinearGradient - linhay/Stem GitHub Wiki

CIFilter.Gradient.SmoothLinearGradient

Discussion Where the CILinearGradient filter blends colors linearly (that is, the color at a point 25% along the line between Point 1 and Point 2 is 25% Color 1 and 75% Color 2), this filter blends colors using an S-curve function: the color blend at points less than 50% along the line between Point 1 and Point 2 is slightly closer to Color 1 than in a linear blend, and the color blend at points further than 50% along that line is slightly closer to Color 2 than in a linear blend.

public struct SmoothLinearGradient: CIFilterContainerProtocol

Available in OS X v10.11 and later and in iOS 7.0 and later.

Inheritance

CIFilterContainerProtocol

Initializers

init()

init()

Properties

filter

var filter: CIFilter

point0

A CIVector object whose attribute type is CIAttributeTypePosition and whose display name is Point 1. Default value: [0 0]

var point0: CIVector

point1

A CIVector object whose attribute type is CIAttributeTypePosition and whose display name is Point 2. Default value: [200 200]

var point1: CIVector

color0

A CIColor object whose attribute type is CIAttributeTypeColor and whose display name is Color 1.

var color0: CIColor?

color1

A CIColor object whose attribute type is CIAttributeTypeColor and whose display name is Color 2.

var color1: CIColor?