public ClientPlotSettings(string plotType, ClientRectangle viewport, string scaleA, string scaleB, PlotScalingType scalingType, PlotViewPortType viewPortType, PlotColorType colorType, double width, double height, double previewMaxSize) { PlotType = plotType; Viewport = viewport; ScaleA = scaleA; ScaleB = scaleB; ScalingType = scalingType; ViewPortType = viewPortType; ColorType = colorType; Width = width; Height = height; PreviewMaxSize = previewMaxSize; }
public static Drawing UpdateColors(this Drawing drawing, PlotColorType colorType) { switch (colorType) { case PlotColorType.Exact: return(drawing); case PlotColorType.Contrast: return(drawing.Map( l => l.Color.IsAutoOrWhite() ? l.Update(color: CadColor.Black) : l, e => e.Color.IsAutoOrWhite() ? e.WithColor(color: CadColor.Black) : e)); case PlotColorType.Black: return(drawing.Map( l => l.Update(color: CadColor.Black), e => e.WithColor(color: CadColor.Black))); default: throw new InvalidOperationException($"Color type {colorType} not recognized"); } }