This commit is contained in:
@@ -79,6 +79,18 @@ namespace Volian.Svg.Library
|
||||
{
|
||||
return _Scale * (y - YLowerLimit);
|
||||
}
|
||||
public float AbsX(SvgMeasurement x)
|
||||
{
|
||||
return x.GetSizeInPixels(DPI) + Svg.AbsoluteOffset.X;
|
||||
}
|
||||
public float AbsY(iTextSharp.text.pdf.PdfContentByte cb, SvgMeasurement y)
|
||||
{
|
||||
// the following line of code is 'taken' from the 16bit code: \promsnt\exe\wined\togdi.cpp
|
||||
// whenever doing an 'Absolute' macro.
|
||||
float yOffset = 54 * 4.8f + 0.5f; // yOffset starts in 'twips' (twip = 1/20 point)
|
||||
yOffset = yOffset / 20; // convert from twips to points (point = 1/72 inch)
|
||||
return cb.PdfDocument.PageSize.Height - y.GetSizeInPixels(DPI) + yOffset + Svg.AbsoluteOffset.Y;
|
||||
}
|
||||
public float Y(iTextSharp.text.pdf.PdfContentByte cb, float y)
|
||||
{
|
||||
return cb.PdfDocument.PageSize.Height - _Scale * (y - YLowerLimit);
|
||||
|
Reference in New Issue
Block a user