This commit is contained in:
		| @@ -461,8 +461,16 @@ namespace Volian.Svg.Library | |||||||
| 				cb.SetColorStroke(new Color(LineColor)); | 				cb.SetColorStroke(new Color(LineColor)); | ||||||
| 			} | 			} | ||||||
| 			cb.SetLineCap(PdfContentByte.LINE_CAP_ROUND); | 			cb.SetLineCap(PdfContentByte.LINE_CAP_ROUND); | ||||||
| 			cb.MoveTo(scale.X(X1), scale.Y(cb, Y1)); | 			if (myParent is SvgGroup && (myParent as SvgGroup).Description.ToUpper() == "ABSOLUTE") | ||||||
| 			cb.LineTo(scale.X(X2), scale.Y(cb, Y2)); | 			{ | ||||||
|  | 				cb.MoveTo(scale.AbsX(X1), scale.AbsY(cb, Y1)); | ||||||
|  | 				cb.LineTo(scale.AbsX(X2), scale.AbsY(cb, Y2)); | ||||||
|  | 			} | ||||||
|  | 			else | ||||||
|  | 			{ | ||||||
|  | 				cb.MoveTo(scale.X(X1), scale.Y(cb, Y1)); | ||||||
|  | 				cb.LineTo(scale.X(X2), scale.Y(cb, Y2)); | ||||||
|  | 			} | ||||||
| 			cb.Stroke(); | 			cb.Stroke(); | ||||||
| 			cb.RestoreState(); | 			cb.RestoreState(); | ||||||
| 		} | 		} | ||||||
| @@ -511,7 +519,10 @@ namespace Volian.Svg.Library | |||||||
| 				cb.SetLineWidth(scale.M(OutlineWidth)); | 				cb.SetLineWidth(scale.M(OutlineWidth)); | ||||||
| 				cb.SetColorStroke(new Color(OutlineColor)); | 				cb.SetColorStroke(new Color(OutlineColor)); | ||||||
| 			} | 			} | ||||||
| 			cb.Rectangle(scale.X(X), scale.Y(cb, Y), scale.M(Width), -scale.M(Height)); | 			if (myParent is SvgGroup && (myParent as SvgGroup).Description.ToUpper() == "ABSOLUTE") | ||||||
|  | 				cb.Rectangle(scale.AbsX(X), scale.AbsY(cb, Y), scale.M(Width), -scale.M(Height)); | ||||||
|  | 			else | ||||||
|  | 				cb.Rectangle(scale.X(X), scale.Y(cb, Y), scale.M(Width), -scale.M(Height)); | ||||||
| 			SvgITextLibrary.StrokeAndFill(cb, stroke, fill); | 			SvgITextLibrary.StrokeAndFill(cb, stroke, fill); | ||||||
| 			cb.RestoreState(); | 			cb.RestoreState(); | ||||||
| 		} | 		} | ||||||
| @@ -574,7 +585,7 @@ namespace Volian.Svg.Library | |||||||
| 			string text = mySvg.OnProcessText(Text, this, scale); | 			string text = mySvg.OnProcessText(Text, this, scale); | ||||||
| 			if (text == string.Empty) return; | 			if (text == string.Empty) return; | ||||||
| 			SetupInheritance(myParent.MyInheritedSettings); | 			SetupInheritance(myParent.MyInheritedSettings); | ||||||
| 			float yScale = scale.Y(cb, Y); | 			float yScale = (myParent is SvgGroup && (myParent as SvgGroup).Description.ToUpper() == "ABSOLUTE") ? scale.AbsY(cb, Y): scale.Y(cb, Y); | ||||||
| 			cb.SaveState(); | 			cb.SaveState(); | ||||||
| 			bool fill = FillColor != System.Drawing.Color.Transparent; | 			bool fill = FillColor != System.Drawing.Color.Transparent; | ||||||
| 			bool stroke = OutlineWidth.Value != 0F && OutlineColor != System.Drawing.Color.Empty; | 			bool stroke = OutlineWidth.Value != 0F && OutlineColor != System.Drawing.Color.Empty; | ||||||
| @@ -591,7 +602,7 @@ namespace Volian.Svg.Library | |||||||
|  |  | ||||||
| 			Phrase ph = BuildPhrase(text, fontSize, fontStyle, font); | 			Phrase ph = BuildPhrase(text, fontSize, fontStyle, font); | ||||||
| 			ColumnText ct = new ColumnText(cb); | 			ColumnText ct = new ColumnText(cb); | ||||||
| 			float x = scale.X(X); | 			float x = (myParent is SvgGroup && (myParent as SvgGroup).Description.ToUpper() == "ABSOLUTE") ? scale.AbsX(X): scale.X(X); | ||||||
| 			float w = 0; // chk.GetWidthPoint(); | 			float w = 0; // chk.GetWidthPoint(); | ||||||
| 			foreach (Chunk chk in ph.Chunks) | 			foreach (Chunk chk in ph.Chunks) | ||||||
| 				w += chk.GetWidthPoint(); | 				w += chk.GetWidthPoint(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user