IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
Painter.cs
Go to the documentation of this file.
2
4
32public class Painter
33{
34 private readonly Image _image;
35
43 public Painter(Image image)
44 {
45 _image = image;
46 }
47
53 public Color Color { get; set; } = new(ColorConstant.Red);
54
60 public Opacity Opacity { get; set; } = new(100);
61
82 public void Draw(IDrawable drawable)
83 {
84 var drawingOptions = new DrawingOptions(Color, Opacity);
85 drawable.Draw(_image, drawingOptions);
86 }
87}
Class holding color codes.
Definition Color.cs:9
Represents the drawing options used by the Painter for rendering.
Holds an opacity value representing the transparency level of an object or pixel.
Definition Opacity.cs:16
Provides functionality for painting drawable objects on images.
Definition Painter.cs:33
Painter(Image image)
Constructs a Painter with the target image.
Definition Painter.cs:43
void Draw(IDrawable drawable)
Draws the specified drawable object onto the image.
Definition Painter.cs:82
Constructs an Image from an IImageView Instance.
Definition Image.cs:18
ColorConstant
Enum class for color constants.
Base class for all drawables.
Definition IDrawable.cs:11
void Draw(Image image, DrawingOptions drawingOptions)
Base class draw function.