mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-05 02:59:31 +01:00
fixed TBitmap.Draw
git-svn-id: trunk@9645 -
This commit is contained in:
parent
5e215f3b4a
commit
ed55bb0c94
@ -780,6 +780,7 @@ begin
|
|||||||
RaiseGDBException('ReAlignRawImageLines OldSize<>Size');
|
RaiseGDBException('ReAlignRawImageLines OldSize<>Size');
|
||||||
NewBytesPerLine:=GetBytesPerLine(Width,BitsPerPixel,NewLineEnd);
|
NewBytesPerLine:=GetBytesPerLine(Width,BitsPerPixel,NewLineEnd);
|
||||||
NewSize:=NewBytesPerLine*PtrUInt(Height);
|
NewSize:=NewBytesPerLine*PtrUInt(Height);
|
||||||
|
//DebugLn(['ReAlignRawImageLines OldBytesPerLine=',OldBytesPerLine,' NewBytesPerLine=',NewBytesPerLine]);
|
||||||
|
|
||||||
// enlarge before
|
// enlarge before
|
||||||
if OldSize<NewSize then
|
if OldSize<NewSize then
|
||||||
|
|||||||
@ -101,10 +101,10 @@ var
|
|||||||
SrcDC: hDC;
|
SrcDC: hDC;
|
||||||
DestDC: hDC;
|
DestDC: hDC;
|
||||||
begin
|
begin
|
||||||
if (DestRect.Left>=Width) or (DestRect.Right<=0)
|
if (DestRect.Right<=DestRect.Left) or (DestRect.Bottom<=DestRect.Top)
|
||||||
or (DestRect.Top>=Height) or (DestRect.Bottom<=0)
|
or (Width=0) or (Height=0) then begin
|
||||||
or (DestRect.Right<=DestRect.Left) or (DestRect.Bottom<=DestRect.Top)
|
exit;
|
||||||
or (Width=0) or (Height=0) then exit;
|
end;
|
||||||
HandleNeeded;
|
HandleNeeded;
|
||||||
if HandleAllocated then begin
|
if HandleAllocated then begin
|
||||||
if Transparent then
|
if Transparent then
|
||||||
|
|||||||
@ -1165,9 +1165,17 @@ var
|
|||||||
--+#+---+| ---+|
|
--+#+---+| ---+|
|
||||||
---------+ --------+
|
---------+ --------+
|
||||||
}
|
}
|
||||||
|
var
|
||||||
|
SideNode: TLazDockConfigNode;
|
||||||
begin
|
begin
|
||||||
// TODO
|
|
||||||
Result:=false;
|
Result:=false;
|
||||||
|
SideNode:=FindNode(DeletingNode.Sides[Side]);
|
||||||
|
if (SideNode=nil) then exit;
|
||||||
|
if not (SideNode.TheType in [ldcntSplitterLeftRight,ldcntSplitterUpDown])
|
||||||
|
then exit;
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function HasSpiralSplitter: boolean;
|
function HasSpiralSplitter: boolean;
|
||||||
@ -1294,13 +1302,14 @@ function TCustomLazDockingManager.ConfigIsCompatible(
|
|||||||
exit(false);
|
exit(false);
|
||||||
end;
|
end;
|
||||||
if Sibling=Node.Parent then
|
if Sibling=Node.Parent then
|
||||||
exit(true);
|
exit(true); // anchored to parent: ok
|
||||||
if (a in [akLeft,akRight]) and (Sibling.TheType=ldcntSplitterLeftRight)
|
if (a in [akLeft,akRight]) and (Sibling.TheType=ldcntSplitterLeftRight)
|
||||||
then
|
then
|
||||||
exit(true);
|
exit(true); // left/right side anchored to a left/right splitter: ok
|
||||||
if (a in [akTop,akBottom]) and (Sibling.TheType=ldcntSplitterUpDown)
|
if (a in [akTop,akBottom]) and (Sibling.TheType=ldcntSplitterUpDown)
|
||||||
then
|
then
|
||||||
exit(true);
|
exit(true); // top/bottom side anchored to a up/down splitter: ok
|
||||||
|
// otherwise: not ok
|
||||||
Error('Node.Sides[a] invalid');
|
Error('Node.Sides[a] invalid');
|
||||||
Result:=false;
|
Result:=false;
|
||||||
end;
|
end;
|
||||||
@ -1364,6 +1373,16 @@ function TCustomLazDockingManager.ConfigIsCompatible(
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
|
|
||||||
|
for a:=Low(TAnchorKind) to High(TAnchorKind) do begin
|
||||||
|
if Node.Sides[a]<>'' then begin
|
||||||
|
if RootNode.FindByName(Node.Sides[a],true)=nil then begin
|
||||||
|
Error('invalid Node.Sides[a]');
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
case Node.TheType of
|
case Node.TheType of
|
||||||
ldcntControl:
|
ldcntControl:
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user