bn::color_effect namespace

Color effects related functions.

Contents

Functions

void brightness(fixed brightness, span<color> colors_ref)
Increases the brightness of all referenced colors.
void brightness(const span<const color>& source_colors_ref, fixed brightness, span<color> destination_colors_ref)
Increases the brightness of all colors referenced by source_colors_ref, storing the result in destination_colors_ref.
void contrast(fixed contrast, span<color> colors_ref)
Increases the contrast of all referenced colors.
void contrast(const span<const color>& source_colors_ref, fixed contrast, span<color> destination_colors_ref)
Increases the contrast of all colors referenced by source_colors_ref, storing the result in destination_colors_ref.
void intensity(fixed intensity, span<color> colors_ref)
Increases the intensity of all referenced colors.
void intensity(const span<const color>& source_colors_ref, fixed intensity, span<color> destination_colors_ref)
Increases the intensity of all colors referenced by source_colors_ref, storing the result in destination_colors_ref.
void invert(span<color> colors_ref)
Inverts all referenced colors.
void invert(const span<const color>& source_colors_ref, span<color> destination_colors_ref)
Inverts all colors referenced by source_colors_ref, storing the result in destination_colors_ref.
void grayscale(fixed grayscale_intensity, span<color> colors_ref)
Applies a grayscale effect to all referenced colors.
void grayscale(const span<const color>& source_colors_ref, fixed grayscale_intensity, span<color> destination_colors_ref)
Applies a grayscale effect to all colors referenced by source_colors_ref, storing the result in destination_colors_ref.
void fade(color fade_color, fixed fade_intensity, span<color> colors_ref)
Applies a fade effect to all referenced colors.
void fade(const span<const color>& source_colors_ref, color fade_color, fixed fade_intensity, span<color> destination_colors_ref)
Applies a fade effect to all colors referenced by source_colors_ref, storing the result in destination_colors_ref.
void rotate(int rotate_count, span<color> colors_ref)
Rotates all referenced colors to the right.
void rotate(const span<const color>& source_colors_ref, int rotate_count, span<color> destination_colors_ref)
Rotates all colors referenced by source_colors_ref to the right, storing the result in destination_colors_ref.

Function documentation

void bn::color_effect::brightness(fixed brightness, span<color> colors_ref)

Increases the brightness of all referenced colors.

Parameters
brightness Brightness amount in the range [0..1].
colors_ref Colors reference.

void bn::color_effect::brightness(const span<const color>& source_colors_ref, fixed brightness, span<color> destination_colors_ref)

Increases the brightness of all colors referenced by source_colors_ref, storing the result in destination_colors_ref.

Parameters
source_colors_ref Source colors reference.
brightness Brightness amount in the range [0..1].
destination_colors_ref Destination colors reference.

void bn::color_effect::contrast(fixed contrast, span<color> colors_ref)

Increases the contrast of all referenced colors.

Parameters
contrast Contrast amount in the range [0..1].
colors_ref Colors reference.

void bn::color_effect::contrast(const span<const color>& source_colors_ref, fixed contrast, span<color> destination_colors_ref)

Increases the contrast of all colors referenced by source_colors_ref, storing the result in destination_colors_ref.

Parameters
source_colors_ref Source colors reference.
contrast Contrast amount in the range [0..1].
destination_colors_ref Destination colors reference.

void bn::color_effect::intensity(fixed intensity, span<color> colors_ref)

Increases the intensity of all referenced colors.

Parameters
intensity Intensity amount in the range [0..1].
colors_ref Colors reference.

void bn::color_effect::intensity(const span<const color>& source_colors_ref, fixed intensity, span<color> destination_colors_ref)

Increases the intensity of all colors referenced by source_colors_ref, storing the result in destination_colors_ref.

Parameters
source_colors_ref Source colors reference.
intensity Intensity amount in the range [0..1].
destination_colors_ref Destination colors reference.

void bn::color_effect::invert(span<color> colors_ref)

Inverts all referenced colors.

Parameters
colors_ref Colors reference.

void bn::color_effect::invert(const span<const color>& source_colors_ref, span<color> destination_colors_ref)

Inverts all colors referenced by source_colors_ref, storing the result in destination_colors_ref.

Parameters
source_colors_ref Source colors reference.
destination_colors_ref Destination colors reference.

void bn::color_effect::grayscale(fixed grayscale_intensity, span<color> colors_ref)

Applies a grayscale effect to all referenced colors.

Parameters
grayscale_intensity Grayscale effect intensity in the range [0..1].
colors_ref Colors reference.

void bn::color_effect::grayscale(const span<const color>& source_colors_ref, fixed grayscale_intensity, span<color> destination_colors_ref)

Applies a grayscale effect to all colors referenced by source_colors_ref, storing the result in destination_colors_ref.

Parameters
source_colors_ref Source colors reference.
grayscale_intensity Grayscale effect intensity in the range [0..1].
destination_colors_ref Destination colors reference.

void bn::color_effect::fade(color fade_color, fixed fade_intensity, span<color> colors_ref)

Applies a fade effect to all referenced colors.

Parameters
fade_color Fade effect color.
fade_intensity Fade effect intensity in the range [0..1].
colors_ref Colors reference.

void bn::color_effect::fade(const span<const color>& source_colors_ref, color fade_color, fixed fade_intensity, span<color> destination_colors_ref)

Applies a fade effect to all colors referenced by source_colors_ref, storing the result in destination_colors_ref.

Parameters
source_colors_ref Source colors reference.
fade_color Fade effect color.
fade_intensity Fade effect intensity in the range [0..1].
destination_colors_ref Destination colors reference.

void bn::color_effect::rotate(int rotate_count, span<color> colors_ref)

Rotates all referenced colors to the right.

Parameters
rotate_count Number of colors to rotate to the right in the range [1 - colors_count .. colors_count - 1].
colors_ref Colors reference.

void bn::color_effect::rotate(const span<const color>& source_colors_ref, int rotate_count, span<color> destination_colors_ref)

Rotates all colors referenced by source_colors_ref to the right, storing the result in destination_colors_ref.

Parameters
source_colors_ref Source colors reference.
rotate_count Number of colors to rotate to the right in the range [1 - colors_count .. colors_count - 1].
destination_colors_ref Destination colors reference.

If the source and destination tiles, colors or map cells overlap, the behavior is undefined.