C# Класс DeveMazeGenerator.Maze

Info about mazes: 0 = False = Wall = Black 1 = True = Empty = White
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
LineChunkCount int
LineChunks int

Открытые методы

Метод Описание
SaveMazeAsImageDeluxe ( MazeSaveFileType mazeSaveFileType, String fileName, List path, int>.Action lineSavingProgress = null, System.Boolean useTiles = false, System.Boolean useColorMap = false ) : bool

Saves the maze with a specified path Note: The method with PathPos is prefered though

SaveMazeAsImageDeluxe ( MazeSaveFileType mazeSaveFileType, String fileName, List pathPosjes, int>.Action lineSavingProgress = null, System.Boolean useTiles = false, System.Boolean useColorMap = false ) : bool

Saves the maze with a specified path Note: Either this method or the one with the Dynamic path (for really big mazes) is prefered for saving a Maze to an image

SaveMazeAsImageDeluxeWithDynamicallyGeneratedPath ( MazeSaveFileType mazeSaveFileType, String fileName, IEnumerable dynamicallyGeneratedPath, int>.Action lineSavingProgress = null, System.Boolean useTiles = false, System.Boolean useColorMap = false, System.Boolean saveAsSplittedImages = false, Action debugMessageCallback = null ) : bool

Saves the maze with a specified path Note: This is the method that should be used together with the PathFinderDepthFirstSmartAndSmartMemory.DeterminePathFromDirections method

Testje ( int size, int>.Action lineSavingProgress, int tiffTileSize, bool useComplexImage, Action debugMessageCallback = null ) : void

Приватные методы

Метод Описание
CreatePngWriter ( string fileName, ImageInfo imgInfo ) : PngWriter
FindTheMaxPathRowsThatWouldFitInMemoryFromHere ( Action debugMessageCallback, int pathPointsPerRow, int startRow, int stepsToIncreaseWithSize, ulong memoryFree ) : int
FindTheMaxPathRowsThatWouldFitInMemoryFromHerePng ( Action debugMessageCallback, int pathPointsPerRow, int startRow, int stepsToIncreaseWithSize, ulong memoryFree ) : int
FindTheMinimalRowsToWrite ( Action debugMessageCallback, int pathPointsPerRow, ulong memoryFree ) : int

Note: This method returns the amount of rows it can obtain for the path in one go based on available memory, not the tifftilesize that should be used.

FindTheMinimalRowsToWriteForPng ( Action debugMessageCallback, int pathPointsPerRow, ulong memoryFree ) : int

Note: This method returns the amount of rows it can obtain for the path in one go based on available memory, not the tifftilesize that should be used.

GetColorMaps ( ) : ushort[][]
SaveMazeAsImageDeluxePng ( String fileName, List pathPosjes, int>.Action lineSavingProgress ) : void
SaveMazeAsImageDeluxePngWithDynamicallyGeneratedPath ( String fileName, IEnumerable pathPosjes, int>.Action lineSavingProgress ) : void
SaveMazeAsImageDeluxePngWithDynamicallyGeneratedPathWithAnalysis ( string fileName, IEnumerable pathPosjes, int>.Action lineSavingProgress, Action debugMessageCallback = null ) : void

This method performs a preanalysis on the path to make sure there's no super high memory usage for a certain area

SaveMazeAsImageDeluxeTiff ( String fileName, List pathPosjes, int>.Action lineSavingProgress ) : void
SaveMazeAsImageDeluxeTiffWithChunks ( String fileName, List pathPosjes, int>.Action lineSavingProgress ) : void
SaveMazeAsImageDeluxeTiffWithColorMap ( String fileName, List pathPosjes, int>.Action lineSavingProgress ) : void
SaveMazeAsImageDeluxeTiffWithDynamicallyGeneratedPath ( String fileName, IEnumerable pathPosjes, int>.Action lineSavingProgress, Action debugMessageCallback = null ) : void
SaveMazeAsImageDeluxeTiffWithDynamicallyGeneratedPathWithAnalysis ( String fileName, IEnumerable pathPosjes, int>.Action lineSavingProgress, Action debugMessageCallback = null ) : void

