fpvectorial: Fix wmfreader not passing background color to fpvectorial

git-svn-id: trunk@52805 -
This commit is contained in:
wp 2016-08-14 09:14:46 +00:00
parent e9cab2159d
commit eb894b68ae

View File

@ -54,7 +54,6 @@ type
FCurrTextAlign: Word; FCurrTextAlign: Word;
FCurrPolyFillMode: Word; FCurrPolyFillMode: Word;
FCurrRawFontHeight: Integer; FCurrRawFontHeight: Integer;
FBkColor: TFPColor;
FMapMode: Word; FMapMode: Word;
FWindowOrigin: TPoint; FWindowOrigin: TPoint;
FWindowExtent: TPoint; FWindowExtent: TPoint;
@ -74,7 +73,7 @@ type
function CreateRegion(const AParams: TParamArray): Integer; function CreateRegion(const AParams: TParamArray): Integer;
procedure DeleteObj(const AParams: TParamArray); procedure DeleteObj(const AParams: TParamArray);
procedure ReadArc(APage: TvVectorialpage; const AParams: TParamArray); procedure ReadArc(APage: TvVectorialpage; const AParams: TParamArray);
procedure ReadBkColor(const AParams: TParamArray); procedure ReadBkColor(APage: TvVectorialPage; const AParams: TParamArray);
procedure ReadChord(APage: TvVectorialpage; const AParams: TParamArray); procedure ReadChord(APage: TvVectorialpage; const AParams: TParamArray);
function ReadColor(const AParams: TParamArray; AIndex: Integer): TFPColor; function ReadColor(const AParams: TParamArray; AIndex: Integer): TFPColor;
procedure ReadExtTextOut(APage: TvVectorialPage; const AParams: TParamArray); procedure ReadExtTextOut(APage: TvVectorialPage; const AParams: TParamArray);
@ -204,7 +203,6 @@ begin
FCurrTextColor := colBlack; FCurrTextColor := colBlack;
FCurrTextAlign := 0; // Left + Top FCurrTextAlign := 0; // Left + Top
FCurrPolyFillMode := ALTERNATE; FCurrPolyFillMode := ALTERNATE;
FBkColor := colWhite;
FMapMode := MM_ANISOTROPIC; FMapMode := MM_ANISOTROPIC;
FUnitsPerInch := 96; FUnitsPerInch := 96;
end; end;
@ -412,9 +410,10 @@ begin
path.Pen := FCurrPen; path.Pen := FCurrPen;
end; end;
procedure TvWMFVectorialReader.ReadBkColor(const AParams: TParamArray); procedure TvWMFVectorialReader.ReadBkColor(APage: TvVectorialPage;
const AParams: TParamArray);
begin begin
FBkColor := ReadColor(AParams, 0); APage.BackgroundColor := ReadColor(AParams, 0);
end; end;
procedure TvWMFVectorialReader.ReadChord(APage: TvVectorialPage; procedure TvWMFVectorialReader.ReadChord(APage: TvVectorialPage;
@ -867,7 +866,7 @@ begin
META_SCALEWINDOWEXT: META_SCALEWINDOWEXT:
; ;
META_SETBKCOLOR: META_SETBKCOLOR:
ReadBkColor(params); ReadBkColor(page, params);
META_SETBKMODE: META_SETBKMODE:
; ;
META_SETLAYOUT: META_SETLAYOUT: