C# Class Sphere_Editor.EditorComponents.TilesetControl

Inheritance: System.Windows.Forms.UserControl
Datei anzeigen Open project: Radnen/spherestudio Class Usage Examples

Public Methods

Method Description
AddTile ( ) : void

Add's a blank black tile to the tileset.

AddTile ( Tile tile ) : void

Add's the tile object to the tileset.

CompileSelectedTiles ( ) : void
DeleteTile ( int index ) : void
Destroy ( ) : void
ExportAsImage ( string filename ) : void
FromSprite ( Spriteset sprite ) : TilesetControl
GetCurrentTile ( ) : Tile
GetSelectedIndices ( ) : short[]
GetTile ( int num ) : Tile
GetTileMap ( ) : Bitmap
InsertTile ( int index ) : void
ReadFromStream ( BinaryReader stream ) : void
RescaleAllTiles ( short width, short height ) : void
ResizeAllTiles ( short width, short height ) : void
Save ( string filename ) : void
SetTileImage ( int num, Bitmap img ) : void
SetTileSize ( short width, short height ) : void
TilesetControl ( ) : System
TilesetControl ( BinaryReader stream ) : System
TilesetControl ( string fullpath ) : System
TilesetControl ( string filename, string parent_filename ) : System
ToBitmapList ( ) : List
UpdateFromImage ( string filename, int tile_width, int tile_height ) : void
UpdateHeight ( ) : void

Forces the control to adjust its height to its container object.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
AppendTileItem_Click ( object sender, EventArgs e ) : void
DeleteTileMenuItem_Click ( object sender, EventArgs e ) : void
DuplicateTile_Click ( object sender, EventArgs e ) : void
GetTileIndexAt ( int x_pos, int y_pos ) : short
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

InsertTileItem_Click ( object sender, EventArgs e ) : void
MarkSelectedTile ( short index, int x, int y, int w, int h, Graphics g ) : void
RestoreZoomItem_Click ( object sender, EventArgs e ) : void
TilesetContextMenu_Opened ( object sender, EventArgs e ) : void
TilesetControl_KeyDown ( object sender, KeyEventArgs e ) : void
TilesetControl_KeyUp ( object sender, KeyEventArgs e ) : void
TilesetControl_Load ( object sender, EventArgs e ) : void
TilesetControl_MouseDown ( object sender, MouseEventArgs e ) : void
TilesetControl_MouseMove ( object sender, MouseEventArgs e ) : void
TilesetControl_MouseUp ( object sender, MouseEventArgs e ) : void
TilesetControl_Resize ( object sender, EventArgs e ) : void
Tileset_Paint ( object sender, PaintEventArgs e ) : void
ZoomInItem_Click ( object sender, EventArgs e ) : void
ZoomOutItem_Click ( object sender, EventArgs e ) : void

Method Details

AddTile() public method

Add's a blank black tile to the tileset.
public AddTile ( ) : void
return void

AddTile() public method

Add's the tile object to the tileset.
public AddTile ( Tile tile ) : void
tile Tile Tile object to add
return void

CompileSelectedTiles() public method

public CompileSelectedTiles ( ) : void
return void

DeleteTile() public method

public DeleteTile ( int index ) : void
index int
return void

Destroy() public method

public Destroy ( ) : void
return void

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

ExportAsImage() public method

public ExportAsImage ( string filename ) : void
filename string
return void

FromSprite() public static method

public static FromSprite ( Spriteset sprite ) : TilesetControl
sprite Spriteset
return TilesetControl

GetCurrentTile() public method

public GetCurrentTile ( ) : Tile
return Tile

GetSelectedIndices() public method

public GetSelectedIndices ( ) : short[]
return short[]

GetTile() public method

public GetTile ( int num ) : Tile
num int
return Tile

GetTileMap() public method

public GetTileMap ( ) : Bitmap
return System.Drawing.Bitmap

InsertTile() public method

public InsertTile ( int index ) : void
index int
return void

ReadFromStream() public method

public ReadFromStream ( BinaryReader stream ) : void
stream System.IO.BinaryReader
return void

RescaleAllTiles() public method

public RescaleAllTiles ( short width, short height ) : void
width short
height short
return void

ResizeAllTiles() public method

public ResizeAllTiles ( short width, short height ) : void
width short
height short
return void

Save() public method

public Save ( string filename ) : void
filename string
return void

SetTileImage() public method

public SetTileImage ( int num, Bitmap img ) : void
num int
img System.Drawing.Bitmap
return void

SetTileSize() public method

public SetTileSize ( short width, short height ) : void
width short
height short
return void

TilesetControl() public method

public TilesetControl ( ) : System
return System

TilesetControl() public method

public TilesetControl ( BinaryReader stream ) : System
stream System.IO.BinaryReader
return System

TilesetControl() public method

public TilesetControl ( string fullpath ) : System
fullpath string
return System

TilesetControl() public method

public TilesetControl ( string filename, string parent_filename ) : System
filename string
parent_filename string
return System

ToBitmapList() public method

public ToBitmapList ( ) : List
return List

UpdateFromImage() public method

public UpdateFromImage ( string filename, int tile_width, int tile_height ) : void
filename string
tile_width int
tile_height int
return void

UpdateHeight() public method

Forces the control to adjust its height to its container object.
public UpdateHeight ( ) : void
return void