This commit is contained in:
Kathy Ruffing 2011-11-21 17:01:22 +00:00
parent bfcd9ce1db
commit 6a07348e04

View File

@ -144,7 +144,7 @@ namespace Volian.Print.Library
float yRuler = 612;
cb.MoveTo(0, 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)
{
@ -159,7 +159,25 @@ namespace Volian.Print.Library
else
{
cb.MoveTo(x1, yRuler-5);
cb.LineTo(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.MoveTo(122.4F, 0); //WCN2 HLS
@ -551,12 +569,12 @@ namespace Volian.Print.Library
case "{!cpllogo}":
AddImage(svgGroup, 10f, 10f, 78.7f, 29.8f, "cpllogo.bmp");
break;
case "{!domlogo}":
AddImage(svgGroup, 10f, 70f, 123f, 40.1f, "domlogo.bmp");
break;
case "{!gpclogo}":
AddImage(svgGroup, 10f, 150f, 35.2f, 35.8f, "gpclogo.bmp");
break;
//case "{!domlogo}":
// AddImage(svgGroup, 10f, 70f, 123f, 40.1f, "domlogo.bmp");
// break;
//case "{!gpclogo}":
// AddImage(svgGroup, 10f, 150f, 35.2f, 35.8f, "gpclogo.bmp");
// break;
case "{HEADER1}":
case "{HEADER2}":
case "{HEADER3}":
@ -632,6 +650,15 @@ namespace Volian.Print.Library
case "{UNITTEXT}":
svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token,MySection.MyDocVersion.DocVersionConfig.Unit_Text)));
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:
// see if it's a PSI token:
if (token.Contains(@"PS-"))
@ -853,6 +880,12 @@ namespace Volian.Print.Library
svgUse.Y = new SvgMeasurement((float)(pageItem.Row ?? 0), E_MeasurementUnits.PT);
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)
{
SvgText svgText = new SvgText();
@ -865,8 +898,9 @@ namespace Volian.Print.Library
else
svgText.Justify = SvgJustify.Center;
svgText.Font = pageItem.Font.WindowsFont;
svgText.X = new SvgMeasurement((float)(pageItem.Col), E_MeasurementUnits.PT);
svgText.Y = new SvgMeasurement((float)(pageItem.Row ?? 0), E_MeasurementUnits.PT);
float row = (float)pageItem.Row < 0 ? -(float)pageItem.Row : (float)pageItem.Row;
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
return svgText;
}