Class ColoredRegion
- Namespace
- Myra.Graphics2D.TextureAtlases
- Assembly
- Myra.dll
Represents a texture region with an applied color tint.
public class ColoredRegion : IImage, IBrush
- Inheritance
-
ColoredRegion
- Implements
- Inherited Members
- Extension Methods
Constructors
ColoredRegion(TextureRegion, Color)
Initializes a new instance of the ColoredRegion class with the specified texture region and color.
public ColoredRegion(TextureRegion textureRegion, Color color)
Parameters
textureRegionTextureRegionThe texture region to use.
colorColorThe color tint to apply.
Exceptions
- ArgumentNullException
textureRegionis null.
Properties
Color
Gets or sets the color tint applied to the texture region.
public Color Color { get; set; }
Property Value
- Color
Size
Gets the size of the colored region.
public Point Size { get; }
Property Value
- Point
TextureRegion
Gets or sets the texture region.
public TextureRegion TextureRegion { get; set; }
Property Value
Methods
Draw(RenderContext, Rectangle, Color)
Draws the colored region to the specified render context at the given destination.
public void Draw(RenderContext context, Rectangle dest, Color color)
Parameters
contextRenderContextThe render context to draw to.
destRectangleThe destination rectangle where the region will be drawn.
colorColorThe color to blend with the region's color.