Added getDRoUsagesByROIDsAndVersions and getRoUsagesByROIDsAndVersions to speed-up RO Value Update process.
Added logic to speed up RO Value Update Process. Added logic to keep SvgImages from failing if the ImagePath is null.
This commit is contained in:
@@ -421,6 +421,7 @@ namespace Volian.Svg.Library
|
||||
}
|
||||
public partial class SvgImage : SvgPart
|
||||
{
|
||||
private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
public override void Draw(PdfContentByte cb, SvgScale scale, Svg mySvg, SvgPartInheritance myParent)
|
||||
{
|
||||
SetupInheritance(myParent.MyInheritedSettings);
|
||||
@@ -442,10 +443,20 @@ namespace Volian.Svg.Library
|
||||
{
|
||||
SetupInheritance(myParent.MyInheritedSettings);
|
||||
tmp.SaveState();
|
||||
iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance(ImagePath);
|
||||
img.ScaleAbsolute(scale.M(Width), scale.M(Height));
|
||||
img.SetAbsolutePosition(scale.X(X), scale.Y(Y) - scale.M(img.ScaledHeight));
|
||||
tmp.AddImage(img);
|
||||
try
|
||||
{
|
||||
if (ImagePath != null)
|
||||
{
|
||||
iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance(ImagePath);
|
||||
img.ScaleAbsolute(scale.M(Width), scale.M(Height));
|
||||
img.SetAbsolutePosition(scale.X(X), scale.Y(Y) - scale.M(img.ScaledHeight));
|
||||
tmp.AddImage(img);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//_MyLog.WarnFormat("SvgImage.Draw '{0}' {1} - {2}", ImagePath, ex.GetType().Name, ex.Message);
|
||||
}
|
||||
tmp.RestoreState();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user