This commit is contained in:
parent
bfcd9ce1db
commit
6a07348e04
@ -144,7 +144,7 @@ namespace Volian.Print.Library
|
|||||||
float yRuler = 612;
|
float yRuler = 612;
|
||||||
cb.MoveTo(0, yRuler);
|
cb.MoveTo(0, yRuler);
|
||||||
cb.LineTo(612, yRuler);
|
cb.LineTo(612, yRuler);
|
||||||
for (float x1 = 0; x1 < 612; x1 += 6) // tic marks every 1/8 inch
|
for (float x1 = 0; x1 < 612; x1 += 6) // tic marks every 1/12 inch
|
||||||
{
|
{
|
||||||
if (x1 % 72 == 0)
|
if (x1 % 72 == 0)
|
||||||
{
|
{
|
||||||
@ -159,6 +159,24 @@ namespace Volian.Print.Library
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
cb.MoveTo(x1, yRuler-5);
|
cb.MoveTo(x1, yRuler-5);
|
||||||
|
cb.LineTo(x1, yRuler);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (float x1 = 0; x1 < 612; x1 += 7.2f) // tic marks every 1/10 inch
|
||||||
|
{
|
||||||
|
if (x1 % 72 == 0)
|
||||||
|
{
|
||||||
|
cb.MoveTo(x1, yRuler);
|
||||||
|
cb.LineTo(x1, yRuler + 20);
|
||||||
|
}
|
||||||
|
else if (x1 % 36 == 0)
|
||||||
|
{
|
||||||
|
cb.MoveTo(x1, yRuler);
|
||||||
|
cb.LineTo(x1, yRuler + 10);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cb.MoveTo(x1, yRuler);
|
||||||
cb.LineTo(x1, yRuler + 5);
|
cb.LineTo(x1, yRuler + 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -551,12 +569,12 @@ namespace Volian.Print.Library
|
|||||||
case "{!cpllogo}":
|
case "{!cpllogo}":
|
||||||
AddImage(svgGroup, 10f, 10f, 78.7f, 29.8f, "cpllogo.bmp");
|
AddImage(svgGroup, 10f, 10f, 78.7f, 29.8f, "cpllogo.bmp");
|
||||||
break;
|
break;
|
||||||
case "{!domlogo}":
|
//case "{!domlogo}":
|
||||||
AddImage(svgGroup, 10f, 70f, 123f, 40.1f, "domlogo.bmp");
|
// AddImage(svgGroup, 10f, 70f, 123f, 40.1f, "domlogo.bmp");
|
||||||
break;
|
// break;
|
||||||
case "{!gpclogo}":
|
//case "{!gpclogo}":
|
||||||
AddImage(svgGroup, 10f, 150f, 35.2f, 35.8f, "gpclogo.bmp");
|
// AddImage(svgGroup, 10f, 150f, 35.2f, 35.8f, "gpclogo.bmp");
|
||||||
break;
|
// break;
|
||||||
case "{HEADER1}":
|
case "{HEADER1}":
|
||||||
case "{HEADER2}":
|
case "{HEADER2}":
|
||||||
case "{HEADER3}":
|
case "{HEADER3}":
|
||||||
@ -632,6 +650,15 @@ namespace Volian.Print.Library
|
|||||||
case "{UNITTEXT}":
|
case "{UNITTEXT}":
|
||||||
svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token,MySection.MyDocVersion.DocVersionConfig.Unit_Text)));
|
svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token,MySection.MyDocVersion.DocVersionConfig.Unit_Text)));
|
||||||
break;
|
break;
|
||||||
|
case "{CHKOFFHEADING}":
|
||||||
|
int sindx = section.CheckOffHeadingIndex();
|
||||||
|
// -1 flags no entires in the format's CheckOffHeaderList & 0 flags the first entry
|
||||||
|
// which is always '{NO HEADING}".
|
||||||
|
if (sindx > 0)
|
||||||
|
{
|
||||||
|
svgGroup.Add(PageItemToSvgText(pageItem, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].CheckOffHeading, section.ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList[sindx].Font));
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// see if it's a PSI token:
|
// see if it's a PSI token:
|
||||||
if (token.Contains(@"PS-"))
|
if (token.Contains(@"PS-"))
|
||||||
@ -853,6 +880,12 @@ namespace Volian.Print.Library
|
|||||||
svgUse.Y = new SvgMeasurement((float)(pageItem.Row ?? 0), E_MeasurementUnits.PT);
|
svgUse.Y = new SvgMeasurement((float)(pageItem.Row ?? 0), E_MeasurementUnits.PT);
|
||||||
return svgUse;
|
return svgUse;
|
||||||
}
|
}
|
||||||
|
private static SvgText PageItemToSvgText(VEPROMS.CSLA.Library.PageItem pageItem, string text, VE_Font font)
|
||||||
|
{
|
||||||
|
SvgText svgText = PageItemToSvgText(pageItem, text);
|
||||||
|
svgText.Font = font.WindowsFont;
|
||||||
|
return svgText;
|
||||||
|
}
|
||||||
private static SvgText PageItemToSvgText(VEPROMS.CSLA.Library.PageItem pageItem, string text)
|
private static SvgText PageItemToSvgText(VEPROMS.CSLA.Library.PageItem pageItem, string text)
|
||||||
{
|
{
|
||||||
SvgText svgText = new SvgText();
|
SvgText svgText = new SvgText();
|
||||||
@ -865,8 +898,9 @@ namespace Volian.Print.Library
|
|||||||
else
|
else
|
||||||
svgText.Justify = SvgJustify.Center;
|
svgText.Justify = SvgJustify.Center;
|
||||||
svgText.Font = pageItem.Font.WindowsFont;
|
svgText.Font = pageItem.Font.WindowsFont;
|
||||||
svgText.X = new SvgMeasurement((float)(pageItem.Col), E_MeasurementUnits.PT);
|
float row = (float)pageItem.Row < 0 ? -(float)pageItem.Row : (float)pageItem.Row;
|
||||||
svgText.Y = new SvgMeasurement((float)(pageItem.Row ?? 0), E_MeasurementUnits.PT);
|
svgText.X = new SvgMeasurement((float)(pageItem.Col ?? 0), E_MeasurementUnits.PT);
|
||||||
|
svgText.Y = new SvgMeasurement(row, E_MeasurementUnits.PT);
|
||||||
if (svgText.Font.Underline && svgText.Text.EndsWith(" ")) svgText.Text = svgText.Text.Substring(0, svgText.Text.Length - 1) + "\xA0";// replace last space with a hardspace
|
if (svgText.Font.Underline && svgText.Text.EndsWith(" ")) svgText.Text = svgText.Text.Substring(0, svgText.Text.Length - 1) + "\xA0";// replace last space with a hardspace
|
||||||
return svgText;
|
return svgText;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user