public void Produce(SKCanvas graphics, TileTextureCollection c) { foreach (var g in c.Grids) { var node = new TextureGridLayoutNode(prefs, g); var painter = new TextureGridPainter(prefs, node); painter.Draw(graphics); } }
public IntDimension ComputeRenderedSize(TileTextureCollection c) { var width = 0; var height = 0; foreach (var grid in c.Grids) { var node = new TextureGridLayoutNode(prefs, grid); var p = node.Offset + node.Size; width = Math.Max(p.X, width); height = Math.Max(p.Y, height); } return(new IntDimension(width, height)); }
public TextureGridPainter(GeneratorPreferences prefs, TextureGridLayoutNode node) { this.prefs = prefs; this.node = node ?? throw new ArgumentNullException(nameof(node)); this.grid = node.Grid; }