C# Class Universe.Modules.Terrain.FileLoaders.GenericSystemDrawing

A virtual class designed to have methods overloaded, this class provides an interface for a generic image saving and loading mechanism, but does not specify the format. It should not be unsubstantiated directly.
Inheritance: ITerrainLoader
显示文件 Open project: Virtual-Universe/Virtual-Universe

Public Methods

Method Description
LoadFile ( string filename, IScene scene ) : ITerrainChannel

Loads a file from a specified filename on the disk, parses the image using the System.Drawing parsers then returns a terrain channel. Values are returned based on HSL brightness between 0m and 128m

LoadFile ( string filename, IScene scene, int x, int y, int fileWidth, int fileHeight, int w, int h ) : ITerrainChannel
LoadStream ( Stream stream, IScene scene ) : ITerrainChannel
SaveFile ( string filename, ITerrainChannel map ) : void

Exports a file to a image on the disk using a System.Drawing exporter.

SaveStream ( Stream stream, ITerrainChannel map ) : void

Exports a stream using a System.Drawing exporter.

ToString ( ) : string

Protected Methods

Method Description
CreateBitmapFromMap ( ITerrainChannel map ) : Bitmap

Protected method, generates a colored bitmap image from a specified terrain channel.

CreateGrayscaleBitmapFromMap ( ITerrainChannel map ) : Bitmap

Protected method, generates a grayscale bitmap image from a specified terrain channel.

LoadBitmap ( Bitmap bitmap, IScene scene ) : ITerrainChannel

Method Details

CreateBitmapFromMap() protected static method

Protected method, generates a colored bitmap image from a specified terrain channel.
protected static CreateBitmapFromMap ( ITerrainChannel map ) : Bitmap
map ITerrainChannel The terrain channel to export to bitmap
return System.Drawing.Bitmap

CreateGrayscaleBitmapFromMap() protected static method

Protected method, generates a grayscale bitmap image from a specified terrain channel.
protected static CreateGrayscaleBitmapFromMap ( ITerrainChannel map ) : Bitmap
map ITerrainChannel The terrain channel to export to bitmap
return System.Drawing.Bitmap

LoadBitmap() protected method

protected LoadBitmap ( Bitmap bitmap, IScene scene ) : ITerrainChannel
bitmap System.Drawing.Bitmap
scene IScene
return ITerrainChannel

LoadFile() public method

Loads a file from a specified filename on the disk, parses the image using the System.Drawing parsers then returns a terrain channel. Values are returned based on HSL brightness between 0m and 128m
public LoadFile ( string filename, IScene scene ) : ITerrainChannel
filename string The target image to load
scene IScene
return ITerrainChannel

LoadFile() public method

public LoadFile ( string filename, IScene scene, int x, int y, int fileWidth, int fileHeight, int w, int h ) : ITerrainChannel
filename string
scene IScene
x int
y int
fileWidth int
fileHeight int
w int
h int
return ITerrainChannel

LoadStream() public method

public LoadStream ( Stream stream, IScene scene ) : ITerrainChannel
stream Stream
scene IScene
return ITerrainChannel

SaveFile() public method

Exports a file to a image on the disk using a System.Drawing exporter.
public SaveFile ( string filename, ITerrainChannel map ) : void
filename string The target filename
map ITerrainChannel The terrain channel being saved
return void

SaveStream() public method

Exports a stream using a System.Drawing exporter.
public SaveStream ( Stream stream, ITerrainChannel map ) : void
stream Stream The target stream
map ITerrainChannel The terrain channel being saved
return void

ToString() public method

public ToString ( ) : string
return string