예제 #1
0
        public override void DrawTextRun(Win32DCSafeHandle hdc, FontCache fontCache, ReportTextBox textBox, AspNetCore.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 (!this.IsEmf)
                {
                    AspNetCore.ReportingServices.Rendering.RichText.TextBox.DrawTextRun(run, hdc, fontCache, x, baselineY2, underline);
                }
                else
                {
                    AspNetCore.ReportingServices.Rendering.RichText.TextBox.ExtDrawTextRun(run, hdc, fontCache, x, baselineY2, underline);
                }
            }
        }
예제 #2
0
 public 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)
 {
 }