OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Properties | List of all members
OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing Class Reference

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 insubstantiated directly. More...

Inheritance diagram for OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing:
Collaboration graph
[legend]

Public Member Functions

virtual ITerrainChannel LoadFile (string filename)
 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 More...
 
virtual ITerrainChannel LoadFile (string filename, int offsetX, int offsetY, int fileWidth, int fileHeight, int w, int h)
 
virtual ITerrainChannel LoadStream (Stream stream)
 
virtual void SaveFile (string filename, ITerrainChannel map)
 Exports a file to a image on the disk using a System.Drawing exporter. More...
 
virtual void SaveStream (Stream stream, ITerrainChannel map)
 Exports a stream using a System.Drawing exporter. More...
 
virtual void SaveFile (ITerrainChannel m_channel, string filename, int offsetX, int offsetY, int fileWidth, int fileHeight, int regionSizeX, int regionSizeY)
 Save a number of map tiles to a single big image file. More...
 
override string ToString ()
 
virtual bool SupportsTileSave ()
 

Protected Member Functions

virtual ITerrainChannel LoadBitmap (Bitmap bitmap)
 
virtual void Save (Bitmap bmp, string filename)
 

Static Protected Member Functions

static Bitmap CreateGrayscaleBitmapFromMap (ITerrainChannel map)
 Protected method, generates a grayscale bitmap image from a specified terrain channel. More...
 

Properties

string FileExtension [get]
 
- Properties inherited from OpenSim.Region.CoreModules.World.Terrain.ITerrainLoader
string FileExtension [get]
 

Detailed Description

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 insubstantiated directly.

Definition at line 43 of file GenericSystemDrawing.cs.

Member Function Documentation

static Bitmap OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.CreateGrayscaleBitmapFromMap ( ITerrainChannel  map)
inlinestaticprotected

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

Parameters
mapThe terrain channel to export to bitmap
Returns
A System.Drawing.Bitmap containing a grayscale image

Definition at line 214 of file GenericSystemDrawing.cs.

virtual ITerrainChannel OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.LoadBitmap ( Bitmap  bitmap)
inlineprotectedvirtual

Definition at line 90 of file GenericSystemDrawing.cs.

virtual ITerrainChannel OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.LoadFile ( string  filename)
inlinevirtual

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

Parameters
filenameThe target image to load
Returns
A terrain channel generated from the image.

Implements OpenSim.Region.CoreModules.World.Terrain.ITerrainLoader.

Definition at line 60 of file GenericSystemDrawing.cs.

virtual ITerrainChannel OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.LoadFile ( string  filename,
int  offsetX,
int  offsetY,
int  fileWidth,
int  fileHeight,
int  w,
int  h 
)
inlinevirtual
virtual ITerrainChannel OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.LoadStream ( Stream  stream)
inlinevirtual
virtual void OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.Save ( Bitmap  bmp,
string  filename 
)
inlineprotectedvirtual

Definition at line 190 of file GenericSystemDrawing.cs.

virtual void OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.SaveFile ( string  filename,
ITerrainChannel  map 
)
inlinevirtual

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

Parameters
filenameThe target filename
mapThe terrain channel being saved

Implements OpenSim.Region.CoreModules.World.Terrain.ITerrainLoader.

Definition at line 112 of file GenericSystemDrawing.cs.

virtual void OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.SaveFile ( ITerrainChannel  map,
string  filename,
int  offsetX,
int  offsetY,
int  fileWidth,
int  fileHeight,
int  regionSizeX,
int  regionSizeY 
)
inlinevirtual

Save a number of map tiles to a single big image file.

If the image file already exists then the tiles saved will replace those already in the file - other tiles will be untouched.

Parameters
filenameThe terrain file to save
offsetXThe map x co-ordinate at which to begin the save.
offsetYThe may y co-ordinate at which to begin the save.
fileWidthThe number of tiles to save along the X axis.
fileHeightThe number of tiles to save along the Y axis.
regionSizeXThe width of a map tile.
regionSizeYThe height of a map tile.

Implements OpenSim.Region.CoreModules.World.Terrain.ITerrainLoader.

Definition at line 131 of file GenericSystemDrawing.cs.

virtual void OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.SaveStream ( Stream  stream,
ITerrainChannel  map 
)
inlinevirtual

Exports a stream using a System.Drawing exporter.

Parameters
streamThe target stream
mapThe terrain channel being saved

Implements OpenSim.Region.CoreModules.World.Terrain.ITerrainLoader.

Definition at line 124 of file GenericSystemDrawing.cs.

virtual bool OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.SupportsTileSave ( )
inlinevirtual
override string OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.ToString ( )
inline

Definition at line 197 of file GenericSystemDrawing.cs.

Property Documentation

string OpenSim.Region.CoreModules.World.Terrain.FileLoaders.GenericSystemDrawing.FileExtension
get

Definition at line 48 of file GenericSystemDrawing.cs.


The documentation for this class was generated from the following file: