@@ -10436,7 +10436,7 @@ function CenterPoint(const Rect: TRect): TPoint;
10436
10436
function EnumEMFFunc (DC: HDC; var Table: THandleTable; R: PEnhMetaRecord;
10437
10437
NumObjects: DWord; E: TPdfEnum): LongBool; stdcall;
10438
10438
var
10439
- i: integer ;
10439
+ i: PtrInt ;
10440
10440
InitTransX: XForm;
10441
10441
polytypes: PByteArray;
10442
10442
begin
@@ -10975,37 +10975,29 @@ function EnumEMFFunc(DC: HDC; var Table: THandleTable; R: PEnhMetaRecord;
10975
10975
with PEMRBitBlt(R)^ do // only handle RGB bitmaps (no palette)
10976
10976
if (offBmiSrc <> 0 ) and
10977
10977
(offBitsSrc <> 0 ) then
10978
- begin
10979
10978
E.DrawBitmap(xSrc, ySrc, cxDest, cyDest, xDest, yDest,
10980
10979
cxDest, cyDest, iUsageSrc, pointer(PtrUInt(R) + offBmiSrc),
10981
- pointer(PtrUInt(R) + offBitsSrc), @PEMRBitBlt(R)^.rclBounds,
10982
- @PEMRBitBlt(R)^.xformSrc, PEMRBitBlt(R)^.dwRop);
10983
- end
10980
+ pointer(PtrUInt(R) + offBitsSrc), @rclBounds, @xformSrc, dwRop)
10984
10981
else
10985
- case PEMRBitBlt(R)^. dwRop of // we only handle PATCOPY = fillrect
10982
+ case dwRop of // we only handle PATCOPY = fillrect
10986
10983
PATCOPY:
10987
- with PEMRBitBlt(R)^ do
10988
- E.FillRectangle(Rect(xDest, yDest,
10989
- xDest + cxDest, yDest + cyDest), true);
10984
+ E.FillRectangle(Rect(xDest, yDest,
10985
+ xDest + cxDest, yDest + cyDest), true);
10990
10986
end ;
10991
10987
end ;
10992
10988
EMR_STRETCHBLT:
10993
10989
begin
10994
10990
with PEMRStretchBlt(R)^ do // only handle RGB bitmaps (no palette)
10995
10991
if (offBmiSrc <> 0 ) and
10996
10992
(offBitsSrc <> 0 ) then
10997
- begin
10998
10993
E.DrawBitmap(xSrc, ySrc, cxSrc, cySrc, xDest, yDest, cxDest,
10999
10994
cyDest, iUsageSrc, pointer(PtrUInt(R) + offBmiSrc),
11000
- pointer(PtrUInt(R) + offBitsSrc), @PEMRStretchBlt(R)^.rclBounds,
11001
- @PEMRStretchBlt(R)^.xformSrc, PEMRStretchBlt(R)^.dwRop);
11002
- end
10995
+ pointer(PtrUInt(R) + offBitsSrc), @rclBounds, @xformSrc, dwRop)
11003
10996
else
11004
- case PEMRStretchBlt(R)^. dwRop of // we only handle PATCOPY = fillrect
10997
+ case dwRop of // we only handle PATCOPY = fillrect
11005
10998
PATCOPY:
11006
- with PEMRStretchBlt(R)^ do
11007
- E.FillRectangle(Rect(
11008
- xDest, yDest, xDest + cxDest, yDest + cyDest), true);
10999
+ E.FillRectangle(Rect(
11000
+ xDest, yDest, xDest + cxDest, yDest + cyDest), true);
11009
11001
end ;
11010
11002
end ;
11011
11003
EMR_STRETCHDIBITS:
@@ -11018,26 +11010,37 @@ function EnumEMFFunc(DC: HDC; var Table: THandleTable; R: PEnhMetaRecord;
11018
11010
bmiHeader.biHeight := -bmiHeader.biHeight;
11019
11011
E.DrawBitmap(xSrc, ySrc, cxSrc, cySrc, xDest, yDest, cxDest, cyDest,
11020
11012
iUsageSrc, pointer(PtrUInt(R) + offBmiSrc),
11021
- pointer(PtrUInt(R) + offBitsSrc), @PEMRStretchDIBits(R)^.rclBounds,
11022
- nil , PEMRStretchDIBits(R)^.dwRop);
11013
+ pointer(PtrUInt(R) + offBitsSrc), @rclBounds, nil , dwRop);
11023
11014
end ;
11024
11015
EMR_TRANSPARENTBLT:
11025
11016
with PEMRTransparentBLT(R)^ do // only handle RGB bitmaps (no palette)
11026
11017
if (offBmiSrc <> 0 ) and
11027
11018
(offBitsSrc <> 0 ) then
11028
11019
E.DrawBitmap(xSrc, ySrc, cxSrc, cySrc, xDest, yDest, cxDest, cyDest,
11029
11020
iUsageSrc, pointer(PtrUInt(R) + offBmiSrc),
11030
- pointer(PtrUInt(R) + offBitsSrc), @PEMRTransparentBLT(R)^.rclBounds,
11031
- @PEMRTransparentBLT(R)^.xformSrc, SRCCOPY,
11032
- PEMRTransparentBLT(R)^.dwRop); // dwRop stores the transparent color
11021
+ pointer(PtrUInt(R) + offBitsSrc), @rclBounds, @xformSrc, SRCCOPY,
11022
+ dwRop); // dwRop stores the transparent color
11023
+ EMR_ALPHABLEND:
11024
+ with PEMRAlphaBlend(R)^ do // only handle RGB bitmaps (no palette nor transparency)
11025
+ if (offBmiSrc <> 0 ) and
11026
+ (offBitsSrc <> 0 ) then
11027
+ E.DrawBitmap (xSrc, ySrc, cxSrc, cySrc, xDest, yDest, cxDest, cyDest,
11028
+ iUsageSrc, pointer(PtrUInt(R) + offBmiSrc), pointer(
11029
+ PtrUInt(R) + offBitsSrc), @rclBounds, @xformSrc, SRCCOPY, dwRop)
11030
+ else
11031
+ case dwRop of // we only handle PATCOPY = fillrect
11032
+ PATCOPY:
11033
+ E.FillRectangle(Rect(xDest, yDest,
11034
+ xDest + cxDest, yDest + cyDest), true);
11035
+ end ;
11033
11036
EMR_GDICOMMENT:
11034
- with PEMRGDICOMMENT (R)^ do
11037
+ with PEMRGDIComment (R)^ do
11035
11038
if cbData >= 1 then
11036
11039
E.HandleComment(
11037
11040
TPdfGdiComment(Data[0 ]), PAnsiChar(@Data) + 1 , cbData - 1 );
11038
11041
EMR_MODIFYWORLDTRANSFORM:
11039
11042
with PEMRModifyWorldTransform(R)^ do
11040
- E.ScaleMatrix(@PEMRModifyWorldTransform(R)^. xform, iMode);
11043
+ E.ScaleMatrix(@xform, iMode);
11041
11044
EMR_EXTCREATEPEN: // approx. - fast solution
11042
11045
with PEMRExtCreatePen(R)^ do
11043
11046
if ihPen - 1 < cardinal(length(E.Obj)) then
0 commit comments