Пример #1
0
        void RenderArea(FormattedTextArea area, Rectangle rect)
        {
            if (area == null)
            {
                return;
            }

            TextArea textArea = area.TextArea;

            FillFormatRenderer fillFormatRenderer = new FillFormatRenderer((FillFormat)textArea.GetValue("FillFormat", GV.ReadOnly), _gfx);

            fillFormatRenderer.Render(rect.X, rect.Y, rect.Width, rect.Height);

            XUnit top = rect.Y;

            top += textArea.TopPadding;
            XUnit bottom = rect.Y + rect.Height;

            bottom -= textArea.BottomPadding;
            top     = AlignVertically(textArea.VerticalAlignment, top, bottom, area.ContentHeight);

            XUnit left = rect.X;

            left += textArea.LeftPadding;

            RenderInfo[] renderInfos = area.GetRenderInfos();
            RenderByInfos(left, top, renderInfos);

            LineFormatRenderer lineFormatRenderer = new LineFormatRenderer((LineFormat)textArea.GetValue("LineFormat", GV.ReadOnly), _gfx);

            lineFormatRenderer.Render(rect.X, rect.Y, rect.Width, rect.Height);
        }
Пример #2
0
 internal ShapeRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
     : base(gfx, renderInfo, fieldInfos)
 {
     this.shape = (Shape)renderInfo.DocumentObject;
       LineFormat lf = (LineFormat)this.shape.GetValue("LineFormat", GV.ReadOnly);
       this.lineFormatRenderer = new LineFormatRenderer(lf, gfx);
       FillFormat ff = (FillFormat)this.shape.GetValue("FillFormat", GV.ReadOnly);
       this.fillFormatRenderer = new FillFormatRenderer(ff, gfx);
 }
Пример #3
0
        internal ShapeRenderer(XGraphics gfx, RenderInfo renderInfo, FieldInfos fieldInfos)
            : base(gfx, renderInfo, fieldInfos)
        {
            _shape = (Shape)renderInfo.DocumentObject;
            LineFormat lf = (LineFormat)_shape.GetValue("LineFormat", GV.ReadOnly);

            _lineFormatRenderer = new LineFormatRenderer(lf, gfx);
            FillFormat ff = (FillFormat)_shape.GetValue("FillFormat", GV.ReadOnly);

            _fillFormatRenderer = new FillFormatRenderer(ff, gfx);
        }
Пример #4
0
        void RenderArea(FormattedTextArea area, Rectangle rect)
        {
            if (area == null)
                return;

            TextArea textArea = area.TextArea;

            FillFormatRenderer fillFormatRenderer = new FillFormatRenderer((FillFormat)textArea.GetValue("FillFormat", GV.ReadOnly), _gfx);
            fillFormatRenderer.Render(rect.X, rect.Y, rect.Width, rect.Height);

            XUnit top = rect.Y;
            top += textArea.TopPadding;
            XUnit bottom = rect.Y + rect.Height;
            bottom -= textArea.BottomPadding;
            top = AlignVertically(textArea.VerticalAlignment, top, bottom, area.ContentHeight);

            XUnit left = rect.X;
            left += textArea.LeftPadding;

            RenderInfo[] renderInfos = area.GetRenderInfos();
            RenderByInfos(left, top, renderInfos);

            LineFormatRenderer lineFormatRenderer = new LineFormatRenderer((LineFormat)textArea.GetValue("LineFormat", GV.ReadOnly), _gfx);
            lineFormatRenderer.Render(rect.X, rect.Y, rect.Width, rect.Height);
        }