Exemple #1
0
        //----------------------------------------------------------------------------------------------------x
        /// <summary>Creates a new filled rectangle object with a border line.</summary>
        /// <param name="penProp">Pen properties of the border line</param>
        /// <param name="brushProp">Brush properties of the rectangle</param>
        /// <param name="rWidth">Width of the rectangle</param>
        /// <param name="rHeight">Height of the rectangle</param>
        public RepRect(PenProp penProp, BrushProp brushProp, Double rWidth, Double rHeight)
        {
#if DEVELOPER  // bs
            if (penProp != null)
            {
                this.graphicsState.penProp = penProp.penProp_Registered;
            }
            if (brushProp != null)
            {
                this.graphicsState.brushProp = brushProp.brushProp_Registered;
            }
#else
            if (penProp != null)
            {
                this.penProp = penProp.penProp_Registered;
            }
            if (brushProp != null)
            {
                this.brushProp = brushProp.brushProp_Registered;
            }
#endif
            this.rWidth  = rWidth;
            this.rHeight = rHeight;
            if (penProp == null)
            {
                oRepObjX = brushProp.report.formatter.oCreate_RepRect();
            }
            else
            {
                oRepObjX = penProp.report.formatter.oCreate_RepRect();
            }
        }
Exemple #2
0
 //----------------------------------------------------------------------------------------------------x
 /// <summary>Creates a new filled rectangle object with a border line.</summary>
 /// <param name="penProp">Pen properties of the border line</param>
 /// <param name="brushProp">Brush properties of the rectangle</param>
 /// <param name="rXPoints">X-coodinate of points, relative to the start point.</param>
 /// <param name="rYPoints">Y-coodinate of points, relative to the start point.</param>
 public RepPoly(PenProp penProp, BrushProp brushProp, Double[] rXPoints, Double[] rYPoints)
 {
     graphicsState.penProp   = penProp.penProp_Registered;
     graphicsState.brushProp = brushProp.brushProp_Registered;
     this.rXPoints           = rXPoints;
     this.rYPoints           = rYPoints;
 }
        //----------------------------------------------------------------------------------------------------x
        /// <summary>Creates a new table layout manager.</summary>
        /// <param name="report">Report of this table layout manager</param>
        public TableLayoutManager(Report report) : base(report)
        {
            tlmHeightMode = TlmHeightMode.Static;

            // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -x
            PenProp penProp_Solid = new PenProp(report, 0.5, Color.Black);

            tlmCellDef_Default.penProp_LineV = penProp_Solid;

            // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -x
            tlmColumnDef_Default.penProp_BorderH = penProp_Solid;

            // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -x
            tlmCellDef_Header = new TlmCellDef();
            tlmRowDef_Header  = new TlmRowDef();

            tlmCellDef_Header.rAlignH     = RepObj.rAlignLeft;
            tlmCellDef_Header.rAlignV     = RepObj.rAlignTop;
            tlmCellDef_Header.rAngle      = 0;
            tlmCellDef_Header.tlmTextMode = TlmTextMode.MultiLine;
            tlmCellDef_Header.rLineFeed   = 72.0 / 6;

            tlmCellDef_Header.rMargin     = 0;
            tlmCellDef_Header.rIndentH_MM = 1;
            tlmCellDef_Header.rIndentV_MM = 2;

            tlmCellDef_Header.brushProp_Back = new BrushProp(report, Color.FromArgb(220, 220, 220));
            tlmCellDef_Header.penProp_Line   = penProp_Solid;
        }
Exemple #4
0
 //----------------------------------------------------------------------------------------------------x
 /// <summary>Creates a new rectangle object with millimeter values.</summary>
 /// <param name="penProp">Pen properties of the border line</param>
 /// <param name="rXPoints">X-coodinate of points, relative to the start point, in millimeters.</param>
 /// <param name="rYPoints">Y-coodinate of points, relative to the start point, in millimeters.</param>
 public RepPolyMM(PenProp penProp, Double[] rXPoints, Double[] rYPoints) : base(penProp, null, null)
 {
     this.rXPoints = (Double[])Array.CreateInstance(typeof(Double), rXPoints.Length);
     this.rYPoints = (Double[])Array.CreateInstance(typeof(Double), rYPoints.Length);
     for (int i = 0; i < rXPoints.Length; i++)
     {
         this.rXPoints[i] = RT.rPointFromMM(rXPoints[i]);
         this.rYPoints[i] = RT.rPointFromMM(rYPoints[i]);
     }
 }
Exemple #5
0
        //----------------------------------------------------------------------------------------------------x
        /// <summary>Creates a new line object.</summary>
        /// <param name="penProp">Pen properties of the line</param>
        /// <param name="rX">X-coordinate of the end of the line, relative to the start point</param>
        /// <param name="rY">Y-coordinate of the end of the line, relative to the start point</param>
        public RepLine(PenProp penProp, Double rX, Double rY)
        {
#if DEVELOPER  // bs
            this.graphicsState.penProp = penProp.penProp_Registered;
#else
            this.penProp = penProp.penProp_Registered;
#endif
            this.rWidth  = rX;
            this.rHeight = rY;
            oRepObjX     = penProp.report.formatter.oCreate_RepLine();
        }
