This commit is contained in:
2010-07-22 14:22:53 +00:00
parent 458b3b4d63
commit 843677822d
5 changed files with 53 additions and 282 deletions

View File

@@ -523,7 +523,8 @@ namespace Volian.Svg.Library
cb.SaveState();
bool fill = FillColor != System.Drawing.Color.Transparent;
bool stroke = OutlineWidth.Value != 0F && OutlineColor != System.Drawing.Color.Empty;
iTextSharp.text.Font font = FontFactory.GetFont(Font.Name, scale.M(new SvgMeasurement(Font.SizeInPoints, E_MeasurementUnits.PT)));
int fontStyle = (Font.Bold ? iTextSharp.text.Font.BOLD : 0) + (Font.Italic ? iTextSharp.text.Font.ITALIC : 0);
iTextSharp.text.Font font = FontFactory.GetFont(Font.Name, scale.M(new SvgMeasurement(Font.SizeInPoints, E_MeasurementUnits.PT)), fontStyle);
ColumnText ct = new ColumnText(cb);
Chunk chk = new Chunk(text, font);
float x = scale.X(X);
@@ -647,7 +648,7 @@ namespace Volian.Svg.Library
public string Watermark
{
get { return _Watermark; }
set { _Watermark = value.ToUpper()=="NONE"?"":value; }
set { _Watermark = value; }
}
private int _CurrentPageNumber = 0;
public int CurrentPageNumber
@@ -746,7 +747,7 @@ namespace Volian.Svg.Library
}
private void DrawWatermark(PdfContentByte cb)
{
if (Watermark.ToLower() == "(none)" || Watermark == "") return;
if (Watermark.ToLower().Contains("none") || Watermark == "") return;
cb.SaveState();
if (_WatermarkLayer != null) cb.BeginLayer(_WatermarkLayer);
SvgWatermark myWatermark = new SvgWatermark(cb, Watermark, System.Drawing.Color.Blue, .15F);