Class TextureBrush
Descriptor object for the properties of a specific Texture use in a fluent interface drawable object The fluent drawing interface currently only supports texture references (not raw unsigned integer ids). Wrap ids if required
Inheritance
System.Object
TextureBrush
Namespace: Yak2D
Assembly: Yak2D.Api.dll
Syntax
public class TextureBrush : object
Constructors
TextureBrush()
Descriptor for Texturing Brush
Declaration
public TextureBrush()
TextureBrush(ITexture, TextureCoordinateMode, TextureScaling, Vector2)
Descriptor for Texturing Brush
Declaration
public TextureBrush(ITexture texture, TextureCoordinateMode textureMode, TextureScaling textureScaling, Vector2 tilingScale)
Parameters
| Type | Name | Description |
|---|---|---|
| ITexture | texture | Texture Reference |
| TextureCoordinateMode | textureMode | Wrap Texture Coordinates - Mirror or Repeat |
| TextureScaling | textureScaling | Is the Texture tiled or stretched across the shape |
| Vector2 | tilingScale | When tiling, ratio between shape pixel and texture pixel sizes |
Properties
Texture
The Texture reference
Declaration
public ITexture Texture { get; set; }
Property Value
| Type | Description |
|---|---|
| ITexture |
TextureMode
Texture Coordinate Wrap Behaviour Yak2D does not support border pixel or solid colour texture coordinate wrap
Declaration
public TextureCoordinateMode TextureMode { get; set; }
Property Value
| Type | Description |
|---|---|
| TextureCoordinateMode |
TextureScaling
Is the Texture tiled or stretched across the shape
Declaration
public TextureScaling TextureScaling { get; set; }
Property Value
| Type | Description |
|---|---|
| TextureScaling |
TilingScale
If a texture is tiled, what is the ratio between a shape 'pixel' and a texture 'pixel' over distance
Declaration
public Vector2 TilingScale { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |