public PdfGraphicsOptions(double strokeWidth = 0.0, PdfColor strokeColor = null, PdfColor fillColor = null, PdfLineDashPattern lineStyle = null, PdfLineCapStyle? lineCapStyle = null, PdfLineJoinStyle? lineJoinStyle = null)
 {
     this.StrokeColor = strokeColor ?? PdfColor.Black;
     this.FillColor = fillColor ?? PdfColor.White;
     this.LineDashPattern = lineStyle ?? PdfLineDashPattern.Solid;
     this.StrokeWidth = strokeWidth;
     this.LineCapstyle = lineCapStyle;
     this.LineJoinStyle = lineJoinStyle;
 }
 public PdfStyleLine()
 {
     _locked     = false;
     _lineColor  = null;
     _lineWidth  = new PdfDistance(1.0);
     _capStyle   = PdfLineCapStyle.Butt;
     _joinStyle  = PdfLineJoinStyle.Bevel;
     _miterLimit = 1.0;
     _dashArray  = null;
     _dashPhase  = new PdfDistance(0);
 }
Example #3
0
 private void                                _init()
 {
     _resources              = new PdfResourceEntryList();
     _dataStream             = new StreamBuffer();
     _curStrokeColorSpace    = null;
     _curNonStrokeColorSpace = null;
     _curStrokeColor         = null;
     _curNonStrokeColor      = null;
     _curLineWidth           = new PdfDistance(-1);
     _curLineCap             = PdfLineCapStyle.Unknown;
     _curLineJoin            = PdfLineJoinStyle.Unknown;
     _curMiterLimit          = -1;
     _curDashArray           = null;
     _curDashPhase           = new PdfDistance(-1);
 }
        public PdfStyleLine(PdfColor lineColor, PdfDistance lineWith, PdfLineCapStyle CapStyle, PdfLineJoinStyle joinStyle, double miterLimit, PdfDistance[] dashArray, PdfDistance dashPhase)
        {
            if (lineColor is null)
            {
                throw new ArgumentNullException(nameof(lineColor));
            }

            _locked     = true;
            _lineColor  = lineColor;
            _lineWidth  = lineWith;
            _capStyle   = CapStyle;
            _joinStyle  = joinStyle;
            _miterLimit = miterLimit;
            _dashArray  = dashArray;
            _dashPhase  = dashPhase;
        }
        public PdfStyleLine(PdfColor lineColor, PdfDistance lineWidth)
        {
            if (lineColor is null)
            {
                throw new ArgumentNullException(nameof(lineColor));
            }

            _locked     = true;
            _lineColor  = lineColor;
            _lineWidth  = lineWidth;
            _capStyle   = PdfLineCapStyle.Butt;
            _joinStyle  = PdfLineJoinStyle.Bevel;
            _miterLimit = 1.0;
            _dashArray  = null;
            _dashPhase  = new PdfDistance(0);
        }
        public PdfStyleLine(PdfStyleLine style)
        {
            if (style is null)
            {
                throw new ArgumentNullException(nameof(style));
            }

            _locked     = false;
            _lineColor  = style._lineColor;
            _lineWidth  = style._lineWidth;
            _capStyle   = style._capStyle;
            _joinStyle  = style._joinStyle;
            _miterLimit = style._miterLimit;
            _dashArray  = style._dashArray;
            _dashPhase  = style._dashPhase;
        }
 /// <summary>
 /// Sets the line join style.
 /// </summary>
 public void SetLineJoinStyle(PdfLineJoinStyle value)
 {
     this.Write(((int)value).ToString());
     this.WriteLine(" j");
 }
 /// <summary>
 /// Sets the line join style.
 /// </summary>
 public void SetLineJoinStyle(PdfLineJoinStyle value)
 {
     this.Write(((int)value).ToString());
     this.WriteLine(" j");
 }
Example #9
0
 public void                                opSetLineJoin(PdfLineJoinStyle style)
 {
     WriteInteger((int)style, true);
     WriteStr(bs_j);
     _curLineJoin = style;
 }