Exemplo n.º 1
0
 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."),
     });
Exemplo n.º 2
0
 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."),
     });
Exemplo n.º 3
0
 public FillDrawNode(double x, double y, double width, double height, BaseColorViewModel color)
 {
     X      = x;
     Y      = y;
     Width  = width;
     Height = height;
     Color  = color;
     UpdateGeometry();
 }
Exemplo n.º 4
0
 public static AM.IBrush ToBrush(BaseColorViewModel colorViewModel) => colorViewModel switch
 {
Exemplo n.º 5
0
 public IFillDrawNode CreateFillDrawNode(double x, double y, double width, double height, BaseColorViewModel colorViewModel)
 {
     return(new FillDrawNode(x, y, width, height, colorViewModel));
 }
Exemplo n.º 6
0
        public void Fill(object dc, double x, double y, double width, double height, BaseColorViewModel color)
        {
            var drawNodeCached = _drawNodeCache.Get(color);

            if (drawNodeCached is { })