示例#1
0
        ////////////////////////////////////////////////////////////////////
        // constructor
        ////////////////////////////////////////////////////////////////////

        internal CharInfo
        (
            Int32 CharCode,
            Int32 GlyphIndex,
            FontApi DC
        )
        {
            // save char code and glyph index
            this.CharCode      = CharCode;
            this.GlyphIndex    = GlyphIndex;
            this.NewGlyphIndex = -1;
            Type0Font          = CharCode >= 256 || GlyphIndex == 0;

            // Bounding Box
            Int32 BBoxWidth  = DC.ReadInt32();
            Int32 BBoxHeight = DC.ReadInt32();

            DesignBBoxLeft   = DC.ReadInt32();
            DesignBBoxTop    = DC.ReadInt32();
            DesignBBoxRight  = DesignBBoxLeft + BBoxWidth;
            DesignBBoxBottom = DesignBBoxTop - BBoxHeight;

            // glyph advance horizontal and vertical
            DesignWidth = DC.ReadInt16();
            //DesignHeight = DC.ReadInt16();
            return;
        }
示例#2
0
        internal BoundingBox
        (
            FontApi DC
        )
        {
            // empty box
            Rect = new PdfRectangle();

            // save width in right
            Rect.Right = DC.WindowsToPdf(DC.ReadInt32());

            // save height
            Double Height = DC.WindowsToPdf(DC.ReadInt32());

            // left
            Rect.Left = DC.WindowsToPdf(DC.ReadInt32());

            // top
            Rect.Top = DC.WindowsToPdf(DC.ReadInt32());

            // adjust right = left + width
            Rect.Right += Rect.Left;

            // adjust bottom = top - height
            Rect.Bottom = Rect.Top - Height;

            // get advanced width
            Width = DC.WindowsToPdf(DC.ReadInt16());
            return;
        }