public override void StrokePath(double strokeWidth, int color)
 {
     if (color != _lastStrokingColor)
     {
         _lastStrokingColor = color;
         float r = ColorScale * ((color >> 16) & 0xff);
         float g = ColorScale * ((color >> 8) & 0xff);
         float b = ColorScale * ((color >> 8) & 0xff);
         _contentStream.SetStrokingColor(r, g, b);
     }
     if (strokeWidth != _lastLineWidth)
     {
         _lastLineWidth = strokeWidth;
         _contentStream.SetLineWidth((float)(strokeWidth));
     }
     _contentStream.Stroke();
 }
        public override void StrokePath(double strokeWidth, int color, LineStyle lineStyle)
        {
            if (color != _lastStrokingColor)
            {
                _lastStrokingColor = color;
                float r = ColorScale * ((color >> 16) & 0xff);
                float g = ColorScale * ((color >> 8) & 0xff);
                float b = ColorScale * ((color >> 8) & 0xff);
                _contentStream.SetStrokingColor(r, g, b);
            }
            if (lineStyle != _lastLineStyle ||
                (lineStyle != LineStyle.Solid && strokeWidth != _lastLineWidth))
            {
                _lastLineStyle = lineStyle;
                float[] pattern;
                switch (lineStyle)
                {
                case LineStyle.Dashed:
                    pattern = new float[] { 4 * (float)strokeWidth };
                    break;

                case LineStyle.Dotted:
                    pattern = new float[] { 0, 3 * (float)strokeWidth };
                    break;

                default:
                    pattern = new float[] { };
                    break;
                }
                _contentStream.SetLineCapStyle(lineStyle == LineStyle.Dotted ? 1 : 0);
                _contentStream.SetLineDashPattern(pattern, 0);
            }
            if (strokeWidth != _lastLineWidth)
            {
                _lastLineWidth = strokeWidth;
                _contentStream.SetLineWidth((float)(strokeWidth));
            }
            _contentStream.Stroke();
        }