/// <summary> /// Saves the maze with a specified path /// Note: The method with PathPos is prefered though /// </summary> /// <param name="mazeSaveFileType">Wether to save as PNG or TIF</param> /// <param name="fileName">The filename of the file</param> /// <param name="path">The path (can be generated by calling PathFinderDepthFirst.GoFind)</param> /// <param name="lineSavingProgress">An action that will be called to obtain the status of the saving.</param> /// <param name="useTiles">Wether to save the maze with tiles (Might be faster) (Only works for TIFF)</param> /// <param name="useColorMap">Wether to save the maze ColorMap (Is faster and uses less disk space) (Only works for TIFF) (Note: Apparently GigaPan does not support this)</param> /// <returns>Boolean wether this mode is supported or not</returns> public bool SaveMazeAsImageDeluxe(MazeSaveFileType mazeSaveFileType, String fileName, List <MazePoint> path, Action <int, int> lineSavingProgress = null, Boolean useTiles = false, Boolean useColorMap = false) { List <MazePointPos> pathPosjes = new List <MazePointPos>(path.Count); for (int i = 0; i < path.Count; i++) { var curPathNode = path[i]; byte formulathing = (byte)((double)i / (double)path.Count * 255.0); var pathPos = new MazePointPos(curPathNode.X, curPathNode.Y, formulathing); pathPosjes.Add(pathPos); } return(SaveMazeAsImageDeluxe(mazeSaveFileType, fileName, pathPosjes, lineSavingProgress, useTiles, useColorMap)); }
/// <summary> /// Saves the maze with a specified path /// Note: The method with PathPos is prefered though /// </summary> /// <param name="mazeSaveFileType">Wether to save as PNG or TIF</param> /// <param name="fileName">The filename of the file</param> /// <param name="path">The path (can be generated by calling PathFinderDepthFirst.GoFind)</param> /// <param name="lineSavingProgress">An action that will be called to obtain the status of the saving.</param> /// <param name="useTiles">Wether to save the maze with tiles (Might be faster) (Only works for TIFF)</param> /// <param name="useColorMap">Wether to save the maze ColorMap (Is faster and uses less disk space) (Only works for TIFF) (Note: Apparently GigaPan does not support this)</param> /// <returns>Boolean wether this mode is supported or not</returns> public bool SaveMazeAsImageDeluxe(MazeSaveFileType mazeSaveFileType, String fileName, List<MazePoint> path, Action<int, int> lineSavingProgress = null, Boolean useTiles = false, Boolean useColorMap = false) { List<MazePointPos> pathPosjes = new List<MazePointPos>(path.Count); for (int i = 0; i < path.Count; i++) { var curPathNode = path[i]; byte formulathing = (byte)((double)i / (double)path.Count * 255.0); var pathPos = new MazePointPos(curPathNode.X, curPathNode.Y, formulathing); pathPosjes.Add(pathPos); } return SaveMazeAsImageDeluxe(mazeSaveFileType, fileName, pathPosjes, lineSavingProgress, useTiles, useColorMap); }
/// <summary> /// Saves the maze with a specified path as PNG /// </summary> /// <param name="fileName">The filename of the file</param> /// <param name="path">The path (can be generated by calling PathFinderDepthFirst.GoFind)</param> /// <param name="lineSavingProgress">An action that will be called to obtain the status of the saving.</param> public void SaveMazeAsImageDeluxe(String fileName, List <MazePoint> path, Action <int, int> lineSavingProgress) { if (lineSavingProgress == null) { lineSavingProgress = (cur, tot) => { }; } List <MazePointPos> pathPosjes = new List <MazePointPos>(path.Count); for (int i = 0; i < path.Count; i++) { var curPathNode = path[i]; byte formulathing = (byte)((double)i / (double)path.Count * 255.0); var pathPos = new MazePointPos(curPathNode.X, curPathNode.Y, formulathing); pathPosjes.Add(pathPos); } SaveMazeAsImageDeluxe(fileName, pathPosjes, lineSavingProgress); }