1.4 <GdkCicpParams>

Class: <GdkCicpParams>

It derives from <GObject>.

Contains the parameters that define a colorstate with cicp parameters.

Cicp parameters are specified in the ITU-T H.273 specification.

See the documentation of individual properties for supported values.

The ’unspecified’ value (2) is not treated in any special way, and must be replaced by a different value before creating a color state.

<GdkCicpParams> can be used as a builder object to construct a color state from Cicp data with cicp-params:build-color-state. The function will return an error if the given parameters are not supported.

You can obtain a <GdkCicpParams> object from a color state with color-state:create-cicp-params. This can be used to create a variant of a color state, by changing just one of the cicp parameters, or just to obtain information about the color state.

Properties

Property: cicp-params:color-primaries self

The color primaries to use.

Supported values:

  • 1: BT.709 / sRGB
  • 2: unspecified
  • 5: PAL
  • 6,7: BT.601 / NTSC
  • 9: BT.2020
  • 12: Display P3

Its value is an unsigned 32-bit integer.

Set it with (set! (cicp-params:color-primaries self) value).

Property: cicp-params:matrix-coefficients self

The matrix coefficients (for YUV to RGB conversion).

Supported values:

  • 0: RGB
  • 1: BT.709
  • 2: unspecified
  • 5,6: BT.601
  • 9: BT.2020

Its value is an unsigned 32-bit integer.

Set it with (set! (cicp-params:matrix-coefficients self) value).

Property: cicp-params:range self

Whether the data is using the full range of values.

The range of the data.

Its value is a <GdkCicpRange> (or, to set it, one of its symbols).

Set it with (set! (cicp-params:range self) value).

Property: cicp-params:transfer-function self

The transfer function to use.

Supported values:

  • 1,6,14,15: BT.709, BT.601, BT.2020
  • 2: unspecified
  • 4: gamma 2.2
  • 5: gamma 2.8
  • 8: linear
  • 13: sRGB
  • 16: BT.2100 PQ
  • 18: BT.2100 HLG

Its value is an unsigned 32-bit integer.

Set it with (set! (cicp-params:transfer-function self) value).

Procedures

Method: cicp-params:build-color-state self ⇒ %return
Method: build-color-state self ⇒ %return

Creates a new <GdkColorState> object for the cicp parameters in self.

Note that this may fail if the cicp parameters in self are not supported by GTK. In that case, NULL is returned, and error is set with an error message that can be presented to the user.

self

Passed: a <GdkCicpParams>.

a <GdkCicpParams>

%return

Returned: a <GdkColorState>.

A newly allocated <GdkColorState>

Method: cicp-params:get-color-primaries self ⇒ %return
Method: get-color-primaries self ⇒ %return

Returns the value of the color-primaries property of self.

self

Passed: a <GdkCicpParams>.

a <GdkCicpParams>

%return

Returned: an unsigned 32-bit integer.

the color-primaries value

Method: cicp-params:get-matrix-coefficients self ⇒ %return
Method: get-matrix-coefficients self ⇒ %return

Gets the matrix-coefficients property of self.

self

Passed: a <GdkCicpParams>.

a <GdkCicpParams>

%return

Returned: an unsigned 32-bit integer.

the matrix-coefficients value

Method: cicp-params:get-range self ⇒ %return
Method: get-range self ⇒ %return

Gets the range property of self.

self

Passed: a <GdkCicpParams>.

a <GdkCicpParams>

%return

Returned: a <GdkCicpRange>.

the range value

Method: cicp-params:get-transfer-function self ⇒ %return
Method: get-transfer-function self ⇒ %return

Gets the transfer-function property of self.

self

Passed: a <GdkCicpParams>.

a <GdkCicpParams>

%return

Returned: an unsigned 32-bit integer.

the transfer-function value

Procedure: cicp-params:new ⇒ %return

Creates a new <GdkCicpParams> object.

The initial values of the properties are the values for "undefined" and need to be set before a color state object can be built.

%return

Returned: a <GdkCicpParams>.

a new <GdkCicpParams>

Method: cicp-params:set-color-primaries self color-primaries
Method: set-color-primaries self color-primaries

Sets the color-primaries property of self.

self

Passed: a <GdkCicpParams>.

a <GdkCicpParams>

color-primaries

Passed: an unsigned 32-bit integer.

the new color primaries value

Method: cicp-params:set-matrix-coefficients self matrix-coefficients
Method: set-matrix-coefficients self matrix-coefficients

self a <GdkCicpParams> Sets the matrix-coefficients property of self.

self

Passed: a <GdkCicpParams>.

matrix-coefficients

Passed: an unsigned 32-bit integer.

the new matrix-coefficients value

Method: cicp-params:set-range self range
Method: set-range self range

Sets the range property of self

self

Passed: a <GdkCicpParams>.

a GdkCipParams

range

Passed: a <GdkCicpRange>, or one of its symbols.

the range value

Method: cicp-params:set-transfer-function self transfer-function
Method: set-transfer-function self transfer-function

Sets the transfer-function property of self.

self

Passed: a <GdkCicpParams>.

a <GdkCicpParams>

transfer-function

Passed: an unsigned 32-bit integer.

the new transfer-function value