K
kynos
I would like to paint a box using DrawString, standard Unicode
characters (box drawings characters) and monospaced font.
Unfortunately for some fonts painted lines contain a break.
Example code, in whom one can see the error:
private void Form1_Paint (object sender, PaintEventArgs e)
(
Font font = new Font ( "Courier New", 9);
e.Graphics.DrawString (new String ( '\u2500', 200),
font,
new SolidBrush (Color.Red), new PointF (0, 0),
StringFormat.GenericTypographic);
)
I must use DrawString, not the DrawLine etc. fuctions.
Does anybody knows how paint lines via the DrawString, so that did not
have the breaks?
characters (box drawings characters) and monospaced font.
Unfortunately for some fonts painted lines contain a break.
Example code, in whom one can see the error:
private void Form1_Paint (object sender, PaintEventArgs e)
(
Font font = new Font ( "Courier New", 9);
e.Graphics.DrawString (new String ( '\u2500', 200),
font,
new SolidBrush (Color.Red), new PointF (0, 0),
StringFormat.GenericTypographic);
)
I must use DrawString, not the DrawLine etc. fuctions.
Does anybody knows how paint lines via the DrawString, so that did not
have the breaks?