fpvectorial: Fix rendering of wmf files in visualtest application.

This commit is contained in:
wp_xyz 2023-01-21 13:48:46 +01:00
parent dd4626b9ea
commit a3e63f4fa4
3 changed files with 9 additions and 4 deletions

View File

@ -4517,7 +4517,7 @@ begin
try
ConvertPathToPolygons(tmpPath, ADestX, ADestY, AMulX, AMulY, polypoints, polystarts);
if (ADest is TCanvas) then
TCanvas(ADest).Polygon(polypoints, WindingRule = vcmNonZeroWindingRule)
TCanvas(ADest).Polygon(polypoints) //, WindingRule = vcmNonZeroWindingRule)
else
ADest.Polygon(polypoints);
finally

View File

@ -291,6 +291,7 @@ begin
ShowWriteReadTestImages;
UpdateCmdStates;
UpdateResultStates;
UpdateTestResults;
end;
procedure TMainForm.PrepareDoc(var ADoc: TvVectorialDocument;
@ -382,6 +383,7 @@ var
w, h: Integer;
fmt: TvVectorialFormat;
rc: TRenderCoords;
factorX, factorY: Double;
begin
fmt := GetFileFormat;
@ -418,11 +420,13 @@ begin
end;
page := doc.GetPageAsVectorial(0);
factorX := w / page.Width;
factorY := h / page.Height;
page.DrawBackground(TPaintbox(Sender).Canvas);
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
page.Render(TPaintbox(Sender).Canvas, 0, h, 1.0, -1.0);
page.Render(TPaintbox(Sender).Canvas, 0, h, factorX, -factorY);
end;
procedure TMainForm.ResultStateChange(Sender: TObject);

View File

@ -197,7 +197,7 @@ begin
Width := 1;
end;
with FCurrBrush do begin
Style := bsSolid;
Style := bsClear; //Solid;
Color := colBlack;
end;
with FCurrFont do begin
@ -814,6 +814,7 @@ var
prevX, prevY: Word;
begin
page := AData.AddPage(not (vrf_UseBottomLeftCoords in Settings.VecReaderFlags));
page.BackgroundColor := colWhite;
while AStream.Position < AStream.Size do begin
// Store the stream position where the current record begins