Type Method 型メソッド

brightness(_:)

Returns a filter that applies a brightness adjustment.

Declaration 宣言

static func brightness(_ amount: Double) -> GraphicsContext.Filter

Return Value 戻り値

A filter that applies a brightness adjustment.

Parameters パラメータ

amount

An amount to add to the pixel’s color components.

Discussion 議論

This filter is different than brightness filter primitive defined by the Scalable Vector Graphics (SVG) specification. You can obtain an effect like that filter using a grayscale(_:) color multiply. However, this filter does match the CIColorControls filter’s brightness adjustment.

See Also 参照

Changing Brightness and Contrast