class Color

Defined at line 28 of file ../../src/graphics/display/lib/api-types/cpp/color.h

Equivalent to the FIDL type [`fuchsia.hardware.display.types/Color`].

Instances are guaranteed to represent color constants whose pixel formats are

supported by the display stack.

This is a value type. Instances can be stored in containers. Copying, moving

and destruction are trivial.

Public Methods

void Color (const Color & )

Defined at line 52 of file ../../src/graphics/display/lib/api-types/cpp/color.h

void Color (Color && )

Defined at line 53 of file ../../src/graphics/display/lib/api-types/cpp/color.h

Color & operator= (const Color & )

Defined at line 54 of file ../../src/graphics/display/lib/api-types/cpp/color.h

Color & operator= (Color && )

Defined at line 55 of file ../../src/graphics/display/lib/api-types/cpp/color.h

void ~Color ()

Defined at line 56 of file ../../src/graphics/display/lib/api-types/cpp/color.h

PixelFormat format ()

Guaranteed to meet the requirements in the FIDL documentation.

Defined at line 64 of file ../../src/graphics/display/lib/api-types/cpp/color.h

cpp20::span<const uint8_t> bytes ()

Guaranteed to meet the requirements in the FIDL documentation.

Defined at line 67 of file ../../src/graphics/display/lib/api-types/cpp/color.h

bool IsValid (const fuchsia_hardware_display_types::wire::Color & fidl_color)

True iff `fidl_color` is convertible to a valid Color.

Defined at line 101 of file ../../src/graphics/display/lib/api-types/cpp/color.h

Color From (const fuchsia_hardware_display_types::wire::Color & fidl_color)

`fidl_color` must be convertible to a valid Color.

This is not a constructor to allow designated initializer syntax. Making

this a constructor would introduce ambiguity when designated initializer

syntax is used, because `fuchsia.hardware.display.types/Color` has the same

field names as our supported designated initializer syntax.

Defined at line 137 of file ../../src/graphics/display/lib/api-types/cpp/color.h

void Color (const Color::ConstructorArgs & args)

Constructor that enables the designated initializer syntax with containers.

NOLINTNEXTLINE(google-explicit-constructor)

Defined at line 119 of file ../../src/graphics/display/lib/api-types/cpp/color.h

fuchsia_hardware_display_types::wire::Color ToFidl ()

Defined at line 151 of file ../../src/graphics/display/lib/api-types/cpp/color.h

bool SupportsFormat (PixelFormat format)

True iff `format` meets the requirements in the FIDL documentation.

Defined at line 96 of file ../../src/graphics/display/lib/api-types/cpp/color.h

Friends

bool Color (const Color & lhs, const Color & rhs)
bool Color (const Color & lhsconst Color & rhs)