public DiagramDefinition(string name, IScope scope, OutputSettings output, IEnumerable<Filter> filters, bool dependencyDown = true, bool hideAnonymousLayers = true) { Name = name; Scope = scope; Output = output; Filters = filters; HideAnonymousLayers = hideAnonymousLayers; DependencyDown = dependencyDown; }
public static async Task RenderTreeToBitmapAsync(Node tree, bool dependencyDown, OutputSettings outputSettings, bool hideAnonymousNodes = true, bool overWrite = true) { if (!tree.HasChildren()) throw new Exception("Empty diagram"); if (overWrite) { if (File.Exists(outputSettings.Path)) File.Delete(outputSettings.Path); } var viewModel = LayerMapper.TreeModelToArchViewModel(tree,dependencyDown,hideAnonymousNodes); await StartStaTask(() => RenderViewModelToBitmap(viewModel, outputSettings.Path, outputSettings.Size)); }
public static void RenderTreeToBitmap(Node tree, bool dependencyDown, OutputSettings outputSettings, bool hideAnonymousNodes = true, bool overWrite = true) { RenderTreeToBitmapAsync(tree, dependencyDown, outputSettings, hideAnonymousNodes, overWrite).Wait(); }
private static OutputSettings ParseOutputSettings(XmlNode output) { var outputPath = RequireAttribute(output, "Path"); int scale; int.TryParse(output.Attributes?.GetNamedItem("Scale")?.Value, out scale); if (scale == 0) scale = 1; var outputSettings = new OutputSettings(outputPath, scale); return outputSettings; }