public override void DrawImages(Image image, RectangleF[] destAndSrcPairs)
        {
            int j = destAndSrcPairs.Length;

            if (j > 1)
            {
                if ((j % 2) != 0)
                {
                    //make it even number
                    j -= 1;
                }
                //loop draw
                SKBitmap inner = ResolveInnerBmp(image);
                for (int i = 0; i < j;)
                {
                    //gx.DrawImage(inner,
                    //    destAndSrcPairs[i],
                    //    destAndSrcPairs[i + 1]);
                    skCanvas.DrawBitmap(
                        inner,
                        Conv1.ConvToRect(destAndSrcPairs[i]),
                        Conv1.ConvToRect(destAndSrcPairs[i + 1]));

                    i += 2;
                }
            }
        }
        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;
            }
        }
        /// <summary>
        /// Draws the specified portion of the specified <see cref="T:System.Drawing.Image"/> at the specified location and with the specified size.
        /// </summary>
        /// <param name="image"><see cref="T:System.Drawing.Image"/> to draw. </param>
        /// <param name="destRect"><see cref="T:System.Drawing.RectangleF"/> structure that specifies the location and size of the drawn image. The image is scaled to fit the rectangle. </param>
        /// <param name="srcRect"><see cref="T:System.Drawing.RectangleF"/> structure that specifies the portion of the <paramref name="image"/> object to draw. </param>
        /// <exception cref="T:System.ArgumentNullException"><paramref name="image"/> is null.</exception>
        public override void DrawImage(Image image, RectangleF destRect, RectangleF srcRect)
        {
            var bmp = Image.GetCacheInnerImage(image) as SkiaSharp.SKBitmap;

            if (bmp != null)
            {
                skCanvas.DrawBitmap(
                    bmp,
                    Conv1.ConvToRect(srcRect),
                    Conv1.ConvToRect(destRect));
            }
        }
 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));
 }