mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 08:19:53 +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');
 | 
			
		||||
  NewBytesPerLine:=GetBytesPerLine(Width,BitsPerPixel,NewLineEnd);
 | 
			
		||||
  NewSize:=NewBytesPerLine*PtrUInt(Height);
 | 
			
		||||
  //DebugLn(['ReAlignRawImageLines OldBytesPerLine=',OldBytesPerLine,' NewBytesPerLine=',NewBytesPerLine]);
 | 
			
		||||
  
 | 
			
		||||
  // enlarge before
 | 
			
		||||
  if OldSize<NewSize then
 | 
			
		||||
 | 
			
		||||
@ -101,10 +101,10 @@ var
 | 
			
		||||
  SrcDC: hDC;
 | 
			
		||||
  DestDC: hDC;
 | 
			
		||||
begin
 | 
			
		||||
  if (DestRect.Left>=Width) or (DestRect.Right<=0)
 | 
			
		||||
  or (DestRect.Top>=Height) or (DestRect.Bottom<=0)
 | 
			
		||||
  or (DestRect.Right<=DestRect.Left) or (DestRect.Bottom<=DestRect.Top)
 | 
			
		||||
  or (Width=0) or (Height=0) then exit;
 | 
			
		||||
  if (DestRect.Right<=DestRect.Left) or (DestRect.Bottom<=DestRect.Top)
 | 
			
		||||
  or (Width=0) or (Height=0) then begin
 | 
			
		||||
    exit;
 | 
			
		||||
  end;
 | 
			
		||||
  HandleNeeded;
 | 
			
		||||
  if HandleAllocated then begin
 | 
			
		||||
    if Transparent then
 | 
			
		||||
 | 
			
		||||
@ -1165,9 +1165,17 @@ var
 | 
			
		||||
        --+#+---+|          ---+|
 | 
			
		||||
        ---------+      --------+
 | 
			
		||||
    }
 | 
			
		||||
    var
 | 
			
		||||
      SideNode: TLazDockConfigNode;
 | 
			
		||||
    begin
 | 
			
		||||
      // TODO
 | 
			
		||||
      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;
 | 
			
		||||
    
 | 
			
		||||
    function HasSpiralSplitter: boolean;
 | 
			
		||||
@ -1294,13 +1302,14 @@ function TCustomLazDockingManager.ConfigIsCompatible(
 | 
			
		||||
        exit(false);
 | 
			
		||||
      end;
 | 
			
		||||
      if Sibling=Node.Parent then
 | 
			
		||||
        exit(true);
 | 
			
		||||
        exit(true); // anchored to parent: ok
 | 
			
		||||
      if (a in [akLeft,akRight]) and (Sibling.TheType=ldcntSplitterLeftRight)
 | 
			
		||||
      then
 | 
			
		||||
        exit(true);
 | 
			
		||||
        exit(true); // left/right side anchored to a left/right splitter: ok
 | 
			
		||||
      if (a in [akTop,akBottom]) and (Sibling.TheType=ldcntSplitterUpDown)
 | 
			
		||||
      then
 | 
			
		||||
        exit(true);
 | 
			
		||||
        exit(true); // top/bottom side anchored to a up/down splitter: ok
 | 
			
		||||
      // otherwise: not ok
 | 
			
		||||
      Error('Node.Sides[a] invalid');
 | 
			
		||||
      Result:=false;
 | 
			
		||||
    end;
 | 
			
		||||
@ -1364,6 +1373,16 @@ function TCustomLazDockingManager.ConfigIsCompatible(
 | 
			
		||||
    i: Integer;
 | 
			
		||||
  begin
 | 
			
		||||
    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
 | 
			
		||||
    ldcntControl:
 | 
			
		||||
      begin
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user