Table of Contents

Class Etc1BitmapContent

Namespace
Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly
MonoGame.Framework.Content.Pipeline.dll

Supports the processing of a texture compressed using ETC1.

public class Etc1BitmapContent : BitmapContent
Inheritance
Etc1BitmapContent
Inherited Members

Constructors

Etc1BitmapContent()

Initializes a new instance of Etc1BitmapContent.

protected Etc1BitmapContent()

Etc1BitmapContent(int, int)

Initializes a new instance of Etc1BitmapContent with the specified width or height.

public Etc1BitmapContent(int width, int height)

Parameters

width int

Width in pixels of the bitmap resource.

height int

Height in pixels of the bitmap resource.

Methods

GetPixelData()

Reads encoded bitmap content.

public override byte[] GetPixelData()

Returns

byte[]

Array containing encoded bitmap data.

SetPixelData(byte[])

Writes encoded bitmap content.

public override void SetPixelData(byte[] sourceData)

Parameters

sourceData byte[]

Array containing encoded bitmap data to be set.

ToString()

Returns a string description of the bitmap.

public override string ToString()

Returns

string

Description of the bitmap.

TryCopyFrom(BitmapContent, Rectangle, Rectangle)

Attempts to copy a region from a specified bitmap.

protected override bool TryCopyFrom(BitmapContent sourceBitmap, Rectangle sourceRegion, Rectangle destinationRegion)

Parameters

sourceBitmap BitmapContent

BitmapContent being copied.

sourceRegion Rectangle

Location of sourceBitmap.

destinationRegion Rectangle

Region of destination bitmap to be overwritten.

Returns

bool

true if region copy is supported; false otherwise.

TryCopyTo(BitmapContent, Rectangle, Rectangle)

Attempts to copy a region of the specified bitmap onto another.

protected override bool TryCopyTo(BitmapContent destinationBitmap, Rectangle sourceRegion, Rectangle destinationRegion)

Parameters

destinationBitmap BitmapContent

BitmapContent being overwritten.

sourceRegion Rectangle

Location of the source bitmap.

destinationRegion Rectangle

Region of destination bitmap to be overwritten.

Returns

bool

true if region copy is supported; false otherwise.

TryGetFormat(out SurfaceFormat)

Gets the corresponding GPU texture format for the specified bitmap type.

public override bool TryGetFormat(out SurfaceFormat format)

Parameters

format SurfaceFormat

Format being retrieved.

Returns

bool

The GPU texture format of the bitmap type.