Table of Contents

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

textureRegion TextureRegion

The texture region to use.

color Color

The color tint to apply.

Exceptions

ArgumentNullException

textureRegion is 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

TextureRegion

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

context RenderContext

The render context to draw to.

dest Rectangle

The destination rectangle where the region will be drawn.

color Color

The color to blend with the region's color.