ConvToColor() public static méthode

public static ConvToColor ( PixelFarm c ) : SKColor
c PixelFarm
Résultat SkiaSharp.SKColor
        public override void FillRectangle(Brush brush, float left, float top, float width, float height)
        {
            switch (brush.BrushKind)
            {
            case BrushKind.Solid:
            {
                //use default solid brush

                SolidBrush solidBrush = (SolidBrush)brush;
                var        prevColor  = fill.Color;
                fill.Color = Conv1.ConvToColor(solidBrush.Color);
                skCanvas.DrawRect(
                    SKRect.Create(left, top, width, height),
                    fill);
                fill.Color = prevColor;
            }
            break;

            case BrushKind.LinearGradient:
            {
                //not - support

                //draw with gradient
                //LinearGradientBrush linearBrush = (LinearGradientBrush)brush;
                //var colors = linearBrush.GetColors();
                //var points = linearBrush.GetStopPoints();
                //using (var linearGradBrush = new System.Drawing.Drawing2D.LinearGradientBrush(
                //     points[0].ToPointF(),
                //     points[1].ToPointF(),
                //     ConvColor(colors[0]),
                //     ConvColor(colors[1])))
                //{
                //    gx.FillRectangle(linearGradBrush, left, top, width, height);
                //}
            }
            break;

            case BrushKind.GeometryGradient:
            {
            }
            break;

            case BrushKind.CircularGraident:
            {
            }
            break;

            case BrushKind.Texture:
            {
            }
            break;
            }
        }
 public override void FillPolygon(Color color, PointF[] points)
 {
     using (SKPath path = CreatePolygon(points))
     {
         var prevColor = fill.Color;
         fill.Color = Conv1.ConvToColor(color);
         skCanvas.DrawPath(path, fill);
         fill.Color = prevColor;
     }
     //var prevColor = gx.SolidBrushColor;
     //gx.SolidBrushColor = color;
     //gx.FillPolygon(gx.SolidBrushColor, points);
     //gx.SolidBrushColor = prevColor;
 }
        public override void DrawRectangle(Color color, float left, float top, float width, float height)
        {
            //var prevColor = gx.PenColor;
            //gx.PenColor = color;
            //gx.DrawRectLTRB(left, top, left + width, top + height);
            //gx.PenColor = prevColor;

            var prevColor = stroke.Color;

            stroke.Color = Conv1.ConvToColor(color);
            skCanvas.DrawRect(
                SKRect.Create(left, top, width, height),
                stroke);
            stroke.Color = prevColor;
        }
        public override void FillRectangle(Color color, float left, float top, float width, float height)
        {
            //var prevColor = gx.SolidBrushColor;
            //gx.SolidBrushColor = color;
            //gx.FillRectLTRB(left, top, left + width, top + height);
            //gx.SolidBrushColor = prevColor;

            var prevColor = fill.Color;

            fill.Color = Conv1.ConvToColor(color);
            skCanvas.DrawRect(
                SKRect.Create(left, top, width, height),
                fill);
            fill.Color = prevColor;
        }
 public override void Clear(PixelFarm.Drawing.Color c)
 {
     skCanvas.Clear(Conv1.ConvToColor(c));
 }