Show / Hide Table of Contents

Class Texture

Drawable texture

Inheritance
Object
Material
Texture
ScreenSource
RenderTarget
Inherited Members
Material.materialElement
Material.MaterialElement
Material.MaterialSize
Material.VolumeSize
Material.Destroy()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Slipe.Client.Dx
Assembly: SlipeClient.dll
Syntax
public class Texture : Material

Constructors

| Improve this Doc View Source

Texture()

Declaration
protected Texture()
| Improve this Doc View Source

Texture(Vector2, TextureFormat, TextureEdge, TextureType, Int32)

Create an empty texture

Declaration
public Texture(Vector2 dimensions, TextureFormat textureFormat = TextureFormat.Argb, TextureEdge textureEdge = TextureEdge.Wrap, TextureType textureType = TextureType.TwoDimensional, int depth = 1)
Parameters
Type Name Description
Vector2 dimensions
TextureFormat textureFormat
TextureEdge textureEdge
TextureType textureType
Int32 depth
| Improve this Doc View Source

Texture(String, TextureFormat, Boolean, TextureEdge)

Create a texture element from a file or raw image string

Declaration
public Texture(string filePathOrPixels, TextureFormat textureFormat = TextureFormat.Argb, bool mipmaps = true, TextureEdge textureEdge = TextureEdge.Wrap)
Parameters
Type Name Description
String filePathOrPixels
TextureFormat textureFormat
Boolean mipmaps
TextureEdge textureEdge

Methods

| Improve this Doc View Source

GetPixels(Int32)

Get all pixels of this texture

Declaration
public TexturePixels GetPixels(int surfaceIndex = 0)
Parameters
Type Name Description
Int32 surfaceIndex
Returns
Type Description
TexturePixels
| Improve this Doc View Source

GetPixels(Vector2, Vector2, Int32)

Get the pixels of a section of this texture

Declaration
public TexturePixels GetPixels(Vector2 topLeft, Vector2 dimensions, int surfaceIndex = 0)
Parameters
Type Name Description
Vector2 topLeft
Vector2 dimensions
Int32 surfaceIndex
Returns
Type Description
TexturePixels
| Improve this Doc View Source

SetEdge(TextureEdge)

Change edge handling with white border if border is selected

Declaration
public bool SetEdge(TextureEdge edge)
Parameters
Type Name Description
TextureEdge edge
Returns
Type Description
Boolean
| Improve this Doc View Source

SetEdge(TextureEdge, Color)

This functions allows you to change the edge handling after creating the texture.

Declaration
public bool SetEdge(TextureEdge edge, Color borderColor)
Parameters
Type Name Description
TextureEdge edge
Color borderColor
Returns
Type Description
Boolean
| Improve this Doc View Source

SetPixels(TexturePixels, Vector2, Vector2, Int32)

This function sets the pixels of a texture element. It can be used with a standard texture, render target or screen source.

Declaration
public bool SetPixels(TexturePixels pixels, Vector2 topLeft, Vector2 dimensions, int surfaceIndex = 0)
Parameters
Type Name Description
TexturePixels pixels
Vector2 topLeft
Vector2 dimensions
Int32 surfaceIndex
Returns
Type Description
Boolean
  • Improve this Doc
  • View Source
Back to top Generated by DocFX