BitBlt in cocoa behaves differnt than with the win32 and carbon widgetset
Original Reporter info from Mantis: accSone
-
Reporter name:
Original Reporter info from Mantis: accSone
- Reporter name:
Description:
Cocoa does stretching in SRCCOPY rop, carbon and win32 not
Steps to reproduce:
Try following code. compile it under carbon and cocoa. See the different stretchings and origin positions
procedure TForm1.FormPaint(Sender: TObject);
var bmBuff:TBitMap;
begin
bmBuff:=TBitMap.Create;
bmBuff.Width:=100;
bmBuff.Height:=100;
bmBuff.Canvas.Brush.Color := clgreen;
bmBuff.Canvas.FillRect(types.rect(0,0,width,height));
bmBuff.Canvas.Brush.Color := clred;
bmBuff.Canvas.FillRect(types.rect(10,25,50,75));
bmBuff.Canvas.Brush.Color := clyellow;
bmBuff.Canvas.FillRect(types.rect(10,75,50,95));
BitBlt(Canvas.Handle,10,10,350,450,bmBuff.Canvas.Handle,10,24,SRCCOPY);
end;
Additional information:
Find attached the fix at least for SRCCOPY rop. Other modes still might work different.
Mantis conversion info:
- Mantis ID: 25336
- OS: OSX
- OS Build: 10.6.8
- Platform: darwin x86_64
- Version: 1.3 (SVN)
- Fixed in version: 1.4
- Fixed in revision: 43468 (#99e8e0f4)