mirror of
https://github.com/opensim/opensim.git
synced 2026-05-14 18:55:39 +08:00
change GetDrawStringSize so result better matchs rendering size
This commit is contained in:
@@ -125,11 +125,10 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||
using (Font myFont = new Font(fontName, fontSize))
|
||||
{
|
||||
SizeF stringSize = new SizeF();
|
||||
|
||||
// XXX: This lock may be unnecessary.
|
||||
lock (m_graph)
|
||||
{
|
||||
stringSize = m_graph.MeasureString(text, myFont);
|
||||
stringSize = m_graph.MeasureString(text, myFont, text.Length, StringFormat.GenericTypographic);
|
||||
xSize = stringSize.Width;
|
||||
ySize = stringSize.Height;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user