Example #1
0
        public void DrawString(string s, Font2 font, Brush2 brush, float x, float y)
        {
            StringFormat2 format = new StringFormat2 {
                Alignment = StringAlignment2.Near, LineAlignment = StringAlignment2.Near
            };

            DrawString(s, font, brush, new Rectangle2(new Point2(x, y), MeasureString(s, font)), format);
        }
Example #2
0
        internal static void DoPaint(IGraphics g, DataGridView grid)
        {
            Pen2          p            = new Pen2(GraphUtils.ToColor2(grid.GridColor));
            float         x            = grid.Location.X;
            float         y            = grid.Location.Y;
            Brush2        text         = new Brush2(GraphUtils.ToColor2(grid.ColumnHeadersDefaultCellStyle.ForeColor));
            Font2         headerFont   = GraphUtils.ToFont2(grid.ColumnHeadersDefaultCellStyle.Font);
            StringFormat2 headerformat = new StringFormat2 {
                Alignment     = StringAlignment2.Near,
                LineAlignment = StringAlignment2.Center
            };

            for (int c = 0; c < grid.Columns.Count; c++)
            {
                Brush2 header = new Brush2(GraphUtils.ToColor2(grid.Columns[c].HeaderCell.Style.BackColor));
                if (header.Color.IsEmpty || header.Color == Color2.Transparent || header.Color == Color2.Black ||
                    header.Color.Name == "0")
                {
                    header.Color = GraphUtils.ToColor2(grid.ColumnHeadersDefaultCellStyle.BackColor);
                }
                g.FillRectangle(header, x, y, grid.Columns[c].Width, grid.ColumnHeadersHeight);
                g.DrawRectangle(p, x, y, grid.Columns[c].Width, grid.ColumnHeadersHeight);
                g.DrawString(grid.Columns[c].HeaderText, headerFont, text,
                             new Rectangle2(x, y, grid.Columns[c].Width, grid.ColumnHeadersHeight), headerformat);
                x += grid.Columns[c].Width;
            }
            y += grid.ColumnHeadersHeight;
            for (int r = 0; r < grid.Rows.Count; r++)
            {
                x = grid.Location.X;
                for (int c = 0; c < grid.Columns.Count; c++)
                {
                    Color2 backcolor = GetBackColor(grid, r, c);
                    Color2 forecolor = GetForeColor(grid, r, c);
                    if (!backcolor.IsEmpty)
                    {
                        g.FillRectangle(new Brush2(backcolor), x, y, grid.Columns[c].Width, grid.Rows[r].Height);
                    }
                    g.DrawRectangle(p, x, y, grid.Columns[c].Width, grid.Rows[r].Height);
                    object value = grid.Rows[r].Cells[c].Value;
                    if (value != null)
                    {
                        Font2         font       = GraphUtils.ToFont2(grid.DefaultCellStyle.Font);
                        StringFormat2 cellformat = GetStringFormat(grid.Columns[c].DefaultCellStyle.Alignment);
                        string        t          = value.ToString();
                        if (!string.IsNullOrEmpty(grid.Columns[c].DefaultCellStyle.Format))
                        {
                            string format = "{0:" + grid.Columns[c].DefaultCellStyle.Format.ToLower() + "}";
                            t = string.Format(format, value);
                        }
                        g.DrawString(t, font, new Brush2(forecolor), new Rectangle2(x, y, grid.Columns[c].Width, grid.Rows[r].Height),
                                     cellformat);
                    }
                    x += grid.Columns[c].Width;
                }
                y += grid.Rows[r].Height;
            }
        }
Example #3
0
        private static StringFormat2 GetStringFormat(DataGridViewContentAlignment alignment)
        {
            StringFormat2 format = new StringFormat2();

            switch (alignment)
            {
            case DataGridViewContentAlignment.BottomCenter:
                format.Alignment     = StringAlignment2.Center;
                format.LineAlignment = StringAlignment2.Far;
                break;

            case DataGridViewContentAlignment.BottomLeft:
                format.Alignment     = StringAlignment2.Near;
                format.LineAlignment = StringAlignment2.Far;
                break;

            case DataGridViewContentAlignment.BottomRight:
                format.Alignment     = StringAlignment2.Far;
                format.LineAlignment = StringAlignment2.Far;
                break;

            case DataGridViewContentAlignment.MiddleCenter:
                format.Alignment     = StringAlignment2.Center;
                format.LineAlignment = StringAlignment2.Center;
                break;

            case DataGridViewContentAlignment.MiddleLeft:
                format.Alignment     = StringAlignment2.Near;
                format.LineAlignment = StringAlignment2.Center;
                break;

            case DataGridViewContentAlignment.MiddleRight:
                format.Alignment     = StringAlignment2.Far;
                format.LineAlignment = StringAlignment2.Center;
                break;

            case DataGridViewContentAlignment.TopCenter:
                format.Alignment     = StringAlignment2.Center;
                format.LineAlignment = StringAlignment2.Near;
                break;

            case DataGridViewContentAlignment.TopLeft:
                format.Alignment     = StringAlignment2.Near;
                format.LineAlignment = StringAlignment2.Near;
                break;

            case DataGridViewContentAlignment.TopRight:
                format.Alignment     = StringAlignment2.Far;
                format.LineAlignment = StringAlignment2.Near;
                break;

            case DataGridViewContentAlignment.NotSet:
                format.Alignment     = StringAlignment2.Near;
                format.LineAlignment = StringAlignment2.Center;
                break;
            }
            return(format);
        }
Example #4
0
        private static void DoPaint(IGraphics g, TextBox textBox)
        {
            g.FillRectangle(new Brush2(GraphUtils.ToColor2(textBox.BackColor)), textBox.Location.X, textBox.Location.Y,
                            textBox.Width - textBox.Margin.Left - textBox.Margin.Right,
                            textBox.Height - textBox.Margin.Top - textBox.Margin.Bottom);
            Rectangle2    rect   = new Rectangle2(GraphUtils.ToPointF2(textBox.Location), GraphUtils.ToSize2(textBox.Size));
            StringFormat2 format = new StringFormat2 {
                Alignment = StringAlignment2.Near, LineAlignment = StringAlignment2.Near
            };

            g.DrawString(textBox.Text, GraphUtils.ToFont2(textBox.Font), new Brush2(GraphUtils.ToColor2(textBox.ForeColor)), rect, format);
        }
Example #5
0
        private static void DoPaint(IGraphics g, Label label)
        {
            Rectangle2 rect = new Rectangle2(GraphUtils.ToPointF2(label.Location), GraphUtils.ToSizeF2(label.Size));

            g.FillRectangle(new Brush2(GraphUtils.ToColor2(label.BackColor)), rect.X, rect.Y, label.Width - label.Margin.Left - label.Margin.Right,
                            label.Height - label.Margin.Top - label.Margin.Bottom);
            StringFormat2 format = new StringFormat2 {
                Alignment = StringAlignment2.Near, LineAlignment = StringAlignment2.Near
            };

            g.DrawString(label.Text, GraphUtils.ToFont2(label.Font), new Brush2(GraphUtils.ToColor2(label.ForeColor)), rect, format);
        }
Example #6
0
 public static StringFormat ToStringFormat(StringFormat2 format)
 {
     if (format.Vertical)
     {
         return(new StringFormat(StringFormatFlags.DirectionVertical)
         {
             Alignment = ToStringAlignment(format.Alignment),
             LineAlignment = ToStringAlignment(format.LineAlignment)
         });
     }
     return(new StringFormat {
         Alignment = ToStringAlignment(format.Alignment),
         LineAlignment = ToStringAlignment(format.LineAlignment)
     });
 }
