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

Definition

The xtd::drawing::imaging::effects::drop_shadow_effect add a vertical and/or horizontal shadow to the image.

Namespace
xtd::drawing::imaging::effects
Library
xtd.drawing
Appearance
Original Converted
Examples
The following example code shows how tu use xtd::drawing::imaging::effects::drop_shadow_effect with image.
const auto img = image::from_file("ball.png");
result.save("ball_drop_shadow.png");
static const xtd::drawing::color black
Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant.
Definition color.hpp:80
void save(const xtd::string &filename) const
Saves this xtd::drawing::image to the specified file or stream.
static image from_file(const xtd::string &filename)
Creates an image from the specified file.
static xtd::drawing::image set_effect(const xtd::drawing::image &image, const xtd::drawing::imaging::effects::effect &effect)
Sets the specified effects to the specifid image.
drop_shadow_effect()=default
Initialise the new instance of xtd::drawing::imaging::drop_shadow_effect object.
Stores an ordered pair of integers, which specify a height and width.
Definition size.hpp:32
Examples
image_effects.cpp.

Public Properties

int32 blur
 Gets or sets the shadow blur radius.
 
xtd::drawing::color color
 Gets or sets the shadow color.
 
xtd::drawing::size shadow
 Gets or sets the horizontal and vertical shadow.
 

Public Constructors

 drop_shadow_effect ()=default
 Initialise the new instance of xtd::drawing::imaging::drop_shadow_effect object.
 
 drop_shadow_effect (const xtd::drawing::size &shadow)
 Initialise the new instance of xtd::drawing::imaging::drop_shadow_effect with horizontal and vertical shadow.
 
 drop_shadow_effect (const xtd::drawing::size &shadow, int32 blur)
 Initialise the new instance of xtd::drawing::imaging::drop_shadow_effect with horizontal and vertical shadow, and blur radius.
 
 drop_shadow_effect (const xtd::drawing::size &shadow, int32 blur, const xtd::drawing::color &color)
 Initialise the new instance of xtd::drawing::imaging::drop_shadow_effect with horizontal and vertical shadow, blur radius, and shadow color.
 

Protected Methods

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

Additional Inherited Members

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

◆ drop_shadow_effect() [1/4]

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

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

◆ drop_shadow_effect() [2/4]

xtd::drawing::imaging::effects::drop_shadow_effect::drop_shadow_effect ( const xtd::drawing::size & shadow)
explicit

Initialise the new instance of xtd::drawing::imaging::drop_shadow_effect with horizontal and vertical shadow.

Parameters
shadowThe horizontal and vertical shadow.

◆ drop_shadow_effect() [3/4]

xtd::drawing::imaging::effects::drop_shadow_effect::drop_shadow_effect ( const xtd::drawing::size & shadow,
int32 blur )

Initialise the new instance of xtd::drawing::imaging::drop_shadow_effect with horizontal and vertical shadow, and blur radius.

Parameters
shadowThe horizontal and vertical shadow.
blurThe shadow blur radius.

◆ drop_shadow_effect() [4/4]

xtd::drawing::imaging::effects::drop_shadow_effect::drop_shadow_effect ( const xtd::drawing::size & shadow,
int32 blur,
const xtd::drawing::color & color )

Initialise the new instance of xtd::drawing::imaging::drop_shadow_effect with horizontal and vertical shadow, blur radius, and shadow color.

Parameters
shadowThe horizontal and vertical shadow.
blurThe shadow blur radius.
colorThe shadow color.

Member Function Documentation

◆ apply()

void xtd::drawing::imaging::effects::drop_shadow_effect::apply ( xtd::drawing::image & image) const
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

◆ blur

int32 xtd::drawing::imaging::effects::drop_shadow_effect::blur

Gets or sets the shadow blur radius.

Parameters
blurThe shadow blur radius.

◆ color

xtd::drawing::color xtd::drawing::imaging::effects::drop_shadow_effect::color

Gets or sets the shadow color.

Parameters
colorThe shadow color.

◆ shadow

xtd::drawing::size xtd::drawing::imaging::effects::drop_shadow_effect::shadow

Gets or sets the horizontal and vertical shadow.

Parameters
sizeThe horizontal and vertical shadow.

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