C# 클래스 GBA.Bitmap

The GBA.Bitmap stores image data in 1bpp indexed format, with 16-bit colors in its palette
상속: IDisplayable
파일 보기 프로젝트 열기: LexouDuck/Emblem-Magic 1 사용 예제들

공개 메소드들

메소드 설명
Bitmap ( Bitmap source, Rectangle region = newRectangle() ) : EmblemMagic.Components

Copies an existing GBA.Bitmap or makes one from a subregion of an existing bitmap

Bitmap ( IDisplayable pixels ) : EmblemMagic.Components

Creates a GBA.Bitmap from the given IDisplayable object

Bitmap ( int width, int height ) : EmblemMagic.Components

Creates an empty GBA.Bitmap of the given dimensions.

Bitmap ( int width, int height, Array palette, Array data ) : EmblemMagic.Components

Makes a bitmap from the given byte array (must in 1 byte per pixel format)

Bitmap ( string filepath, GBA.Palette palette = null ) : EmblemMagic.Components

Makes a GBA.Bitmap from the image at the given filepath (and using the given Palette if not null)

GetColor ( int x, int y ) : GBA.Color
GetPixels ( Rectangle region ) : ].Color[

Returns an array of pixels from the requested region of the Bitmap

IsEmpty ( ) : bool

Tells if this is an empty Bitmap or not.

Load ( int width, int height ) : void

Initializes the basic fields of this instance.

SetColor ( int x, int y, GBA.Color value ) : void
SetPixels ( Func displayfunc, Rectangle region ) : void

Sets the pixels in the given region of the GBA.Bitmap

ToBytes ( ) : Byte[]

Returns the 1BPP byte array of pixels for this GBA.Bitmap

this ( int x, int y ) : int

This indexer allows for quick access to pixel data in GBA.Color format.

메소드 상세

Bitmap() 공개 메소드

Copies an existing GBA.Bitmap or makes one from a subregion of an existing bitmap
public Bitmap ( Bitmap source, Rectangle region = newRectangle() ) : EmblemMagic.Components
source Bitmap
region Rectangle
리턴 EmblemMagic.Components

Bitmap() 공개 메소드

Creates a GBA.Bitmap from the given IDisplayable object
public Bitmap ( IDisplayable pixels ) : EmblemMagic.Components
pixels IDisplayable
리턴 EmblemMagic.Components

Bitmap() 공개 메소드

Creates an empty GBA.Bitmap of the given dimensions.
public Bitmap ( int width, int height ) : EmblemMagic.Components
width int
height int
리턴 EmblemMagic.Components

Bitmap() 공개 메소드

Makes a bitmap from the given byte array (must in 1 byte per pixel format)
public Bitmap ( int width, int height, Array palette, Array data ) : EmblemMagic.Components
width int
height int
palette Array
data Array
리턴 EmblemMagic.Components

Bitmap() 공개 메소드

Makes a GBA.Bitmap from the image at the given filepath (and using the given Palette if not null)
public Bitmap ( string filepath, GBA.Palette palette = null ) : EmblemMagic.Components
filepath string
palette GBA.Palette
리턴 EmblemMagic.Components

GetColor() 공개 메소드

public GetColor ( int x, int y ) : GBA.Color
x int
y int
리턴 GBA.Color

GetPixels() 공개 메소드

Returns an array of pixels from the requested region of the Bitmap
public GetPixels ( Rectangle region ) : ].Color[
region Rectangle
리턴 ].Color[

IsEmpty() 공개 메소드

Tells if this is an empty Bitmap or not.
public IsEmpty ( ) : bool
리턴 bool

Load() 공개 메소드

Initializes the basic fields of this instance.
public Load ( int width, int height ) : void
width int
height int
리턴 void

SetColor() 공개 메소드

public SetColor ( int x, int y, GBA.Color value ) : void
x int
y int
value GBA.Color
리턴 void

SetPixels() 공개 메소드

Sets the pixels in the given region of the GBA.Bitmap
public SetPixels ( Func displayfunc, Rectangle region ) : void
displayfunc Func
region Rectangle
리턴 void

ToBytes() 공개 메소드

Returns the 1BPP byte array of pixels for this GBA.Bitmap
public ToBytes ( ) : Byte[]
리턴 Byte[]

this() 공개 메소드

This indexer allows for quick access to pixel data in GBA.Color format.
public this ( int x, int y ) : int
x int
y int
리턴 int