Example #7
0
    public static int Main()
    {
        StringFormat2 sf = new StringFormat2();

        TestLibrary.TestFramework.BeginTestCase("for method: String.Format(String, params Object[])");
        if (sf.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
Example #8
0
    public static int Main()
    {
        StringFormat2 sf = new StringFormat2();

        TestLibrary.TestFramework.BeginTestCase("for method: String.Format(String, params Object[])");
        if (sf.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return(100);
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return(0);
        }
    }
Example #9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="text"></param>
        /// <param name="font"></param>
        /// <param name="width"></param>
        /// <param name="format"></param>
        /// <returns></returns>
        public SizeF MeasureString(string text, Font2 font, int width, StringFormat2 format)
        {
            TextFormatFlags flags = new TextFormatFlags();

            if (format != null)
            {
                switch (format.Alignment)
                {
                case StringAlignment2.Center:
                    flags = TextFormatFlags.HorizontalCenter;
                    break;

                case StringAlignment2.Near:
                    flags = TextFormatFlags.Left | TextFormatFlags.Top;
                    break;

                case StringAlignment2.Far:
                    flags = TextFormatFlags.Right | TextFormatFlags.Bottom;
                    break;
                }
            }
            return(TextRenderer.MeasureText(text, GraphUtils.ToFont(font), new Size(width, font.Height), flags));
        }
Example #10
0
 private static void DoPaint(IGraphics g, TextBox textBox)
 {
     g.FillRectangle(new Brush2(GraphUtils.ToColor2(textBox.BackColor)), textBox.Location.X, textBox.Location.Y,
         textBox.Width - textBox.Margin.Left - textBox.Margin.Right,
         textBox.Height - textBox.Margin.Top - textBox.Margin.Bottom);
     Rectangle2 rect = new Rectangle2(GraphUtils.ToPointF2(textBox.Location) , GraphUtils.ToSize2(textBox.Size));
     StringFormat2 format = new StringFormat2{Alignment = StringAlignment2.Near, LineAlignment = StringAlignment2.Near};
     g.DrawString(textBox.Text, GraphUtils.ToFont2(textBox.Font) , new Brush2(GraphUtils.ToColor2(textBox.ForeColor)), rect, format);
 }
Example #11
0
 internal static void DoPaint(IGraphics g, DataGridView grid)
 {
     Pen2 p = new Pen2(GraphUtils.ToColor2(grid.GridColor));
     float x = grid.Location.X;
     float y = grid.Location.Y;
     Brush2 text = new Brush2(GraphUtils.ToColor2(grid.ColumnHeadersDefaultCellStyle.ForeColor));
     Font2 headerFont = GraphUtils.ToFont2(grid.ColumnHeadersDefaultCellStyle.Font) ;
     StringFormat2 headerformat = new StringFormat2{
         Alignment = StringAlignment2.Near,
         LineAlignment = StringAlignment2.Center
     };
     for (int c = 0; c < grid.Columns.Count; c++){
         Brush2 header = new Brush2(GraphUtils.ToColor2(grid.Columns[c].HeaderCell.Style.BackColor));
         if (header.Color.IsEmpty || header.Color == Color2.Transparent || header.Color == Color2.Black ||
             header.Color.Name == "0"){
             header.Color = GraphUtils.ToColor2(grid.ColumnHeadersDefaultCellStyle.BackColor);
         }
         g.FillRectangle(header, x, y, grid.Columns[c].Width, grid.ColumnHeadersHeight);
         g.DrawRectangle(p, x, y, grid.Columns[c].Width, grid.ColumnHeadersHeight);
         g.DrawString(grid.Columns[c].HeaderText, headerFont, text,
             new Rectangle2(x, y, grid.Columns[c].Width, grid.ColumnHeadersHeight), headerformat);
         x += grid.Columns[c].Width;
     }
     y += grid.ColumnHeadersHeight;
     for (int r = 0; r < grid.Rows.Count; r++){
         x = grid.Location.X;
         for (int c = 0; c < grid.Columns.Count; c++){
             Color2 backcolor = GetBackColor(grid, r, c);
             Color2 forecolor = GetForeColor(grid, r, c);
             if (!backcolor.IsEmpty){
                 g.FillRectangle(new Brush2(backcolor), x, y, grid.Columns[c].Width, grid.Rows[r].Height);
             }
             g.DrawRectangle(p, x, y, grid.Columns[c].Width, grid.Rows[r].Height);
             object value = grid.Rows[r].Cells[c].Value;
             if (value != null){
                 Font2 font = GraphUtils.ToFont2(grid.DefaultCellStyle.Font) ;
                 StringFormat2 cellformat = GetStringFormat(grid.Columns[c].DefaultCellStyle.Alignment);
                 string t = value.ToString();
                 if (!string.IsNullOrEmpty(grid.Columns[c].DefaultCellStyle.Format)){
                     string format = "{0:" + grid.Columns[c].DefaultCellStyle.Format.ToLower() + "}";
                     t = string.Format(format, value);
                 }
                 g.DrawString(t, font, new Brush2(forecolor), new Rectangle2(x, y, grid.Columns[c].Width, grid.Rows[r].Height),
                     cellformat);
             }
             x += grid.Columns[c].Width;
         }
         y += grid.Rows[r].Height;
     }
 }
Example #12
0
        public void DrawString(string s, Font2 font, Brush2 brush, Rectangle2 rectangleF, StringFormat2 format)
        {
            template.BeginText();
            SetFont(font);
            SetBrush(brush);
            float x    = rectangleF.X;
            float y    = Math.Max(0, rectangleF.Y - rectangleF.Height / 2);
            Size2 size = MeasureString(s, font);

            if (format != null)
            {
                switch (format.Alignment)
                {
                case StringAlignment2.Center:
                    x = x + (rectangleF.Width - size.Width) / 2f;
                    break;

                case StringAlignment2.Near:
                    x = x + 2;
                    break;

                case StringAlignment2.Far:
                    x = x + (rectangleF.Width - size.Width) - 2;
                    break;
                }
                switch (format.LineAlignment)
                {
                case StringAlignment2.Center:
                    y = y + font.Height / 2f;
                    break;

                case StringAlignment2.Near:
                    y = y + 2;
                    break;

                case StringAlignment2.Far:
                    y = y + font.Height;
                    break;
                }
            }
            template.SetTextMatrix(x, currentHeight - y - font.Height * 0.5f * 1.5f);
            template.ShowText(s.TrimStart().TrimEnd());
            template.EndText();
        }
Example #13
0
 public static StringFormat ToStringFormat(StringFormat2 format)
 {
     if (format.Vertical){
         return new StringFormat(StringFormatFlags.DirectionVertical){
             Alignment = ToStringAlignment(format.Alignment),
             LineAlignment = ToStringAlignment(format.LineAlignment)
         };
     }
     return new StringFormat{
         Alignment = ToStringAlignment(format.Alignment),
         LineAlignment = ToStringAlignment(format.LineAlignment)
     };
 }
Example #14
0
 /// <summary>
 /// Draws the specified text string at the specified location with the specified Brush and Font objects.
 /// </summary>
 /// <param name="s">String to draw.</param>
 /// <param name="font">Font that defines the text format of the string.</param>
 /// <param name="brush">Brush that determines the color and texture of the drawn text.</param>
 /// <param name="rectangleF">System.Drawing.RectangleF structure that specifies the location of the drawn text.</param>
 /// <param name="format">System.Drawing.StringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.</param>
 public void DrawString(string s, Font2 font, Brush2 brush, Rectangle2 rectangleF, StringFormat2 format)
 {
     if (format != null && rectangleF.Width > 0){
         switch (format.Alignment){
             case StringAlignment2.Center:
                 rectangleF.X += (rectangleF.Width - MeasureString(s, font, (int) rectangleF.Width, format).Width)*0.5f;
                 break;
             case StringAlignment2.Far:
                 rectangleF.X += rectangleF.Width - MeasureString(s, font, (int) rectangleF.Width, format).Width;
                 break;
         }
     }
     textList.Add(new Text{
         X = rectangleF.X,
         Y = rectangleF.Y + (font.Height*0.5f),
         FontFamily = font.Name,
         FontSize = font.Size*1.2f,
         FontWeight = font.Bold ? "bold" : "normal",
         Value = s,
         Fill = BrushColor(brush),
         Transform = Transform
     });
 }
Example #15
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="text"></param>
 /// <param name="font"></param>
 /// <param name="width"></param>
 /// <param name="format"></param>
 /// <returns></returns>
 public SizeF MeasureString(string text, Font2 font, int width, StringFormat2 format)
 {
     TextFormatFlags flags = new TextFormatFlags();
     if (format != null){
         switch (format.Alignment){
             case StringAlignment2.Center:
                 flags = TextFormatFlags.HorizontalCenter;
                 break;
             case StringAlignment2.Near:
                 flags = TextFormatFlags.Left | TextFormatFlags.Top;
                 break;
             case StringAlignment2.Far:
                 flags = TextFormatFlags.Right | TextFormatFlags.Bottom;
                 break;
         }
     }
     return TextRenderer.MeasureText(text, GraphUtils.ToFont(font), new Size(width, font.Height), flags);
 }
Example #16
0
 public void DrawString(string s, Font2 font, Brush2 brush, Rectangle2 rectangleF, StringFormat2 format)
 {
     throw new System.NotImplementedException();
 }
Example #17
0
 public void DrawString(string str, Font2 font, Brush2 brush, Point2 point, StringFormat2 format)
 {
     g.DrawString(str, font.Scale(s), brush, point.Scale(s), format);
 }
Example #18
0
 public void DrawString(string str, Font2 font, Brush2 brush, Rectangle2 rectangle, StringFormat2 format)
 {
     g.DrawString(str, font.Scale(s), brush, rectangle.Scale(s), format);
 }
 public void DrawString(string s, Font2 font, Brush2 brush, Point2 point, StringFormat2 format)
 {
     gc.DrawString(s, GraphUtils.ToFont(font), GetBrush(brush), GraphUtils.ToPointF(point),
                   GraphUtils.ToStringFormat(format));
 }
 public void DrawString(string s, Font2 font, Brush2 brush, Rectangle2 rectangleF, StringFormat2 format)
 {
     gc.DrawString(s, GraphUtils.ToFont(font), GetBrush(brush), ToRectangleF(rectangleF),
                   GraphUtils.ToStringFormat(format));
 }
Example #21
0
 private static void DoPaint(IGraphics g, Label label)
 {
     Rectangle2 rect = new Rectangle2(GraphUtils.ToPointF2(label.Location) , GraphUtils.ToSizeF2(label.Size) );
     g.FillRectangle(new Brush2(GraphUtils.ToColor2(label.BackColor)), rect.X, rect.Y, label.Width - label.Margin.Left - label.Margin.Right,
         label.Height - label.Margin.Top - label.Margin.Bottom);
     StringFormat2 format = new StringFormat2{Alignment = StringAlignment2.Near, LineAlignment = StringAlignment2.Near};
     g.DrawString(label.Text, GraphUtils.ToFont2(label.Font), new Brush2(GraphUtils.ToColor2(label.ForeColor)), rect, format);
 }
Example #22
0
 public void DrawString(string s, Font2 font, Brush2 brush, Point2 point, StringFormat2 format)
 {
     DrawString(s, font, brush, new Rectangle2(point, MeasureString(s, font)), format);
 }
Example #23
0
 private static StringFormat2 GetStringFormat(DataGridViewContentAlignment alignment)
 {
     StringFormat2 format = new StringFormat2();
     switch (alignment){
         case DataGridViewContentAlignment.BottomCenter:
             format.Alignment = StringAlignment2.Center;
             format.LineAlignment = StringAlignment2.Far;
             break;
         case DataGridViewContentAlignment.BottomLeft:
             format.Alignment = StringAlignment2.Near;
             format.LineAlignment = StringAlignment2.Far;
             break;
         case DataGridViewContentAlignment.BottomRight:
             format.Alignment = StringAlignment2.Far;
             format.LineAlignment = StringAlignment2.Far;
             break;
         case DataGridViewContentAlignment.MiddleCenter:
             format.Alignment = StringAlignment2.Center;
             format.LineAlignment = StringAlignment2.Center;
             break;
         case DataGridViewContentAlignment.MiddleLeft:
             format.Alignment = StringAlignment2.Near;
             format.LineAlignment = StringAlignment2.Center;
             break;
         case DataGridViewContentAlignment.MiddleRight:
             format.Alignment = StringAlignment2.Far;
             format.LineAlignment = StringAlignment2.Center;
             break;
         case DataGridViewContentAlignment.TopCenter:
             format.Alignment = StringAlignment2.Center;
             format.LineAlignment = StringAlignment2.Near;
             break;
         case DataGridViewContentAlignment.TopLeft:
             format.Alignment = StringAlignment2.Near;
             format.LineAlignment = StringAlignment2.Near;
             break;
         case DataGridViewContentAlignment.TopRight:
             format.Alignment = StringAlignment2.Far;
             format.LineAlignment = StringAlignment2.Near;
             break;
         case DataGridViewContentAlignment.NotSet:
             format.Alignment = StringAlignment2.Near;
             format.LineAlignment = StringAlignment2.Center;
             break;
     }
     return format;
 }
Example #24
0
 public void DrawString(string s, Font2 font, Brush2 brush, Point2 point, StringFormat2 format)
 {
     throw new System.NotImplementedException();
 }
Example #25
0
 public void DrawString(string s, Font2 font, Brush2 brush, Point2 point, StringFormat2 format)
 {
     throw new System.NotImplementedException();
 }
Example #26
0
 public void DrawString(string s, Font2 font, Brush2 brush, float x, float y)
 {
     StringFormat2 format = new StringFormat2{Alignment = StringAlignment2.Near, LineAlignment = StringAlignment2.Near};
     DrawString(s, font, brush, new Rectangle2(new Point2(x, y), MeasureString(s, font)), format);
 }
Example #27
0
 public void DrawString(string s, Font2 font, Brush2 brush, Point2 point, StringFormat2 format)
 {
     DrawString(s, font, brush, new Rectangle2(point, Size2.Empty), format);
 }
Example #28
0
 public void DrawString(string s, Font2 font, Brush2 brush, Point2 point, StringFormat2 format)
 {
     DrawString(s, font, brush, new Rectangle2(point, MeasureString(s, font)), format);
 }
Example #29
0
        /// <summary>
        /// Draws the specified text string at the specified location with the specified Brush and Font objects.
        /// </summary>
        /// <param name="s">String to draw.</param>
        /// <param name="font">Font that defines the text format of the string.</param>
        /// <param name="brush">Brush that determines the color and texture of the drawn text.</param>
        /// <param name="rectangleF">System.Drawing.RectangleF structure that specifies the location of the drawn text.</param>
        /// <param name="format">System.Drawing.StringFormat that specifies formatting attributes, such as line spacing and alignment, that are applied to the drawn text.</param>
        public void DrawString(string s, Font2 font, Brush2 brush, Rectangle2 rectangleF, StringFormat2 format)
        {
            if (format != null && rectangleF.Width > 0)
            {
                switch (format.Alignment)
                {
                case StringAlignment2.Center:
                    rectangleF.X += (rectangleF.Width - MeasureString(s, font, (int)rectangleF.Width, format).Width) * 0.5f;
                    break;

                case StringAlignment2.Far:
                    rectangleF.X += rectangleF.Width - MeasureString(s, font, (int)rectangleF.Width, format).Width;
                    break;
                }
            }
            textList.Add(new Text {
                X          = rectangleF.X,
                Y          = rectangleF.Y + (font.Height * 0.5f),
                FontFamily = font.Name,
                FontSize   = font.Size * 1.2f,
                FontWeight = font.Bold ? "bold" : "normal",
                Value      = s,
                Fill       = BrushColor(brush),
                Transform  = Transform
            });
        }
Example #30
0
 public void DrawString(string s, Font2 font, Brush2 brush, Rectangle2 rectangleF, StringFormat2 format)
 {
     template.BeginText();
     SetFont(font);
     SetBrush(brush);
     float x = rectangleF.X;
     float y = rectangleF.Y - 1;
     Size2 size = MeasureString(s, font);
     if (format != null){
         switch (format.Alignment){
             case StringAlignment2.Center:
                 x = x + (rectangleF.Width - size.Width)/2f;
                 break;
             case StringAlignment2.Near:
                 x = x + 2;
                 break;
             case StringAlignment2.Far:
                 x = x + (rectangleF.Width - size.Width) - 2;
                 break;
         }
         switch (format.LineAlignment){
             case StringAlignment2.Center:
                 y = y + font.Height/2f;
                 break;
             case StringAlignment2.Near:
                 y = y + 2;
                 break;
             case StringAlignment2.Far:
                 y = y + font.Height;
                 break;
         }
     }
     template.SetTextMatrix(x, currentHeight - y - (font.Height*0.5f*1.5f));
     template.ShowText(s.TrimStart().TrimEnd());
     template.EndText();
 }
Example #31
0
 public void DrawString(string s, Font2 font, Brush2 brush, Point2 point, StringFormat2 format)
 {
     DrawString(s, font, brush, new Rectangle2(point, Size2.Empty), format);
 }
Example #32
0
 public void DrawString(string s, Font2 font, Brush2 brush, Rectangle2 rectangleF, StringFormat2 format)
 {
     throw new System.NotImplementedException();
 }