This method performs a preanalysis on the path to make sure there's no super high memory usage for a certain area

SaveMazeAsImageDeluxeTiffWithDynamicallyGeneratedPathWithAnalysisAndSplitImages ( String folderName, IEnumerable pathPosjes, int>.Action lineSavingProgress, Action debugMessageCallback = null ) : void

This method performs a preanalysis on the path to make sure there's no super high memory usage for a certain area It also splits the image into subimages

SaveTiffImage ( string fileName, byte color_ptr, int tileWidth, int tileHeight ) : void

Описание методов

SaveMazeAsImageDeluxe() публичный Метод

Saves the maze with a specified path Note: The method with PathPos is prefered though
public SaveMazeAsImageDeluxe ( MazeSaveFileType mazeSaveFileType, String fileName, List path, int>.Action lineSavingProgress = null, System.Boolean useTiles = false, System.Boolean useColorMap = false ) : bool
mazeSaveFileType MazeSaveFileType Wether to save as PNG or TIF
fileName String The filename of the file
path List The path (can be generated by calling PathFinderDepthFirst.GoFind)
lineSavingProgress int>.Action An action that will be called to obtain the status of the saving.
useTiles System.Boolean Wether to save the maze with tiles (Might be faster) (Only works for TIFF)
useColorMap System.Boolean Wether to save the maze ColorMap (Is faster and uses less disk space) (Only works for TIFF) (Note: Apparently GigaPan does not support this)
Результат bool

SaveMazeAsImageDeluxe() публичный Метод

Saves the maze with a specified path Note: Either this method or the one with the Dynamic path (for really big mazes) is prefered for saving a Maze to an image
public SaveMazeAsImageDeluxe ( MazeSaveFileType mazeSaveFileType, String fileName, List pathPosjes, int>.Action lineSavingProgress = null, System.Boolean useTiles = false, System.Boolean useColorMap = false ) : bool
mazeSaveFileType MazeSaveFileType Wether to save as PNG or TIF
fileName String The filename of the file
pathPosjes List
lineSavingProgress int>.Action An action that will be called to obtain the status of the saving.
useTiles System.Boolean Wether to save the maze with tiles (Might be faster) (Only works for TIFF)
useColorMap System.Boolean Wether to save the maze ColorMap (Is faster and uses less disk space) (Only works for TIFF) (Note: Apparently GigaPan does not support this)
Результат bool

SaveMazeAsImageDeluxeWithDynamicallyGeneratedPath() публичный Метод

Saves the maze with a specified path Note: This is the method that should be used together with the PathFinderDepthFirstSmartAndSmartMemory.DeterminePathFromDirections method
public SaveMazeAsImageDeluxeWithDynamicallyGeneratedPath ( MazeSaveFileType mazeSaveFileType, String fileName, IEnumerable dynamicallyGeneratedPath, int>.Action lineSavingProgress = null, System.Boolean useTiles = false, System.Boolean useColorMap = false, System.Boolean saveAsSplittedImages = false, Action debugMessageCallback = null ) : bool
mazeSaveFileType MazeSaveFileType What format to save the maze in. Tif is currently the best to choose
fileName String The filename of the file
dynamicallyGeneratedPath IEnumerable The dynamically generated path
lineSavingProgress int>.Action An action that will be called to obtain the status of the saving.
useTiles System.Boolean Wether to save the maze with tiles (Might be faster) (Only works for TIFF)
useColorMap System.Boolean Wether to save the maze ColorMap (Is faster and uses less disk space) (Only works for TIFF) (Note: Apparently GigaPan does not support this)
saveAsSplittedImages System.Boolean
debugMessageCallback Action Some more advanced saving algorithms also return some debug messages, (e.g. Tif)
Результат bool

Testje() публичный Метод

public Testje ( int size, int>.Action lineSavingProgress, int tiffTileSize, bool useComplexImage, Action debugMessageCallback = null ) : void
size int
lineSavingProgress int>.Action
tiffTileSize int
useComplexImage bool
debugMessageCallback Action
Результат void

Описание свойств

LineChunkCount публичное статическое свойство

public static int LineChunkCount
Результат int

LineChunks публичное статическое свойство

public static int LineChunks
Результат int