mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 15:19:29 +02:00
fpvectorial: Fix rendering of wmf files in visualtest application.
This commit is contained in:
parent
dd4626b9ea
commit
a3e63f4fa4
@ -4517,7 +4517,7 @@ begin
|
|||||||
try
|
try
|
||||||
ConvertPathToPolygons(tmpPath, ADestX, ADestY, AMulX, AMulY, polypoints, polystarts);
|
ConvertPathToPolygons(tmpPath, ADestX, ADestY, AMulX, AMulY, polypoints, polystarts);
|
||||||
if (ADest is TCanvas) then
|
if (ADest is TCanvas) then
|
||||||
TCanvas(ADest).Polygon(polypoints, WindingRule = vcmNonZeroWindingRule)
|
TCanvas(ADest).Polygon(polypoints) //, WindingRule = vcmNonZeroWindingRule)
|
||||||
else
|
else
|
||||||
ADest.Polygon(polypoints);
|
ADest.Polygon(polypoints);
|
||||||
finally
|
finally
|
||||||
|
@ -291,6 +291,7 @@ begin
|
|||||||
ShowWriteReadTestImages;
|
ShowWriteReadTestImages;
|
||||||
UpdateCmdStates;
|
UpdateCmdStates;
|
||||||
UpdateResultStates;
|
UpdateResultStates;
|
||||||
|
UpdateTestResults;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.PrepareDoc(var ADoc: TvVectorialDocument;
|
procedure TMainForm.PrepareDoc(var ADoc: TvVectorialDocument;
|
||||||
@ -382,6 +383,7 @@ var
|
|||||||
w, h: Integer;
|
w, h: Integer;
|
||||||
fmt: TvVectorialFormat;
|
fmt: TvVectorialFormat;
|
||||||
rc: TRenderCoords;
|
rc: TRenderCoords;
|
||||||
|
factorX, factorY: Double;
|
||||||
begin
|
begin
|
||||||
fmt := GetFileFormat;
|
fmt := GetFileFormat;
|
||||||
|
|
||||||
@ -418,11 +420,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
page := doc.GetPageAsVectorial(0);
|
page := doc.GetPageAsVectorial(0);
|
||||||
|
factorX := w / page.Width;
|
||||||
|
factorY := h / page.Height;
|
||||||
page.DrawBackground(TPaintbox(Sender).Canvas);
|
page.DrawBackground(TPaintbox(Sender).Canvas);
|
||||||
if page.UseTopLeftCoordinates then
|
if page.UseTopLeftCoordinates then
|
||||||
page.Render(TPaintbox(Sender).Canvas, 0, 0, 1.0, 1.0)
|
page.Render(TPaintbox(Sender).Canvas, 0, 0, factorX, factorY)
|
||||||
else
|
else
|
||||||
page.Render(TPaintbox(Sender).Canvas, 0, h, 1.0, -1.0);
|
page.Render(TPaintbox(Sender).Canvas, 0, h, factorX, -factorY);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.ResultStateChange(Sender: TObject);
|
procedure TMainForm.ResultStateChange(Sender: TObject);
|
||||||
|
@ -197,7 +197,7 @@ begin
|
|||||||
Width := 1;
|
Width := 1;
|
||||||
end;
|
end;
|
||||||
with FCurrBrush do begin
|
with FCurrBrush do begin
|
||||||
Style := bsSolid;
|
Style := bsClear; //Solid;
|
||||||
Color := colBlack;
|
Color := colBlack;
|
||||||
end;
|
end;
|
||||||
with FCurrFont do begin
|
with FCurrFont do begin
|
||||||
@ -814,6 +814,7 @@ var
|
|||||||
prevX, prevY: Word;
|
prevX, prevY: Word;
|
||||||
begin
|
begin
|
||||||
page := AData.AddPage(not (vrf_UseBottomLeftCoords in Settings.VecReaderFlags));
|
page := AData.AddPage(not (vrf_UseBottomLeftCoords in Settings.VecReaderFlags));
|
||||||
|
page.BackgroundColor := colWhite;
|
||||||
|
|
||||||
while AStream.Position < AStream.Size do begin
|
while AStream.Position < AStream.Size do begin
|
||||||
// Store the stream position where the current record begins
|
// Store the stream position where the current record begins
|
||||||
|
Loading…
Reference in New Issue
Block a user