From a8eea538c7b3824879824245bc432678a4a692fa Mon Sep 17 00:00:00 2001 From: Wizzup? Date: Thu, 25 Feb 2010 23:53:31 +0000 Subject: [PATCH] FindDTMRotated git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@553 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- trunk/Units/MMLCore/finder.pas | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/trunk/Units/MMLCore/finder.pas b/trunk/Units/MMLCore/finder.pas index f966f8d..5570545 100644 --- a/trunk/Units/MMLCore/finder.pas +++ b/trunk/Units/MMLCore/finder.pas @@ -2012,8 +2012,17 @@ end; function TMFinder.FindDTMRotated(DTM: pDTM; out x, y: Integer; x1, y1, x2, y2: Integer; sAngle, eAngle, aStep: Extended; out aFound: Extended): Boolean; +var + P: TPointArray; + F: T2DExtendedArray; begin - raise Exception.CreateFmt('Not done yet!', []); + FindDTMsRotated(dtm, P, x1, y1, x2, y2, sAngle, eAngle, aStep, F, 1); + if Length(P) = 0 then + exit(false); + aFound := F[0][0]; + x := P[0].x; + y := P[0].y; + Exit(True); end; function TMFinder.FindDTMsRotated(_DTM: pDTM; out Points: TPointArray; x1, y1, x2, y2: Integer; sAngle, eAngle, aStep: Extended; out aFound: T2DExtendedArray; maxToFind: Integer): Boolean;