This commit is contained in:
@@ -33,7 +33,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
return (float)_TabAlign * _CharsToTwips;
|
||||
return (float)_TabAlign * MyFont.CharsToTwips;
|
||||
}
|
||||
}
|
||||
private float? _TabOffset;
|
||||
@@ -48,19 +48,40 @@ namespace Volian.Print.Library
|
||||
while (Text[(int)_TabOffset] == ' ')
|
||||
_TabOffset++;
|
||||
}
|
||||
return (float)_TabOffset * _CharsToTwips;
|
||||
return (float)_TabOffset * MyFont.CharsToTwips;
|
||||
}
|
||||
}
|
||||
public vlnTab(PdfContentByte cb, vlnParagraph myparent, string origTab, string cleanTab, float xoffset, float yoffset, VE_Font vFont)
|
||||
private vlnMacro _MyMacro;
|
||||
public vlnMacro MyMacro
|
||||
{
|
||||
get { return _MyMacro; }
|
||||
set { _MyMacro = value; }
|
||||
}
|
||||
|
||||
public vlnTab(PdfContentByte cb, vlnParagraph myparent, string origTab, string cleanTab, float xoffset, float yoffset, VE_Font vFont, bool doSectTab)
|
||||
{
|
||||
MyContentByte = cb;
|
||||
MyParent = myparent;
|
||||
YOffset = yoffset;
|
||||
Text = cleanTab;
|
||||
Width = _CharsToTwips * Text.Length;
|
||||
Rtf = GetRtf(origTab, vFont);
|
||||
XOffset = xoffset - Width;
|
||||
MyFont = vFont;
|
||||
Width = MyFont.CharsToTwips * (Text != null ? Text.Length : origTab.Length);
|
||||
if (origTab.Contains(@"{!"))
|
||||
{
|
||||
int mindx = origTab.IndexOf(@"{!");
|
||||
int meindx = origTab.IndexOf(@"}", mindx);
|
||||
string macro = origTab.Substring(mindx, meindx - mindx+1);
|
||||
MyMacro = new vlnMacro(xoffset - Width, yoffset, macro.Substring(2, macro.Length - 3));
|
||||
origTab = origTab.Replace(macro,"");
|
||||
}
|
||||
Rtf = GetRtf(origTab, vFont);
|
||||
// do positioning based on whether format has locations for section 'header'. If it's not centered, treat
|
||||
// it's location more like a 'tab'.
|
||||
if (doSectTab)
|
||||
XOffset = xoffset;
|
||||
else
|
||||
XOffset = xoffset - Width;
|
||||
|
||||
}
|
||||
public override float ToPdf(PdfContentByte cb, float yPageStart, float yTopMargin, float yBottomMargin)
|
||||
{
|
||||
|
Reference in New Issue
Block a user