Ejemplo n.º 1
0
 internal virtual void DrawTextRun(Win32DCSafeHandle hdc, FontCache fontCache, ReportTextBox textBox, TextRun run, TypeCode typeCode, RPLFormat.TextAlignments textAlign, RPLFormat.VerticalAlignments verticalAlign, RPLFormat.WritingModes writingMode, RPLFormat.Directions direction, Point position, Rectangle layoutRectangle, int lineHeight, int baselineY)
 {
 }
Ejemplo n.º 2
0
        internal override void DrawTextRun(Win32DCSafeHandle hdc, FontCache fontCache, ReportTextBox textBox, Microsoft.ReportingServices.Rendering.RichText.TextRun run, TypeCode typeCode, RPLFormat.TextAlignments textAlign, RPLFormat.VerticalAlignments verticalAlign, RPLFormat.WritingModes writingMode, RPLFormat.Directions direction, Point pointPosition, System.Drawing.Rectangle layoutRectangle, int lineHeight, int baselineY)
        {
            if (!string.IsNullOrEmpty(run.Text))
            {
                int x;
                int baselineY2;
                switch (writingMode)
                {
                case RPLFormat.WritingModes.Horizontal:
                    x          = layoutRectangle.X + pointPosition.X;
                    baselineY2 = layoutRectangle.Y + baselineY;
                    break;

                case RPLFormat.WritingModes.Vertical:
                    x          = layoutRectangle.X + (layoutRectangle.Width - baselineY);
                    baselineY2 = layoutRectangle.Y + pointPosition.X;
                    break;

                case RPLFormat.WritingModes.Rotate270:
                    x          = layoutRectangle.X + baselineY;
                    baselineY2 = layoutRectangle.Y + layoutRectangle.Height - pointPosition.X;
                    break;

                default:
                    throw new NotSupportedException();
                }
                Underline underline = null;
                if (run.UnderlineHeight > 0)
                {
                    underline = new Underline(run, hdc, fontCache, layoutRectangle, pointPosition.X, baselineY, writingMode);
                }
                if (!IsEmf)
                {
                    Microsoft.ReportingServices.Rendering.RichText.TextBox.DrawTextRun(run, hdc, fontCache, x, baselineY2, underline);
                }
                else
                {
                    Microsoft.ReportingServices.Rendering.RichText.TextBox.ExtDrawTextRun(run, hdc, fontCache, x, baselineY2, underline);
                }
            }
        }