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."),
     });