Esempio n. 1
0
 public PdfText(string value, PdfFont font, PdfMeasurement fontSize, PdfPoint location, PdfStreamState state = default(PdfStreamState))
 {
     Value    = value;
     Font     = font;
     FontSize = fontSize;
     Location = location;
     State    = state;
 }
Esempio n. 2
0
        public PdfEllipse(PdfPoint center, PdfMeasurement radiusX, PdfMeasurement radiusY, double rotationAngle = 0.0, double startAngle = 0.0, double endAngle = Math.PI * 2.0, PdfStreamState state = default(PdfStreamState))
        {
            Center        = center;
            RadiusX       = radiusX;
            RadiusY       = radiusY;
            RotationAngle = rotationAngle;
            StartAngle    = startAngle;
            EndAngle      = endAngle;
            State         = state;

            while (StartAngle < 0.0)
            {
                StartAngle += Math.PI * 2.0;
            }

            while (EndAngle < 0.0)
            {
                EndAngle += Math.PI * 2.0;
            }
        }
Esempio n. 3
0
        public void SetState(PdfStreamState state)
        {
            if (state.StrokeColor != _lastState.StrokeColor || state.StrokeWidth != _lastState.StrokeWidth)
            {
                Stroke();
            }

            if (state.StrokeWidth != _lastState.StrokeWidth)
            {
                WriteStrokeWidth(state.StrokeWidth);
            }

            if (state.StrokeColor != _lastState.StrokeColor)
            {
                WriteStrokeColor(state.StrokeColor);
            }

            if (state.NonStrokeColor != _lastState.NonStrokeColor)
            {
                WriteNonStrokeColor(state.NonStrokeColor);
            }

            _lastState = state;
        }
Esempio n. 4
0
 public PdfLine(PdfPoint p1, PdfPoint p2, PdfStreamState state = default(PdfStreamState))
 {
     P1    = p1;
     P2    = p2;
     State = state;
 }
Esempio n. 5
0
 public PdfImageItem(PdfImageObject image, PdfStreamState state = default(PdfStreamState))
 {
     Image = image;
     State = state;
 }