From ee0b433bd12812995e1effb0d0696f27b29f25ec Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Sun, 4 Aug 2013 12:59:55 +0000 Subject: [PATCH] fpvectorial: Fixes a bug in the TvRasterImage drawer, it was using the image real size instead of desired size, and a minor workaround in svg: Now wmtboc finally renders more or less ok in both EPS and SVG git-svn-id: trunk@42321 - --- components/fpvectorial/fpvectorial.pas | 4 ++-- components/fpvectorial/svgvectorialreader.pas | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/fpvectorial/fpvectorial.pas b/components/fpvectorial/fpvectorial.pas index 40c96bfa9b..44eb1cb94d 100644 --- a/components/fpvectorial/fpvectorial.pas +++ b/components/fpvectorial/fpvectorial.pas @@ -3225,9 +3225,9 @@ begin //TCanvas(ADest).Draw(lFinalX, lFinalY, lBitmap); // with stretch support - lFinalW := Round(RasterImage.Width * AMulX); + lFinalW := Round(Width * AMulX); if lFinalW < 0 then lFinalW := lFinalW * -1; - lFinalH := Round(RasterImage.Height * AMulY); + lFinalH := Round(Height * AMulY); if lFinalH < 0 then lFinalH := lFinalH * -1; TCanvas(ADest).StretchDraw(Bounds(lFinalX, lFinalY, lFinalW, lFinalH), lBitmap); finally diff --git a/components/fpvectorial/svgvectorialreader.pas b/components/fpvectorial/svgvectorialreader.pas index e6de9b596a..2f7d6485bb 100644 --- a/components/fpvectorial/svgvectorialreader.pas +++ b/components/fpvectorial/svgvectorialreader.pas @@ -1431,7 +1431,9 @@ begin lImage.X := lImage.X + lTransformX; lImage.Y := lImage.Y + lTransformY; lImage.Width := lImage.Width * lTransformW; - lImage.Height := lImage.Height * lTransformW; + lImage.Height := lImage.Height * lTransformH; + // Strange hack: No idea why it works ... but helped wmtboc + lImage.X := lImage.X - lImage.Width; // Apply the layer style ApplyLayerStyles(lImage);