cocoa: cleanup and reformat some code

git-svn-id: trunk@34422 -
This commit is contained in:
paul 2011-12-26 11:28:08 +00:00
parent e0bf8626c8
commit 8b26db6fb9

View File

@ -1103,9 +1103,8 @@ var
begin
ctx := CheckDC(DC);
Result := Assigned(ctx);
if not Result then Exit;
ctx.LineTo(x,y);
if Result then
ctx.LineTo(X, Y);
end;
function TCocoaWidgetSet.MoveToEx(DC: HDC; X, Y: Integer; OldPoint: PPoint): Boolean;
@ -1114,10 +1113,12 @@ var
begin
ctx := CheckDC(DC);
Result := Assigned(ctx);
if not Result then Exit;
if Assigned(OldPoint) then OldPoint^:=ctx.PenPos;
ctx.MoveTo(x,y);
if Result then
begin
if Assigned(OldPoint) then
OldPoint^ := ctx.PenPos;
ctx.MoveTo(X, Y);
end;
end;
function TCocoaWidgetSet.Polygon(DC: HDC; Points: PPoint; NumPts: Integer; Winding: boolean): boolean;
@ -1126,10 +1127,8 @@ var
begin
ctx := CheckDC(DC);
Result := Assigned(ctx) and Assigned(Points) and (NumPts >= 2);
if not Result then Exit;
if Result then
ctx.Polygon(PPointArray(Points)^, NumPts, Winding);
Result:=True;
end;
function TCocoaWidgetSet.Polyline(DC: HDC; Points: PPoint; NumPts: Integer): boolean;
@ -1138,10 +1137,8 @@ var
begin
ctx := CheckDC(DC);
Result := Assigned(ctx) and Assigned(Points) and (NumPts > 0);
if not Result then Exit;
if Result then
ctx.Polyline(PPointArray(Points)^, NumPts);
Result:=True;
end;
function TCocoaWidgetSet.PostMessage(Handle: HWND; Msg: Cardinal;