PROTOCOLS
ColorTransform
Defined in fuchsia.accessibility/color_transform.fidl
Allows a presentation owner to register a handler for color transforms. This API is implemented by the Accessibility manager and called by Root Presenter.
RegisterColorTransformHandler
Registers a handler for changes in the color transform configuration.
Request
Name | Type |
---|---|
handler |
ColorTransformHandler
|
ColorTransformHandler
Defined in fuchsia.accessibility/color_transform.fidl
Handler implemented by the owner of the presentation. Accessibility manager uses this protocol to make changes to the screen's color transform.
SetColorTransformConfiguration
Called when the color transform configuration has changed.
Request
Name | Type |
---|---|
configuration |
ColorTransformConfiguration
|
Response
Name | Type |
---|
MagnificationHandler
Defined in fuchsia.accessibility/magnifier.fidl
Exposes a privileged magnifier API for camera control, typically on a
fuchsia.ui.policy.Presentation
.
SetClipSpaceTransform
Sets clip-space x-offset, y-offset, and scale for the presentation. x and y are in Vulkan NDC and are applied after scaling, which occurs about the center of the presentation. The callback indicates when the update has been presented. The identity transform (0, 0, 1) is the natural state.
Request
Name | Type |
---|---|
x |
float32
|
y |
float32
|
scale |
float32
|
Response
Name | Type |
---|
Magnifier
Defined in fuchsia.accessibility/magnifier.fidl
RegisterHandler
Registers the camera control to be used for applying magnification. If a previous handler had been registered, that handler is dropped.
Request
Name | Type |
---|---|
handler |
MagnificationHandler
|
STRUCTS
ENUMS
ColorCorrectionMode
Type: uint32
Defined in fuchsia.accessibility/color_transform.fidl
Specifies color correction mode.
Name | Value | Description |
---|---|---|
DISABLED |
0 |
No color correction. |
CORRECT_PROTANOMALY |
1 |
Color correction for protanomaly (red-green -- reduced sensitivity to red light). |
CORRECT_DEUTERANOMALY |
2 |
Color correction for deuteranomaly (red-green -- reduced sensitivity to green light). |
CORRECT_TRITANOMALY |
3 |
Color correction for tritanomaly (blue-yellow -- reduced sensitivity to blue light). |
TABLES
ColorTransformConfiguration
Defined in fuchsia.accessibility/color_transform.fidl
The current configuration for accessibility color transforms, which includes color inversion and color correction. This always includes the matrix required to apply the appropriate transforms. Color correction and color inversion may be active simultaneously.
For original RGB value (r, g, b) (each component ranged between 0 and 1), the RGB value of corrected color (r', g', b') is (r', g', b') = color_adjustment_post_offset + color_adjustment_matrix . ((r, g, b) + color_adjustment_pre_offset).
Ordinal | Name | Type | Description |
---|---|---|---|
1 | color_inversion_enabled |
bool
|
When color_inversion_enabled is true, certain colors are inverted across the entire screen. If this field is omitted behavior should remain unchanged. |
2 | color_correction |
ColorCorrectionMode
|
When color_correction is set to DISABLED, colors are displayed normally. When color_correction has different value, colors are modified to correct for the specified type of color blindness. If this field is omitted behavior should remain unchanged. |
3 | color_adjustment_matrix |
float32[9]
|
3x3 Matrix in row-major form which will be used by root presenter to apply color correction and color inversion, or a combination fo the two. This field should always be set. |
4 | color_adjustment_pre_offset |
float32[3]
|
3x1 vector which is used by root presenter as an offset added to the original RGB color, before it multiplies with the |color_adjustment_matrix|. This field should always be set. |
5 | color_adjustment_post_offset |
float32[3]
|
3x1 vector which is used by root presenter as an offset added to the multiplied result of |color_adjustment_matrix| and original RGB color. This field should always be set. |