C# Class XCom.Bmp

Mostrar archivo Open project: pmprog/OpenXCOM.Tools

Public Properties

Property Type Description
DefaultTransparentIndex byte

Public Methods

Method Description
Crop ( Bitmap src, Rectangle bounds ) : Bitmap
Draw ( Bitmap src, Bitmap dest, int x, int y ) : void
FireLoadingEvent ( int curr, int total ) : void
GetBoundsRect ( Bitmap src, int transparent ) : Rectangle
Hq2x ( Bitmap image ) : Bitmap
Load ( Bitmap b, Palette pal, int imgWid, int imgHei, int space ) : XCImageCollection

Loads a previously saved sprite sheet as a generic collection to be saved later

LoadTile ( Bitmap src, int imgNum, Palette p, int startX, int startY, int imgWid, int imgHei ) : XCImage
MakeBitmap ( int width, int height, System.Drawing.Imaging.ColorPalette pal ) : Bitmap
MakeBitmap8 ( int width, int height, byte idx, System.Drawing.Imaging.ColorPalette palette ) : Bitmap

Creates a TRUE 8-bit indexed bitmap from the specified byte array

Save ( string path, Bitmap image ) : void
Save24 ( Stream s, Bitmap image ) : void
Save24 ( string path, Bitmap image ) : void
SaveBMP ( string file, XCImageCollection collection, Palette pal, int across, int space ) : void

Saves an image collection as a bmp sprite sheet

Method Details

Crop() public static method

public static Crop ( Bitmap src, Rectangle bounds ) : Bitmap
src System.Drawing.Bitmap
bounds System.Drawing.Rectangle
return System.Drawing.Bitmap

Draw() public static method

public static Draw ( Bitmap src, Bitmap dest, int x, int y ) : void
src System.Drawing.Bitmap
dest System.Drawing.Bitmap
x int
y int
return void

FireLoadingEvent() public static method

public static FireLoadingEvent ( int curr, int total ) : void
curr int
total int
return void

GetBoundsRect() public static method

public static GetBoundsRect ( Bitmap src, int transparent ) : Rectangle
src System.Drawing.Bitmap
transparent int
return System.Drawing.Rectangle

Hq2x() public static method

public static Hq2x ( Bitmap image ) : Bitmap
image System.Drawing.Bitmap
return System.Drawing.Bitmap

Load() public static method

Loads a previously saved sprite sheet as a generic collection to be saved later
public static Load ( Bitmap b, Palette pal, int imgWid, int imgHei, int space ) : XCImageCollection
b System.Drawing.Bitmap bitmap containing sprites
pal Palette
imgWid int
imgHei int
space int
return XCImageCollection

LoadTile() public static method

public static LoadTile ( Bitmap src, int imgNum, Palette p, int startX, int startY, int imgWid, int imgHei ) : XCImage
src System.Drawing.Bitmap
imgNum int
p Palette
startX int
startY int
imgWid int
imgHei int
return XCom.Interfaces.XCImage

MakeBitmap() public static method

public static MakeBitmap ( int width, int height, System.Drawing.Imaging.ColorPalette pal ) : Bitmap
width int
height int
pal System.Drawing.Imaging.ColorPalette
return System.Drawing.Bitmap

MakeBitmap8() public static method

Creates a TRUE 8-bit indexed bitmap from the specified byte array
public static MakeBitmap8 ( int width, int height, byte idx, System.Drawing.Imaging.ColorPalette palette ) : Bitmap
width int width of final bitmap
height int height of final bitmap
idx byte image data
palette System.Drawing.Imaging.ColorPalette
return System.Drawing.Bitmap

Save() public static method

public static Save ( string path, Bitmap image ) : void
path string
image System.Drawing.Bitmap
return void

Save24() public static method

public static Save24 ( Stream s, Bitmap image ) : void
s Stream
image System.Drawing.Bitmap
return void

Save24() public static method

public static Save24 ( string path, Bitmap image ) : void
path string
image System.Drawing.Bitmap
return void

SaveBMP() public static method

Saves an image collection as a bmp sprite sheet
public static SaveBMP ( string file, XCImageCollection collection, Palette pal, int across, int space ) : void
file string output file name
collection XCImageCollection image collection
pal Palette Palette to color the images with
across int number of columns to use for images
space int
return void

Property Details

DefaultTransparentIndex public_oe static_oe property

public static byte DefaultTransparentIndex
return byte