Skia
2D Graphics Library
SkHighContrastFilter Struct Reference

Color filter that provides transformations to improve contrast for users with low vision. More...

#include <SkHighContrastFilter.h>

Static Public Member Functions

static sk_sp< SkColorFilterMake (const SkHighContrastConfig &config)
 

Detailed Description

Color filter that provides transformations to improve contrast for users with low vision.

Applies the following transformations in this order. Each of these can be configured using SkHighContrastConfig.

  • Conversion to grayscale
  • Color inversion (either in RGB or HSL space)
  • Increasing the resulting contrast.

Calling SkHighContrastFilter::Make will return nullptr if the config is not valid, e.g. if you try to call it with a contrast outside the range of -1.0 to 1.0.

Member Function Documentation

◆ Make()

static sk_sp<SkColorFilter> SkHighContrastFilter::Make ( const SkHighContrastConfig config)
static

The documentation for this struct was generated from the following file: