xtd 0.2.0
xtd::drawing::imaging::image_effector Class Reference
Inheritance diagram for xtd::drawing::imaging::image_effector:
xtd::static_object

Definition

The xtd::drawing::imaging::image_effector allows effects defined in the xtd::drawing::imaging::effects namespace to be applied to both xtd::drawing::image and xtd::drawing::graphics via overloaded xtd::drawing::imaging::image_effector::set_effect methods. This class cannot be inherited.

Namespace
xtd::drawing::imaging
Library
xtd.drawing
Examples
The following code shows how to use xtd::drawing::imaging::image_effector, and all effect inherited from xtd::drawing::imaging::effects::effect. image_converter

Public Static Methods

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.
 
static xtd::drawing::image set_effect (const xtd::drawing::image &image, int32 x, int32 y, int32 width, int32 height, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static xtd::drawing::image set_effect (const xtd::drawing::image &image, float x, float y, float width, float height, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static xtd::drawing::image set_effect (const xtd::drawing::image &image, const xtd::drawing::rectangle &rectangle, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static xtd::drawing::image set_effect (const xtd::drawing::image &image, const xtd::drawing::rectangle_f &rectangle, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static xtd::drawing::image set_effect (const xtd::drawing::image &image, const xtd::drawing::region &region, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static void set_effect (xtd::drawing::image &image, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image.
 
static void set_effect (xtd::drawing::image &image, int32 x, int32 y, int32 width, int32 height, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static void set_effect (xtd::drawing::image &image, float x, float y, float width, float height, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static void set_effect (xtd::drawing::image &image, const xtd::drawing::rectangle &rectangle, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static void set_effect (xtd::drawing::image &image, const xtd::drawing::rectangle_f &rectangle, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static void set_effect (xtd::drawing::image &image, const xtd::drawing::region &region, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid image with rectangle.
 
static void set_effect (xtd::drawing::graphics &graphics, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid graphics.
 
static void set_effect (xtd::drawing::graphics &graphics, int32 x, int32 y, int32 width, int32 height, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid graphics with rectangle.
 
static void set_effect (xtd::drawing::graphics &graphics, float x, float y, float width, float height, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid graphics with rectangle.
 
static void set_effect (xtd::drawing::graphics &graphics, const xtd::drawing::rectangle &rectangle, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid graphics with rectangle.
 
static void set_effect (xtd::drawing::graphics &graphics, const xtd::drawing::rectangle_f &rectangle, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid graphics with rectangle.
 
static void set_effect (xtd::drawing::graphics &graphics, const xtd::drawing::region &region, const xtd::drawing::imaging::effects::effect &effect)
 Sets the specified effects to the specifid graphics with rectangle.
 

Member Function Documentation

◆ set_effect() [1/18]

static xtd::drawing::image xtd::drawing::imaging::image_effector::set_effect ( const xtd::drawing::image & image,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
effectThe effect to apply.
Returns
The resulting image.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, and effect.
const auto img = image::from_file("ball.png");
auto result = image_effector::set_effect(img, blur_effect {10});
result.save("ball_blur.png");
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.

◆ set_effect() [2/18]

static xtd::drawing::image xtd::drawing::imaging::image_effector::set_effect ( const xtd::drawing::image & image,
int32 x,
int32 y,
int32 width,
int32 height,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
xThe x-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
yThe y-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
widthWidth of the bounding rectangle to with apply effect.
heightHeight of the bounding rectangle to with apply effect.
effectThe effect to apply.
Returns
The resulting image.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, x, y width, height, and effect.
const auto img = image::from_file("ball.png");
auto result = image_effector::set_effect(img, 50, 50, 200, 200, blur_effect {10});
result.save("ball_blur.png");

◆ set_effect() [3/18]

static xtd::drawing::image xtd::drawing::imaging::image_effector::set_effect ( const xtd::drawing::image & image,
float x,
float y,
float width,
float height,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
xThe x-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
yThe y-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
widthWidth of the bounding rectangle to with apply effect.
heightHeight of the bounding rectangle to with apply effect.
effectThe effect to apply.
Returns
The resulting image.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, x, y width, height, and effect.
const auto img = image::from_file("ball.png");
auto result = image_effector::set_effect(img, 50.0f, 50.0f, 200.0f, 200.0f, blur_effect {10});
result.save("ball_blur.png");

◆ set_effect() [4/18]

static xtd::drawing::image xtd::drawing::imaging::image_effector::set_effect ( const xtd::drawing::image & image,
const xtd::drawing::rectangle & rectangle,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
rectangleThe xtd::drawing::rectangle to with apply effect.
effectThe effect to apply.
Returns
The resulting image.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, rectangle, and effect.
const auto img = image::from_file("ball.png");
const auto rect = rectangle {50, 50, 200, 200};
auto result = image_effector::set_effect(img, rect, blur_effect {10});
result.save("ball_blur.png");
Stores a set of four integers that represent the location and size of a rectangle.
Definition rectangle.hpp:44

◆ set_effect() [5/18]

static xtd::drawing::image xtd::drawing::imaging::image_effector::set_effect ( const xtd::drawing::image & image,
const xtd::drawing::rectangle_f & rectangle,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
rectangleThe xtd::drawing::rectangle to with apply effect.
effectThe effect to apply.
Returns
The resulting image.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, rectangle, and effect.
const auto img = image::from_file("ball.png");
const auto rect = rectangle_f {50.0f, 50.0f, 200.0f, 200.0f};
auto result = image_effector::set_effect(img, rect, blur_effect {10});
result.save("ball_blur.png");
Stores a set of four floating-point numbers that represent the location and size of a rectangle....
Definition rectangle_f.hpp:34

◆ set_effect() [6/18]

static xtd::drawing::image xtd::drawing::imaging::image_effector::set_effect ( const xtd::drawing::image & image,
const xtd::drawing::region & region,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
regionThe xtd::drawing::region to with apply effect.
effectThe effect to apply.
Returns
The resulting image.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, region, and effect.
const auto img = image::from_file("ball.png");
auto path = graphics_path {};
path.add_ellipse(rectangle {130, 23, 150, 150});
auto result = image_effector::set_effect(img, reg, blur_effect {10});
result.save("ball_blur.png");
Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inh...
Definition region.hpp:32
@ path
The xtd::uri::local_path data.
Definition uri_components.hpp:27

◆ set_effect() [7/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::image & image,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, and effect.
auto img = image::from_file("ball.png");
image_effector::set_effect(img, blur_effect {10});
image.save("ball_blur.png");
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.hpp:49

◆ set_effect() [8/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::image & image,
int32 x,
int32 y,
int32 width,
int32 height,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
xThe x-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
yThe y-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
widthWidth of the bounding rectangle to with apply effect.
heightHeight of the bounding rectangle to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, x, y, width, height, and effect.
auto img = image::from_file("ball.png");
image_effector::set_effect(img, 50, 50, 200, 200, blur_effect {10});
image.save("ball_blur.png");

◆ set_effect() [9/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::image & image,
float x,
float y,
float width,
float height,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
xThe x-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
yThe y-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
widthWidth of the bounding rectangle to with apply effect.
heightHeight of the bounding rectangle to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, x, y, width, height, and effect.
auto img = image::from_file("ball.png");
image_effector::set_effect(img, 50.0f, 50.0f, 200.0f, 200.0f, blur_effect {10});
image.save("ball_blur.png");

◆ set_effect() [10/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::image & image,
const xtd::drawing::rectangle & rectangle,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
rectangleThe xtd::drawing::rectangle to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, rectangle, and effect.
auto img = image::from_file("ball.png");
const auto rect = rectangle {50, 50, 200, 200};
image_effector::set_effect(img, rect, blur_effect {10});
image.save("ball_blur.png");

◆ set_effect() [11/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::image & image,
const xtd::drawing::rectangle_f & rectangle,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
rectangleThe xtd::drawing::rectangle to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, rectangle, and effect.
auto img = image::from_file("ball.png");
const auto rect = rectangle_f {50.0f, 50.0f, 200.0f, 200.0f};
image_effector::set_effect(img, rect, blur_effect {10});
image.save("ball_blur.png");

◆ set_effect() [12/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::image & image,
const xtd::drawing::region & region,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid image with rectangle.

Parameters
imageThe xtd::drawing::image to which to apply the effect.
regionThe xtd::drawing::region to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with image, region, and effect.
auto img = image::from_file("ball.png");
auto path = graphics_path {};
path.add_ellipse(rectangle {130, 23, 150, 150});
image_effector::set_effect(img, reg, blur_effect {10});
image.save("ball_blur.png");

◆ set_effect() [13/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::graphics & graphics,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid graphics.

Parameters
imageThe xtd::drawing::graphics to which to apply the effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with graphics, and effect.
void owner_control::set_blur_effect(graphics& g) {
image_effector::set_effect(g, blur_effect {10});
}
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition graphics.hpp:67
@ g
The G key.
Definition console_key.hpp:100

◆ set_effect() [14/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::graphics & graphics,
int32 x,
int32 y,
int32 width,
int32 height,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid graphics with rectangle.

Parameters
imageThe xtd::drawing::graphics to which to apply the effect.
xThe x-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
yThe y-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
widthWidth of the bounding rectangle to with apply effect.
heightHeight of the bounding rectangle to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with graphics, rectangle, and effect.
void owner_control::on_paint(xtd::forms::paint_event_args& e) override {
// ...
image_effector::set_effect(e.graphics(), 50, 50, 200, 200, blur_effect {10});
}
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.hpp:30
@ e
The E key.
Definition console_key.hpp:96

◆ set_effect() [15/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::graphics & graphics,
float x,
float y,
float width,
float height,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid graphics with rectangle.

Parameters
imageThe xtd::drawing::graphics to which to apply the effect.
xThe x-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
yThe y-coordinate of the upper-left corner of the bounding rectangle to with apply effect.
widthWidth of the bounding rectangle to with apply effect.
heightHeight of the bounding rectangle to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with graphics, rectangle, and effect.
void owner_control::on_paint(xtd::forms::paint_event_args& e) override {
// ...
image_effector::set_effect(e.graphics(), 50.0f, 50.0f, 200.0f, 200.0f, blur_effect {10});
}

◆ set_effect() [16/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::graphics & graphics,
const xtd::drawing::rectangle & rectangle,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid graphics with rectangle.

Parameters
imageThe xtd::drawing::graphics to which to apply the effect.
rectangleThe xtd::drawing::rectangle to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with graphics, rectangle, and effect.
void owner_control::on_paint(xtd::forms::paint_event_args& e) override {
// ...
image_effector::set_effect(e.graphics(), e.clip_rectangle(), blur_effect {10});
}

◆ set_effect() [17/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::graphics & graphics,
const xtd::drawing::rectangle_f & rectangle,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid graphics with rectangle.

Parameters
imageThe xtd::drawing::graphics to which to apply the effect.
rectangleThe xtd::drawing::rectangle to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with graphics, rectangle, and effect.
void owner_control::on_paint(xtd::forms::paint_event_args& e) override {
// ...
const auto rect = rectangle_f {50.0f, 50.0f, 200.0f, 200.0f};
image_effector::set_effect(e.graphics(), rect, blur_effect {10});
}

◆ set_effect() [18/18]

static void xtd::drawing::imaging::image_effector::set_effect ( xtd::drawing::graphics & graphics,
const xtd::drawing::region & region,
const xtd::drawing::imaging::effects::effect & effect )
static

Sets the specified effects to the specifid graphics with rectangle.

Parameters
imageThe xtd::drawing::graphics to which to apply the effect.
regionThe xtd::drawing::rectangle to with apply effect.
effectThe effect to apply.
Examples
The following example code shows how tu use xtd::drawing::imaging::image_effector::set_effect with graphics, region, and effect.
void owner_control::on_paint(xtd::forms::paint_event_args& e) override {
// ...
auto path = graphics_path {};
path.add_ellipse(rectangle {130, 23, 150, 150});
auto reg = region(drawing::region(path));
image_effector::set_effect(e.graphics(), reg, blur_effect {10});
}

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