Equation Editor interface support
This commit is contained in:
@@ -874,6 +874,25 @@ namespace Volian.Controls.Library
|
||||
pft.dySpaceBefore = spaceBefore * 1440 / dpi;
|
||||
SetParaFormat(richTextBox, pft);
|
||||
}
|
||||
//developed for equation editor interface work, but ended up not needing it. Kept it in
|
||||
// case it is needed in the future.
|
||||
//public static void SetSpaceAfter(RichTextBox richTextBox, int spaceAfter)
|
||||
//{
|
||||
// ParaFormatTwo pft = GetParaFormat(richTextBox);
|
||||
// pft.dwMask = 0;
|
||||
// pft.dwMask |= ParaFormatMasks.PFM_SPACEAFTER;
|
||||
// // get the monitor's resolution in DPI and use it to set the linespacing value for
|
||||
// // the richtextbox. Note that without this, the Arial Unicode font made the appearance of
|
||||
// // almost double linespacing. Using PFS_Exact makes it appear as regular single spacing.
|
||||
// Graphics g = richTextBox.CreateGraphics();
|
||||
// int dpi = Convert.ToInt32((g.DpiX + g.DpiY) / 2);
|
||||
// g.Dispose();
|
||||
// // dyLineSpacing is Spacing between lines. the PFS_EXACT sets line spacing as the spacing from one
|
||||
// //line to the next, in twips - thus the 1440.
|
||||
|
||||
// pft.dySpaceAfter = spaceAfter * 1440 / dpi;
|
||||
// SetParaFormat(richTextBox, pft);
|
||||
//}
|
||||
public static void SetLineSpacing(RichTextBox richTextBox, ParaSpacing type)
|
||||
{
|
||||
ParaFormatTwo pft = GetParaFormat(richTextBox);
|
||||
|
Reference in New Issue
Block a user