www.pudn.com > DelphiX_for7.zip
To Read all the content
[file head]:
unit DXDraws;
interface
{$INCLUDE DelphiXcfg.inc}
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
DXClass, DIB, DXTexImg, DirectX;
type
{ EDirectDrawError }
EDirectDrawError = class(EDirectXError);
EDirectDrawPaletteError = class(EDirectDrawError);
EDirectDrawClipperError = class(EDirectDrawError);
EDirectDrawSurfaceError = class(EDirectDrawError);
{ TDirectDraw }
TDirectDrawClipper = class;
TDirectDrawPalette = class;
TDirectDrawSurface = class;
TDirectDraw = class(TDirectX)
private
FIDDraw: IDirectDraw;
FIDDraw4: IDirectDraw4;
FIDDraw7: IDirectDraw7;
FDriverCaps: TDDCaps;
FHELCaps: TDDCaps;
FClippers: TList;
FPalettes: TList;
FSurfaces: TList;
function GetClipper(Index: Integer): TDirectDrawClipper;
function GetClipperCount: Integer;
function GetDisplayMode: TDDSurfaceDesc;
function GetIDDraw: IDirectDraw;
function GetIDDraw4: IDirec
... ...
[file tail]:
... ...
SizeDest)*Integer(FDDraw.DriverCaps.dwAlignSizeDest);
end;
{ Color key setting }
if FDDraw.DriverCaps.dwCKeyCaps and DDCKEYCAPS_DESTOVERLAY<>0 then
begin
OverlayFX.dckDestColorkey.dwColorSpaceLowValue := FTargetSurface.ColorMatch(FOverlayColorKey);
OverlayFX.dckDestColorkey.dwColorSpaceHighValue := OverlayFX.dckDestColorkey.dwColorSpaceLowValue;
OverlayFlags := OverlayFlags or (DDOVER_KEYDESTOVERRIDE or DDOVER_DDFX);
end;
FSurface.ISurface.UpdateOverlay(SrcRect, FTargetSurface.ISurface, DestRect, OverlayFlags, OverlayFX);
end;
end;
procedure TDirectDrawOverlay.SetVisible(Value: Boolean);
begin
FVisible := False;
if FSurface<>nil then
begin
if FVisible then
SetOverlayRect(FOverlayRect)
else
FSurface.ISurface.UpdateOverlay(PRect(nil)^, FTargetSurface.ISurface, PRect(nil)^, DDOVER_HIDE, PDDOverlayFX(nil)^);
end;
end;
initialization
finalization
DirectDrawDrivers.Free;
end.