* Add workaround to Carbon bug 18211 (PaintStruct not initialized)

* Add a dummy AlphaBlend function to Carbon interface

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1402 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2010-12-13 21:13:33 +00:00
parent a45264e1f0
commit 50ab47a69f
2 changed files with 29 additions and 1 deletions

View File

@ -16444,10 +16444,15 @@ begin
if tsVCLDragging in FStates then
ImageList_DragShowNolock(False);
{$endif}
//todo: workaround to bug 18211. Remove when fixed.
{$ifndef LCLCarbon}
if csPaintCopy in ControlState then
FUpdateRect := ClientRect
else
FUpdateRect:=Message.PaintStruct^.rcPaint;
FUpdateRect := Message.PaintStruct^.rcPaint;
{$else}
FUpdateRect := ClientRect;
{$endif}
{$ifdef DEBUG_VTV}Logger.Send([lcPaint],'FUpdateRect', FUpdateRect);{$endif}

View File

@ -0,0 +1,23 @@
//todo: properly implement
procedure AlphaBlend(Source, Destination: HDC; const R: TRect; const Target: TPoint; Mode: TBlendMode; ConstantAlpha, Bias: Integer);
begin
case Mode of
bmConstantAlpha,
bmPerPixelAlpha,
bmMasterAlpha,
bmConstantAlphaAndColor:
begin
BitBlt(Destination, Target.X, Target.Y, R.Right - R.Left, R.Bottom - R.Top, Source, R.Left, R.Right, SRCCOPY);
end;
end;
end;
function CalculateScanline(Bits: Pointer; Width, Height, Row: Integer): Pointer;
begin
Result := nil;
end;
function GetBitmapBitsFromBitmap(Bitmap: HBITMAP): Pointer;
begin
Result := nil;
end;