Exemple #6
0
        //----------------------------------------------------------------------------------------------------x
        /// <summary>Determines whether the specified object is equal to the current object.</summary>
        /// <param name="o">The object to compare with the current object.</param>
        /// <returns>true if the specified Object is equal to the current Object; otherwise, false.</returns>
        public override Boolean Equals(Object o)
        {
            if (o == null)
            {
                return(false);
            }
            PenProp pp = (PenProp)o;

            return(RT.bEquals(rWidth, pp.rWidth, 0.1) && Object.Equals(_color, pp._color) &&
                   RT.bEquals(rPatternOn, pp.rPatternOn, 0.1) && RT.bEquals(rPatternOff, pp.rPatternOff, 0.1));
        }
Exemple #7
0
        //------------------------------------------------------------------------------------------07.02.2006
        /// <summary>Writes the RepObj to the buffer.</summary>
        /// <param name="e">Environment data</param>
        public void Write(PdfIndirectObject_PageContents.Environment e)
        {
            PdfIndirectObject_PageContents p = e.pdfIndirectObject_PageContents;
            RepString repString = (RepString)e.repObj;
            Double    rWidth    = repString.fontProp.rWidth(repString.sText);
            Double    rOfsX     = rWidth * repString.rAlignH;
            Double    rOfsY     = repString.fontProp.rHeight() * (1 - repString.rAlignV);

            e.matrixD.Multiply(new MatrixD(1, 0, 0, 1, -rOfsX, rOfsY));

            p.Command("BT");
            p.Write_Font(repString.fontProp);
            if (e.bComplex)
            {
                p.Write_Matrix(e.matrixD);
                p.Command("Tm");
            }
            else
            {
                p.Write_Point(e.matrixD.rDX, e.matrixD.rDY);
                p.Command("Td");
            }
            p.String(repString.sText);
            p.Command("Tj");
            p.Command("ET");

            if (repString.fontProp.bUnderline)
            {
                Type1FontData   type1FontData   = (Type1FontData)repString.fontProp.fontPropData.fontData;
                PdfFontPropData pdfFontPropData = (PdfFontPropData)repString.fontProp.fontPropData;
                Double          rSizeFactor     = type1FontData.rSizeFactor(repString.fontProp);
                PenProp         pp = new PenProp(e.report, rSizeFactor * type1FontData.fUnderlineThickness / 1000, repString.fontProp.color);
                p.Write_Pen(pp);
                Double rD = rSizeFactor * type1FontData.fUnderlinePosition / 1000;
                p.Write_Point(e.matrixD, 0, -rD);
                p.Command("m");
                p.Write_Point(e.matrixD, rWidth, -rD);
                p.Command("l");
                p.Command("S");
            }
        }
Exemple #8
0
 //----------------------------------------------------------------------------------------------------x
 /// <summary>Creates a new filled rectangle object with a border line and millimeter values.</summary>
 /// <param name="penProp">Pen properties of the border line</param>
 /// <param name="brushProp">Brush properties of the rectangle</param>
 /// <param name="rWidth">Width of the rectangle</param>
 /// <param name="rHeight">Height of the rectangle</param>
 public RepRectMM(PenProp penProp, BrushProp brushProp, Double rWidth, Double rHeight) : base(penProp, brushProp, RT.rPointFromMM(rWidth), RT.rPointFromMM(rHeight))
 {
 }
Exemple #9
0
 //----------------------------------------------------------------------------------------------------x
 /// <summary>Creates a new rectangle object.</summary>
 /// <param name="penProp">Pen properties of the border line</param>
 /// <param name="rWidth">Width of the rectangle</param>
 /// <param name="rHeight">Height of the rectangle</param>
 public RepRect(PenProp penProp, Double rWidth, Double rHeight) : this(penProp, null, rWidth, rHeight)
 {
 }
 //----------------------------------------------------------------------------------------------------x
 /// <summary>Creates a new graphics state object.</summary>
 internal GraphicsState(RepObj repObj, PenProp penProp, BrushProp brushProp)
 {
     _repObj    = repObj;
     _penProp   = penProp;
     _brushProp = brushProp;
 }
Exemple #11
0
 //----------------------------------------------------------------------------------------------------x
 /// <summary>Creates a new line object with millimeter values</summary>
 /// <param name="penProp">Pen properties of the line</param>
 /// <param name="rX">X-coordinate of the end of the line, relative to the start point, in millimeter</param>
 /// <param name="rY">Y-coordinate of the end of the line, relative to the start point, in millimeter</param>
 public RepLineMM(PenProp penProp, Double rX, Double rY) : base(penProp, RT.rPointFromMM(rX), RT.rPointFromMM(rY))
 {
 }
Exemple #12
0
 //----------------------------------------------------------------------------------------------------x
 /// <summary>Creates a new rectangle object.</summary>
 /// <param name="penProp">Pen properties of the border line</param>
 /// <param name="rXPoints">X-coodinate of points, relative to the start point.</param>
 /// <param name="rYPoints">Y-coodinate of points, relative to the start point.</param>
 public RepPoly(PenProp penProp, Double[] rXPoints, Double[] rYPoints)
 {
     graphicsState.penProp = penProp.penProp_Registered;
     this.rWidth           = rWidth;
     this.rHeight          = rHeight;
 }