Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
SkHighContrastConfig Struct Reference

#include <SkHighContrastFilter.h>

Public Types

enum class  InvertStyle { kNoInvert , kInvertBrightness , kInvertLightness , kLast = kInvertLightness }
 

Public Member Functions

 SkHighContrastConfig ()
 
 SkHighContrastConfig (bool grayscale, InvertStyle invertStyle, SkScalar contrast)
 
bool isValid () const
 

Public Attributes

bool fGrayscale
 
InvertStyle fInvertStyle
 
SkScalar fContrast
 

Detailed Description

Configuration struct for SkHighContrastFilter.

Provides transformations to improve contrast for users with low vision.

Definition at line 22 of file SkHighContrastFilter.h.

Member Enumeration Documentation

◆ InvertStyle

Enumerator
kNoInvert 
kInvertBrightness 
kInvertLightness 
kLast 

Definition at line 23 of file SkHighContrastFilter.h.

Constructor & Destructor Documentation

◆ SkHighContrastConfig() [1/2]

SkHighContrastConfig::SkHighContrastConfig ( )
inline

Definition at line 31 of file SkHighContrastFilter.h.

31 {
32 fGrayscale = false;
33 fInvertStyle = InvertStyle::kNoInvert;
34 fContrast = 0.0f;
35 }

◆ SkHighContrastConfig() [2/2]

SkHighContrastConfig::SkHighContrastConfig ( bool  grayscale,
InvertStyle  invertStyle,
SkScalar  contrast 
)
inline

Definition at line 37 of file SkHighContrastFilter.h.

40 : fGrayscale(grayscale),
41 fInvertStyle(invertStyle),
42 fContrast(contrast) {}

Member Function Documentation

◆ isValid()

bool SkHighContrastConfig::isValid ( ) const
inline

Definition at line 45 of file SkHighContrastFilter.h.

45 {
46 return fInvertStyle >= InvertStyle::kNoInvert &&
47 fInvertStyle <= InvertStyle::kInvertLightness &&
48 fContrast >= -1.0 &&
49 fContrast <= 1.0;
50 }

Member Data Documentation

◆ fContrast

SkScalar SkHighContrastConfig::fContrast

Definition at line 60 of file SkHighContrastFilter.h.

◆ fGrayscale

bool SkHighContrastConfig::fGrayscale

Definition at line 53 of file SkHighContrastFilter.h.

◆ fInvertStyle

InvertStyle SkHighContrastConfig::fInvertStyle

Definition at line 56 of file SkHighContrastFilter.h.


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