Jump to content

Problem with text tool in my paint


Recommended Posts

Hello! I’m writing my graphics editor. Now I’m on stage of realization text tool. I use TextBox control and I ran into problem, namely, if I redraw textBox.Text on bitmap then this text is drawn at the wrong place. It is shifted slightly depending on the font. Here is a piece of code:
var g = Graphics.FromImage(bitmap);
g.DrawString(textBox.Text, textBox.Font, new SolidBrush(textBox.ForeColor), textBox.Location);
Could you tell me how to solve this problem? In order to have text drawn at the same place. By the way, which control for text do you use in your Paint.NET?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...