private static DXF.AciColor ToColor(BaseColorViewModel colorViewModel) { return(colorViewModel switch { ArgbColorViewModel argbColor => new DXF.AciColor(argbColor.R, argbColor.G, argbColor.B), _ => throw new NotSupportedException($"The {colorViewModel.GetType()} color type is not supported."), });
public static SKColor ToSKColor(BaseColorViewModel colorViewModel) { return(colorViewModel switch { ArgbColorViewModel argbColor => new SKColor(argbColor.R, argbColor.G, argbColor.B, argbColor.A), _ => throw new NotSupportedException($"The {colorViewModel.GetType()} color type is not supported."), });
public FillDrawNode(double x, double y, double width, double height, BaseColorViewModel color) { X = x; Y = y; Width = width; Height = height; Color = color; UpdateGeometry(); }
public static AM.IBrush ToBrush(BaseColorViewModel colorViewModel) => colorViewModel switch {
public IFillDrawNode CreateFillDrawNode(double x, double y, double width, double height, BaseColorViewModel colorViewModel) { return(new FillDrawNode(x, y, width, height, colorViewModel)); }
public void Fill(object dc, double x, double y, double width, double height, BaseColorViewModel color) { var drawNodeCached = _drawNodeCache.Get(color); if (drawNodeCached is { })