mirror of
https://github.com/moparisthebest/Simba
synced 2025-03-02 18:31:45 -05:00
CopyClientToBitmap with a specific x,y.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@291 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
d5f1dfe9d7
commit
9afed68b7e
@ -62,7 +62,8 @@ type
|
||||
procedure FastDrawClear(Color : TColor);
|
||||
procedure FastDrawTransparent(x, y: Integer; TargetBitmap: TMufasaBitmap);
|
||||
procedure FastReplaceColor(OldColor, NewColor: TColor);
|
||||
procedure CopyClientToBitmap(MWindow : TObject;Resize : boolean; xs, ys, xe, ye: Integer);
|
||||
procedure CopyClientToBitmap(MWindow : TObject;Resize : boolean; xs, ys, xe, ye: Integer);overload;
|
||||
procedure CopyClientToBitmap(MWindow : TObject;Resize : boolean;x,y : integer; xs, ys, xe, ye: Integer);overload;
|
||||
procedure RotateBitmap(angle: Extended;TargetBitmap : TMufasaBitmap );
|
||||
procedure Desaturate;overload;
|
||||
procedure Desaturate(TargetBitmap : TMufasaBitmap); overload;
|
||||
@ -543,6 +544,24 @@ begin
|
||||
TMWindow(MWindow).FreeReturnData;
|
||||
end;
|
||||
|
||||
procedure TMufasaBitmap.CopyClientToBitmap(MWindow: TObject; Resize: boolean;
|
||||
x, y: integer; xs, ys, xe, ye: Integer);
|
||||
var
|
||||
yy : integer;
|
||||
wi,hi : integer;
|
||||
PtrRet : TRetData;
|
||||
begin
|
||||
if Resize then
|
||||
Self.SetSize(xe-xs+1 + x,ye-ys+1 + y);
|
||||
wi := Min(xe-xs + 1 + x,Self.w);
|
||||
hi := Min(ye-ys + 1 + y,Self.h);
|
||||
PtrRet := TMWindow(MWindow).ReturnData(xs,ys,wi,hi);
|
||||
|
||||
for yy := 0 to (hi-1) do
|
||||
Move(PtrRet.Ptr[yy * (wi + PtrRet.IncPtrWith)], FData[(yy + y) * self.w + x],wi * SizeOf(TRGB32));
|
||||
TMWindow(MWindow).FreeReturnData;
|
||||
end;
|
||||
|
||||
|
||||
function RotatePointEdited(p: TPoint; angle, mx, my: Extended): TPoint;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user