Editor/Roof/ArchDownpipeDrawer.cs

Editor drawer for a downpipe arch part. It declares it draws Downpipe parts, obtains the part and brush from the drawing context, and invokes ArchGutterGen.Downpipe to render onto the canvas.

Native Interop
namespace Sunless.Architecture;

public sealed class ArchDownpipeDrawer : IArchDrawer
{
	public string Draws => ArchDraws.Downpipe;

	public void Draw( ArchDrawing drawing )
	{
		var pipe = drawing.Drawn<ArchDownpipePart>();
		var brush = drawing.Style.Brush( ArchSurface.Gutter, new[] { pipe.Palette, drawing.Within<ArchBuilding>().Palette } );

		ArchGutterGen.Downpipe( drawing.Canvas, pipe, drawing.Kit, brush );
	}
}