xtd 1.0.0
Loading...
Searching...
No Matches
xtd::drawing::imaging::effects::disabled_effect Struct Reference
Inheritance diagram for xtd::drawing::imaging::effects::disabled_effect:
xtd::drawing::imaging::effects::effect xtd::abstract_object xtd::object

Definition

The xtd::drawing::imaging::effects::disabled_effect disables the image with brightness or background color.

Namespace
xtd::drawing::imaging::effects
Library
xtd.drawing
Appearance
Original Converted
Examples
The following example code shows how tu use xtd::drawing::imaging::effects::disabled_effect with image.
const auto img = image::from_file("ball.png");
result.save("ball_disable.png");
static auto from_file(const xtd::string &filename) -> image
Creates an image from the specified file.
static auto set_effect(const xtd::drawing::image &image, const xtd::drawing::imaging::effects::effect &effect) -> xtd::drawing::image
Sets the specified effects to the specifid image.
auto back_color(const xtd::drawing::color &value) -> void
Sets the background color.
disabled_effect()=default
Initialise the new instance of xtd::drawing::imaging::disabled_effect object.
Examples
image_effects.cpp.

Public Properties

float brightness
 Gets or sets the brightness.
auto back_color (const xtd::drawing::color &value) -> void
 Sets the background color.

Public Constructors

 disabled_effect ()=default
 Initialise the new instance of xtd::drawing::imaging::disabled_effect object.
 disabled_effect (const xtd::drawing::color &back_color)
 Initialise the new instance of xtd::drawing::imaging::disabled_effect object with specified background color.
 disabled_effect (float brightness)
 Initialise the new instance of xtd::drawing::imaging::disabled_effect object with specified brightness.

Protected Methods

auto apply (xtd::drawing::image &image) const -> void override
 Apply the effect.

Additional Inherited Members

 object ()=default
 Create a new instance of the ultimate base class object.
virtual auto equals (const object &obj) const noexcept -> bool
 Determines whether the specified object is equal to the current object.
virtual auto get_hash_code () const noexcept -> xtd::usize
 Serves as a hash function for a particular type.
virtual auto get_type () const noexcept -> type_object
 Gets the type of the current instance.
template<typename object_t>
auto memberwise_clone () const -> xtd::unique_ptr_object< object_t >
 Creates a shallow copy of the current object.
virtual auto to_string () const -> xtd::string
 Returns a xtd::string that represents the current object.
template<typename object_a_t, typename object_b_t>
static auto equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are considered equal.
template<typename object_a_t, typename object_b_t>
static auto reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool
 Determines whether the specified object instances are the same instance.
 abstract_object ()=default
 Initializes a new instance of the xtd::abstract_object class.

Constructor & Destructor Documentation

◆ disabled_effect() [1/3]

xtd::drawing::imaging::effects::disabled_effect::disabled_effect ( )
default

Initialise the new instance of xtd::drawing::imaging::disabled_effect object.

◆ disabled_effect() [2/3]

xtd::drawing::imaging::effects::disabled_effect::disabled_effect ( const xtd::drawing::color & back_color)
explicit

Initialise the new instance of xtd::drawing::imaging::disabled_effect object with specified background color.

Parameters
back_colorThe background color.

◆ disabled_effect() [3/3]

xtd::drawing::imaging::effects::disabled_effect::disabled_effect ( float brightness)
explicit

Initialise the new instance of xtd::drawing::imaging::disabled_effect object with specified brightness.

Parameters
brightnessThe brightness.

Member Function Documentation

◆ back_color()

auto xtd::drawing::imaging::effects::disabled_effect::back_color ( const xtd::drawing::color & value) -> void

Sets the background color.

Parameters
valueThe background color.

◆ apply()

auto xtd::drawing::imaging::effects::disabled_effect::apply ( xtd::drawing::image & image) const -> void
overrideprotectedvirtual

Apply the effect.

Parameters
graphicsThe graphics to apply effect.
imageThe image where the effect is applied.

Implements xtd::drawing::imaging::effects::effect.

Member Data Documentation

◆ brightness

float xtd::drawing::imaging::effects::disabled_effect::brightness

Gets or sets the brightness.

Parameters
brightnessThe brightness.

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