From 23e518f531f28a477d0a105627829eb3abad2d27 Mon Sep 17 00:00:00 2001 From: Cohen Adair Date: Fri, 12 Aug 2011 00:39:54 -0400 Subject: [PATCH 1/6] MML: Changed PointToBox parameters to be more clear --- Units/MMLAddon/PSInc/Wrappers/math.inc | 10 +++++----- Units/MMLAddon/PSInc/psexportedmethods.inc | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Units/MMLAddon/PSInc/Wrappers/math.inc b/Units/MMLAddon/PSInc/Wrappers/math.inc index 67ec9ca..f257bee 100644 --- a/Units/MMLAddon/PSInc/Wrappers/math.inc +++ b/Units/MMLAddon/PSInc/Wrappers/math.inc @@ -172,12 +172,12 @@ begin; result := (((x >= Box.x1) and(x <= Box.x2)) and ((y >= box.y1) and (y <= box.y2))); end; -function ps_PointToBox(PT1,PT2 : TPoint) : TBox; extdecl; +function ps_PointToBox(topLeft,bottomRight: TPoint): TBox; extdecl; begin; - result.x1 := PT1.x; - result.y1 := PT1.y; - result.x2 := PT2.x; - result.y2 := PT2.y; + result.x1 := topLeft.x; + result.y1 := topLeft.y; + result.x2 := bottomRight.x; + result.y2 := bottomRight.y; end; function ps_PointInBox(PT : TPoint; Box: TBox): Boolean; extdecl; diff --git a/Units/MMLAddon/PSInc/psexportedmethods.inc b/Units/MMLAddon/PSInc/psexportedmethods.inc index 42b7b3c..3cdedd5 100644 --- a/Units/MMLAddon/PSInc/psexportedmethods.inc +++ b/Units/MMLAddon/PSInc/psexportedmethods.inc @@ -69,7 +69,7 @@ AddFunction(@ps_iAbs,'function iAbs(a : integer) : integer;'); AddFunction(@ps_ArcTan2,'function ArcTan2(y,x : extended) : extended;'); AddFunction(@ps_IntToBox,'function IntToBox(xs,ys,xe,ye : integer) : TBox;'); AddFunction(@ps_IntInBox,'function IntInBox(x, y: Integer; Box: TBox): Boolean;'); -AddFunction(@ps_PointToBox,'function PointToBox(PT1,PT2 : TPoint): TBox;'); +AddFunction(@ps_PointToBox,'function PointToBox(topLeft,bottomRight: TPoint): TBox;'); AddFunction(@ps_PointInBox,'function PointInBox(PT : TPoint; Box: TBox): Boolean;'); AddFunction(@ps_sqr,'function Sqr(e : extended) : extended;'); AddFunction(@ps_point,'function Point(x,y:integer) : TPoint;'); From 41e580273c0f8f08482e9bbdccaf22568b41d781 Mon Sep 17 00:00:00 2001 From: Thomas Augood Date: Mon, 15 Aug 2011 20:09:14 +0200 Subject: [PATCH 2/6] Add initial TPA documentation. Squashed commit of the following: commit 489e0f1fa95fc73f7754700200636839015ffdf7 Author: Merlijn Wajer Date: Mon Aug 15 20:08:39 2011 +0200 TPA: Remove notes. commit 1417e3e27653a6722c5b58b8f71a5c81fad1cbb2 Merge: 9602559 ae099c2 Author: Merlijn Wajer Date: Mon Aug 15 19:55:48 2011 +0200 Merge remote branch 'shuttleu/master' into doc commit ae099c2eebb63347e882d795968e27ef01bff78a Author: Thomas Augood Date: Sun Aug 14 20:17:34 2011 +0100 almost all documentation is done now commit c95a3931bc16f329e6ca2cca04da3da15a2bb344 Author: Thomas Augood Date: Sun Aug 14 19:31:36 2011 +0100 more documentation, dont know what the wrap functions do though commit 0295de8499878b813119d08d67e6724c0f0151d9 Author: Thomas Augood Date: Sun Aug 14 18:28:11 2011 +0100 done some documentation Signed-off-by: Merlijn Wajer --- Doc/sphinx/scriptref/tpa.rst | 156 +++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) diff --git a/Doc/sphinx/scriptref/tpa.rst b/Doc/sphinx/scriptref/tpa.rst index 271ee2e..e3e755c 100644 --- a/Doc/sphinx/scriptref/tpa.rst +++ b/Doc/sphinx/scriptref/tpa.rst @@ -11,6 +11,8 @@ Quicksort procedure Quicksort(var Arr : TIntegerArray); +Sorts a TIntegerArray using the Quicksort algorithm + tSwap ----- @@ -19,6 +21,8 @@ tSwap procedure tSwap(var a, b: TPoint); +Swaps the values of a and b around + tpaSwap ------- @@ -27,6 +31,8 @@ tpaSwap procedure tpaSwap(var a, b: TPointArray); +Swaps the values of a and b around + SwapE ----- @@ -35,6 +41,8 @@ SwapE procedure SwapE(var a, b: Extended); +Swaps the values of a and b around + RAaSTPAEx --------- @@ -43,6 +51,7 @@ RAaSTPAEx procedure RAaSTPAEx(var a: TPointArray; const w, h: Integer); +Leaves one point per box with side lengths W and H to the TPA RAaSTPA ------- @@ -51,6 +60,8 @@ RAaSTPA procedure RAaSTPA(var a: TPointArray; const Dist: Integer); +Leaves one point per box with the side length Dist + NearbyPointInArrayEx -------------------- @@ -59,6 +70,8 @@ NearbyPointInArrayEx function NearbyPointInArrayEx(const P: TPoint; w, h:Integer;const a: TPointArray): Boolean; +Returns true if the point P is near a point in the TPA a with the + NearbyPointInArray ------------------ @@ -67,6 +80,8 @@ NearbyPointInArray function NearbyPointInArray(const P: TPoint; Dist:Integer;const a: TPointArray): Boolean; +Returns true if the point P is near a point in the TPA a with the + QuickTPASort ------------ @@ -91,6 +106,8 @@ SortTPAFrom procedure SortTPAFrom(var a: TPointArray; const From: TPoint); +Sorts the TPA a from the TPoint From + SortATPAFrom ------------ @@ -99,6 +116,8 @@ SortATPAFrom procedure SortATPAFrom(var a: T2DPointArray; const From: TPoint); +Sorts the T2DPointArray a from the TPoint From + SortATPAFromFirstPoint ---------------------- @@ -115,6 +134,8 @@ InvertTPA procedure InvertTPA(var a: TPointArray); +Reverses the TPA + InvertATPA ---------- @@ -123,6 +144,8 @@ InvertATPA procedure InvertATPA(var a: T2DPointArray); +Reverses the T2dPointArray + MiddleTPAEx ----------- @@ -131,6 +154,8 @@ MiddleTPAEx function MiddleTPAEx(const TPA: TPointArray; var x, y: Integer): Boolean; +Stores the middle point from the TPA in x and y + MiddleTPA --------- @@ -139,6 +164,8 @@ MiddleTPA function MiddleTPA(const tpa: TPointArray): TPoint; +Returns the middle TPA in the result + SortATPASize ------------ @@ -147,6 +174,8 @@ SortATPASize procedure SortATPASize(var a: T2DPointArray; const BigFirst: Boolean); +Sorts the T2dPointArray from largest to smallest if BigFirst is true or smallest to largest if BigFirst is false + SortATPAFromSize ---------------- @@ -155,6 +184,8 @@ SortATPAFromSize procedure SortATPAFromSize(var a: T2DPointArray; const Size: Integer; CloseFirst: Boolean); +Sorts the T2DPointArray from Size by the closest first if CloseFirst is true + InIntArrayEx ------------ @@ -163,6 +194,8 @@ InIntArrayEx function InIntArrayEx(const a: TIntegerArray; var Where: Integer; const Number: Integer): Boolean; +Returns true if Number was found in the TIntegerArray a and returns its location in Where + InIntArray ---------- @@ -171,6 +204,8 @@ InIntArray function InIntArray(const a: TIntegerArray; Number: Integer): Boolean; +Returns true if Number is found in the TintegerArray a + ClearSameIntegers ----------------- @@ -179,6 +214,8 @@ ClearSameIntegers procedure ClearSameIntegers(var a: TIntegerArray); +Deletes the indexes in the TintegerArray a which are duplicated + ClearSameIntegersAndTPA ----------------------- @@ -187,6 +224,8 @@ ClearSameIntegersAndTPA procedure ClearSameIntegersAndTPA(var a: TIntegerArray; var p: TPointArray); +Deletes the indexes in the TIntegerArray a and TPointArray p which are duplicated + SplitTPAEx ---------- @@ -195,6 +234,8 @@ SplitTPAEx function SplitTPAEx(const arr: TPointArray; w, h: Integer): T2DPointArray; +Splits the points with max X and Y distances W and H to their + SplitTPA -------- @@ -203,6 +244,8 @@ SplitTPA function SplitTPA(const arr: TPointArray; Dist: Integer): T2DPointArray; +Splits the points with max distance Dist to their own TPointArrays + FloodFillTPA ------------ @@ -219,6 +262,9 @@ FilterPointsPie procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer); +Removes the points that are in the TPointArray Points that are not within the the degrees SD (Strat Degrees) and + ED (End Degrees) and the radius' MinR (Min Radius) and MaxR (Max Radius) from the origin Mx and My + FilterPointsLine ---------------- @@ -227,6 +273,8 @@ FilterPointsLine procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer); +Returns the result in the TPointArray Points. Returns the points from the TPointArray Points that are on the line Radial from the center mx, my that is with the radius Radius + FilterPointsDist ---------------- @@ -235,6 +283,9 @@ FilterPointsDist procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer); +Removes the points from the TPointArray Points that are not within the radius MinDist (Min Distance) and MaxDist + from the origin Mx and My + GetATPABounds ------------- @@ -243,6 +294,8 @@ GetATPABounds function GetATPABounds(const ATPA: T2DPointArray): TBox; +Returns the boundaries of the T2DPointArray ATPA as a TBox + GetTPABounds ------------ @@ -251,6 +304,8 @@ GetTPABounds function GetTPABounds(const TPA: TPointArray): TBox; +Returns the boundaries of the TPointArray TPA as a TBox + FindTPAinTPA ------------ @@ -259,6 +314,8 @@ FindTPAinTPA function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean; +Looks for the TPoints from SearchTPA inside TotalTPA and stores the matches inside the TPointArray Matches + GetSamePointsATPA ----------------- @@ -267,6 +324,8 @@ GetSamePointsATPA function GetSamePointsATPA(const ATPA : T2DPointArray; var Matches : TPointArray) : boolean; +Finds duplicate Points inside the T2DPointArray ATPA and stores the results inside the TPointArray Matches + FindTextTPAinTPA ---------------- @@ -275,6 +334,8 @@ FindTextTPAinTPA function FindTextTPAinTPA(Height : integer;const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean; +Looks for the TPoints from SearchTPA inside TotalTPA with a maximum y distance of Height and stores the matches inside the TPointArray Matches + SortCircleWise -------------- @@ -283,6 +344,8 @@ SortCircleWise procedure SortCircleWise(var tpa: TPointArray; const cx, cy, StartDegree: Integer; SortUp, ClockWise: Boolean); +Sorts the TPointArray tpa from the point cx, cy if Sortup is true. Starting at StartDegree going clockwise if Clockwise is True + LinearSort ---------- @@ -291,6 +354,8 @@ LinearSort procedure LinearSort(var tpa: TPointArray; cx, cy, sd: Integer; SortUp: Boolean); +Sorts the TPointArray tpa from cx, cy if Sortup is true on the degree angle sd + RotatePoint ----------- @@ -299,6 +364,8 @@ RotatePoint function RotatePoint(Const p: TPoint; angle, mx, my: Extended): TPoint; +Rotates the TPoint p around the center mx, my with the angle + ChangeDistPT ------------ @@ -307,6 +374,8 @@ ChangeDistPT function ChangeDistPT(const PT : TPoint; mx,my : integer; newdist : extended) : TPoint; +Returns a TPoint with the distance newdist from the point mx, my based on the position of the TPoint TP + ChangeDistTPA ------------- @@ -315,6 +384,8 @@ ChangeDistTPA function ChangeDistTPA(var TPA : TPointArray; mx,my : integer; newdist : extended) : boolean; +Returns the result in the TPointArray TPA with the distance newdist from mx, my based on the current position TPA + FindGapsTPA ----------- @@ -323,6 +394,8 @@ FindGapsTPA function FindGapsTPA(const TPA: TPointArray; MinPixels: Integer): T2DPointArray; +Finds the possible gaps in the TPointArray TPA and results the gaps as a T2DPointArray. Considers as a gap if the gap length is >= MinPixels + RemoveDistTPointArray --------------------- @@ -331,6 +404,8 @@ RemoveDistTPointArray function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray; +Finds the possible gaps in the TPointArray TPA and removes the gaps. Considers as a gap if the gap length is >= MinPixels + CombineTPA ---------- @@ -339,6 +414,8 @@ CombineTPA function CombineTPA(const Ar1, Ar2: TPointArray): TPointArray; +Attaches the TPointArray Ar2 onto the end of Ar1 and returns it as the result + ReArrangeandShortenArrayEx -------------------------- @@ -347,6 +424,8 @@ ReArrangeandShortenArrayEx function ReArrangeandShortenArrayEx(const a: TPointArray; w, h: Integer): TPointArray; +Results the TPointArray a with one point per box with side lengths W and H left + ReArrangeandShortenArray ------------------------ @@ -355,6 +434,8 @@ ReArrangeandShortenArray function ReArrangeandShortenArray(const a: TPointArray; Dist: Integer): TPointArray; +Results the TPointArray a with one point per box with side length Dist left + TPAtoATPAEx ----------- @@ -363,6 +444,8 @@ TPAtoATPAEx function TPAtoATPAEx(const TPA: TPointArray; w, h: Integer): T2DPointArray; +Splits the TPA to boxes with sidelengths W and H and results them as a T2DPointArray + TPAtoATPA --------- @@ -371,6 +454,8 @@ TPAtoATPA function TPAtoATPA(const TPA: TPointArray; Dist: Integer): T2DPointArray; +Splits the TPA to boxes with sidelength Dist and results them as a T2DPointArray + CombineIntArray --------------- @@ -379,6 +464,8 @@ CombineIntArray function CombineIntArray(const Ar1, Ar2: TIntegerArray): TIntegerArray; +Attaches the TIntegerArray Ar2 onto the end of Ar1 and returns it as the result + MergeATPA --------- @@ -387,6 +474,8 @@ MergeATPA function MergeATPA(const ATPA : T2DPointArray) : TPointArray; +Combines all the TPointArrays from the T2DPointArray ATPA into the result + AppendTPA --------- @@ -395,6 +484,8 @@ AppendTPA procedure AppendTPA(var TPA: TPointArray; const ToAppend: TPointArray); +Attaches the TPointArray ToAppend onto the end of TPA + TPAFromBox ---------- @@ -403,6 +494,8 @@ TPAFromBox function TPAFromBox(const Box : TBox) : TPointArray; +Create a TPointArray from the top left and the bottom right of the TBox Box + RotatePoints ------------ @@ -411,6 +504,8 @@ RotatePoints function RotatePoints(Const P: TPointArray; A, cx, cy: Extended): TPointArray ; +Rotates the TPointArray P around the center cx, cy with the angle a + FindTPAEdges ------------ @@ -419,6 +514,8 @@ FindTPAEdges function FindTPAEdges(const p: TPointArray): TPointArray; +Returns a TPointArray of the edge points of the TPointArray p + ClearTPAFromTPA --------------- @@ -427,6 +524,8 @@ ClearTPAFromTPA function ClearTPAFromTPA(const arP, ClearPoints: TPointArray): TPointArray; +Removes the points in TPointArray ClearPoints from arP + ReturnPointsNotInTPA -------------------- @@ -435,6 +534,8 @@ ReturnPointsNotInTPA function ReturnPointsNotInTPA(Const TotalTPA: TPointArray; const Box: TBox): TPointArray; +All the points from the TPointArray TotalTPA that are not in the TBox Box are returned in the TPointArray Res + PointInTPA ---------- @@ -443,6 +544,8 @@ PointInTPA function PointInTPA(p: TPoint;const arP: TPointArray): Boolean; +Returns true if the TPoint p is found in the TPointArray arP + ClearDoubleTPA -------------- @@ -451,6 +554,8 @@ ClearDoubleTPA procedure ClearDoubleTPA(var TPA: TPointArray); +Deletes duplicate TPAs int he TPointArray TPA + TPACountSort ------------ @@ -475,6 +580,8 @@ InvertTIA procedure InvertTIA(var tI: TIntegerArray); +Reverses the TIntegerArray tI + SumIntegerArray --------------- @@ -483,6 +590,8 @@ SumIntegerArray function SumIntegerArray(const Ints : TIntegerArray): Integer; +Retuns the sum of all the integers in the TIntegerArray Ints + AverageTIA ---------- @@ -491,6 +600,8 @@ AverageTIA function AverageTIA(const tI: TIntegerArray): Integer; +Gives an average of the sum of the integers in the TIntegerArray tI + AverageExtended --------------- @@ -499,6 +610,8 @@ AverageExtended function AverageExtended(const tE: TExtendedArray): Extended; +Gives an average of the sum of the extendeds in the TExtendedArray tI + SplitTPAExWrap -------------- @@ -507,6 +620,8 @@ SplitTPAExWrap procedure SplitTPAExWrap(const arr: TPointArray; w, h: Integer; var res : T2DPointArray); +Splits the points with max X and Y distances W and H to their and returns the result in the T2DPointArray Res + SplitTPAWrap ------------ @@ -515,6 +630,8 @@ SplitTPAWrap procedure SplitTPAWrap(const arr: TPointArray; Dist: Integer; var res: T2DPointArray); +Splits the points with max distance Dist to their own TPointArrays and returns the result in the T2DPointArray Res + FindGapsTPAWrap --------------- @@ -523,6 +640,8 @@ FindGapsTPAWrap procedure FindGapsTPAWrap(const TPA: TPointArray; MinPixels: Integer; var Res : T2DPointArray); +Finds the possible gaps in the TPointArray TPA and the result is returned in the T2DPointArray Res. Considers as a gap if the gap length is >= MinPixels + RemoveDistTPointArrayWrap ------------------------- @@ -531,6 +650,8 @@ RemoveDistTPointArrayWrap procedure RemoveDistTPointArrayWrap(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean; var Res : TPointArray); +Finds the possible gaps in the TPointArray TPA and removes the gaps. Considers as a gap if the gap length is >= MinPixels and returns the result in the TPointArray Res + CombineTPAWrap -------------- @@ -539,6 +660,8 @@ CombineTPAWrap procedure CombineTPAWrap(const Ar1, Ar2: TPointArray; var Res : TPointArray); +Attaches the TPointArray Ar2 onto the end of Ar1 and returns the result in the TPointArray Res + ReArrangeandShortenArrayExWrap ------------------------------ @@ -547,6 +670,8 @@ ReArrangeandShortenArrayExWrap procedure ReArrangeandShortenArrayExWrap(const a: TPointArray; w, h: Integer; var Res : TPointArray); +Results the TPointArray a with one point per box with side lengths W and H left and puts the result in Res + ReArrangeandShortenArrayWrap ---------------------------- @@ -555,6 +680,8 @@ ReArrangeandShortenArrayWrap procedure ReArrangeandShortenArrayWrap(const a: TPointArray; Dist: Integer; var Res : TPointArray); +Results the TPointArray a with one point per box with side length Dist left and puts the result in Res + TPAtoATPAExWrap --------------- @@ -563,6 +690,8 @@ TPAtoATPAExWrap procedure TPAtoATPAExWrap(const TPA: TPointArray; w, h: Integer; var Res : T2DPointArray); +Splits the TPA to boxes with sidelengths W and H and results them as a T2DPointArray in Res + TPAtoATPAWrap ------------- @@ -571,6 +700,8 @@ TPAtoATPAWrap procedure TPAtoATPAWrap(const TPA: TPointArray; Dist: Integer; var Res : T2DPointArray); +Splits the TPA to boxes with sidelength Dist and results them as a T2DPointArray in Res + CombineIntArrayWrap ------------------- @@ -579,6 +710,8 @@ CombineIntArrayWrap procedure CombineIntArrayWrap(const Ar1, Ar2: TIntegerArray; var Res : TIntegerArray); +Attaches the TIntegerArray Ar2 onto the end of Ar1 and returns it in the TIntegerArray Res + ReturnPointsNotInTPAWrap ------------------------ @@ -587,6 +720,8 @@ ReturnPointsNotInTPAWrap procedure ReturnPointsNotInTPAWrap(Const TotalTPA: TPointArray; const Box: TBox; var Res : TPointArray); +All the points from the TPointArray TotalTPA that are not in the TBox Box are returned in the TPointArray Res + MergeATPAWrap ------------- @@ -595,6 +730,8 @@ MergeATPAWrap procedure MergeATPAWrap(const ATPA : T2DPointArray; var Res: TPointArray); +Combines all the TPointArrays from the T2DPointArray ATPA into the TPointArray Res + TPAFromBoxWrap -------------- @@ -603,6 +740,8 @@ TPAFromBoxWrap procedure TPAFromBoxWrap(const Box : TBox; var Res : TPointArray); +Create a TPointArray from the top left and the bottom right of the TBox Box and returns the result in Res + RotatePointsWrap ---------------- @@ -611,6 +750,8 @@ RotatePointsWrap procedure RotatePointsWrap(Const P: TPointArray; A, cx, cy: Extended; var Res : TPointArray); +Rotates the TPointArray P around the center cx, cy with the angle a and returns the result in Res + FindTPAEdgesWrap ---------------- @@ -619,6 +760,8 @@ FindTPAEdgesWrap procedure FindTPAEdgesWrap(const p: TPointArray; var Res : TPointArray); +Returns a TPointArray of the edge points of the TPointArray p and returns the result in the TPointArray Res + ClearTPAFromTPAWrap ------------------- @@ -627,6 +770,8 @@ ClearTPAFromTPAWrap procedure ClearTPAFromTPAWrap(const arP, ClearPoints: TPointArray; var Res : TPointArray); +Removes the points in TPointArray ClearPoints from arP and returns the results in Res + SameTPA ------- @@ -635,6 +780,8 @@ SameTPA function SameTPA(const aTPA, bTPA: TPointArray): Boolean; +Returns true if the TPointArray aTPA is the same as bTPA + TPAInATPA --------- @@ -643,6 +790,8 @@ TPAInATPA function TPAInATPA(const TPA: TPointArray;const InATPA: T2DPointArray; var Index: LongInt): Boolean; +Returns true if the TPointArray TPA is found in the T2DPointArray InATPA and stores the index in Index + OffsetTPA --------- @@ -651,6 +800,8 @@ OffsetTPA procedure OffsetTPA(var TPA : TPointArray; const Offset : TPoint); +Offsets all the TPAs int the TPointArray TPA but the TPoint Offset + OffsetATPA ---------- @@ -659,6 +810,8 @@ OffsetATPA procedure OffsetATPA(var ATPA : T2DPointArray; const Offset : TPoint); +Offsets all the TPAs int the T2DPointArray ATPA but the TPoint Offset + CopyTPA ------- @@ -667,6 +820,8 @@ CopyTPA function CopyTPA(const TPA : TPointArray) : TPointArray; +Returns the TPointArray TPA + CopyATPA -------- @@ -675,4 +830,5 @@ CopyATPA function CopyATPA(const ATPA : T2DPointArray) : T2DPointArray; +Returns the T2DPointArray ATPA From 65c4fdbd0819ca4ed2d103e567deefc7984c9f06 Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Wed, 17 Aug 2011 00:11:11 +0200 Subject: [PATCH 3/6] Documentation: Updated TODO. --- Doc/sphinx/TODO | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/Doc/sphinx/TODO b/Doc/sphinx/TODO index 387d933..2943474 100644 --- a/Doc/sphinx/TODO +++ b/Doc/sphinx/TODO @@ -1,5 +1,27 @@ -# Change a minus to a plus when something is being worked on. -# Remove it when you are done. +Check scriptref/dtm.rst, it look overly complicated with all the different +types. (MDTM, DDTM, TSDTM).... +Add examples to files in scriptref: + + - [ ] bitmaps.rst + - [ ] colourconverting.rst + - [ ] colourfinding.rst + - [ ] dtm.rst + - [ ] files.rst + - [/] mouseandkeyboard.rst + - [ ] ocr.rst + - [ ] sound.rst + - [ ] string.rst + - [ ] tpa.rst + - [ ] web.rst + - [ ] window.rst + +# ADDING CONTENT + +- Create a list of Simba Extensions. If the extension has a doc on it's own, + dont forget to link to it. +- Write mmlref / article (only for developers of Simba) +- Write tutorial? +- Write about Simba Stable/Unstable. # GENERAL @@ -12,13 +34,3 @@ seems to use it). - Find stuff to add to this list. -# ADDING CONTENT - -- Create a list of Simba Extensions. If the extension has a doc on it's own, - dont forget to link to it. -- Create scriptref/ articles. A lot of functionality that Simba exposes to the - Scripters is currently not documented. -- Write mmlref/ article (only for developers of Simba) -- Write tutorial? -- Fix up articles? -- Write about Simba Stable/Unstable. From c899b4e61b581d73a067d43733be38a54023b45f Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Sat, 20 Aug 2011 11:45:04 +0200 Subject: [PATCH 4/6] Simba: Fix mistake in web.rst --- Doc/sphinx/scriptref/web.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Doc/sphinx/scriptref/web.rst b/Doc/sphinx/scriptref/web.rst index c8fb0d6..94ef451 100644 --- a/Doc/sphinx/scriptref/web.rst +++ b/Doc/sphinx/scriptref/web.rst @@ -142,6 +142,8 @@ GetRawHeaders returns a string of headers from the specified client. Socket Functions ---------------- +Simba's Socket Functions. Examples required; if you have one, please let u know. + CreateSocket ~~~~~~~~~~~~ @@ -190,7 +192,6 @@ ListenSocket ListenSocket allows for a client socket to accept connections. - AcceptSocket ~~~~~~~~~~~~ @@ -249,15 +250,15 @@ SendSocket SendSocket sends a string of data to a bound client socket. -SetTimeout +SetSocketTimeout ~~~~~~~~~~ .. code-block:: pascal - procedure SetTimeout(Client, Time: integer); + procedure SetSocketTimeout(Client, Time: integer); SetTimeout sets a maximum amount of time for a bound client socket to wait for -data from another socket. +data from another socket. Time is in *milliseconds*. SocketInfo ~~~~~~~~~~ From b1f02535ffaee4fbac87cbf220a426d8bfedc976 Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Tue, 30 Aug 2011 10:36:57 +0200 Subject: [PATCH 5/6] Update TODO files. Will get to some more Simba work in a week or two. --- TODO | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/TODO b/TODO index ba1abf6..dc43666 100644 --- a/TODO +++ b/TODO @@ -3,31 +3,24 @@ Simple stuff, not required, may not be possible/useful: - Coloured writeln [ ] - Make an TAction for the Colour Picker. [ ] - Portable install (needs fiddling with settings and such) [ ] + - Settings rewrite [ ] - --no-extensions flag for Simba. [ ] +- CTS/finder speedups and changes [X] -- CTS/finder speedups and changes [ ] - General ideas: - - everything subprocedure (lots of code) - - - jit + comparison function (per cts) generated, call in loop - - - comparison function (per cts), not generated, call in loop - - - JIT (Generate comparison functions) [ ] - Comparison functions for HSL/XYZ/L*a*b should check for match on each component before calculating the next. (see FindColorsToleranceOptimised) - - Pass color information in struct [ ] + - Pass color information in struct [X] - Precalculate screen bitmap in current cts / keep a cache - to save comparisons [ ] - - Add CTS 3 [ ] - - Add a direct RGB -> CIE L*a*b conversion [ ] - - Make sure colour conversions are inline [ ] + to save comparisons [X] + - Add CTS 3 [/] + - Add a direct RGB -> CIE L*a*b conversion [/] - More documentation: - - Cover all functions by at least mentioning the definition [ ] + - Cover all functions by at least mentioning the definition [/] + - Imported functions as well? - Write tutorial [ ] - In depth documentation per function [ ] @@ -36,17 +29,17 @@ Simple stuff, not required, may not be possible/useful: - Lape! [ ] - Integrate script manager [ ] - - Basic support. (Install scripts) [ ] - - Update functionality [ ] - - Uninstall scripts [ ] - - Better storage / more stable storage [ ] - - Pretty GUI [ ] - - Merging / storing usernames when updating [ ] + - Basic support. (Install scripts) [X] + - Update functionality [X] + - Uninstall scripts [X] + - Better storage / more stable storage [?] + - Pretty GUI [/] + - Merging / storing usernames when updating [?] - Make Simba more ``modular'': - Fonts [ ] - - Interpreters [ ] + - Interpreters [/] - Code completion/hints [ ] - - Extensions [ ] + - Extensions [X] - Interpreter system overhaul? [ ] From ab08afd9c1c750b363685bc025bfaf791ccf9dad Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Thu, 22 Sep 2011 01:29:52 +0200 Subject: [PATCH 6/6] Fix spelling mistakes. --- Projects/Simba/psextension.pas | 2 +- Projects/Simba/simbaunit.pas | 2 +- Projects/Simba/updateform.pas | 3 ++- Units/MMLAddon/mmlpsthread.pas | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Projects/Simba/psextension.pas b/Projects/Simba/psextension.pas index 7a7a2f3..f794ea3 100644 --- a/Projects/Simba/psextension.pas +++ b/Projects/Simba/psextension.pas @@ -399,7 +399,7 @@ begin end; if InitScript then - mDebugLn('Init procedure succesfully called') + mDebugLn('Init procedure successfully called') else mDebugLn('Init procedure didn''t execute right, or couldn''t be found'); Enabled:= FWorking; diff --git a/Projects/Simba/simbaunit.pas b/Projects/Simba/simbaunit.pas index 4872c7a..4b3e0f5 100644 --- a/Projects/Simba/simbaunit.pas +++ b/Projects/Simba/simbaunit.pas @@ -3172,7 +3172,7 @@ begin Idler; if UnTarrer.Result then begin; - FormWriteln('Succesfully installed the new fonts!'); + FormWriteln('Successfully installed the new fonts!'); SetSetting('Settings/Fonts/Version',IntToStr(LatestVersion),true); if Assigned(self.OCR_Fonts) then self.OCR_Fonts.Free; diff --git a/Projects/Simba/updateform.pas b/Projects/Simba/updateform.pas index 1f3566b..4fa8ee3 100644 --- a/Projects/Simba/updateform.pas +++ b/Projects/Simba/updateform.pas @@ -241,7 +241,8 @@ begin FCancelling := False; FCancelled := True; DownloadSpeed.Visible := false; - Self.UpdateLog.Lines.Add('Download stopped at '+inttostr(DownloadProgress.Position)+'%... Simba did not succesfully update.'); + Self.UpdateLog.Lines.Add('Download stopped at '+inttostr(DownloadProgress.Position)+ + '%... Simba did not successfully update.'); // more detailed info mDebugLn('EXCEPTION IN UPDATEFORM: We either hit Cancel, or something went wrong with files'); if FileExists(Updater.BasePath + Updater.ReplacementFile + '_') then diff --git a/Units/MMLAddon/mmlpsthread.pas b/Units/MMLAddon/mmlpsthread.pas index 6f194f7..fb3f1a5 100644 --- a/Units/MMLAddon/mmlpsthread.pas +++ b/Units/MMLAddon/mmlpsthread.pas @@ -964,7 +964,7 @@ begin if PSScript.Compile then begin OutputMessages; - psWriteln('Compiled succesfully in ' + IntToStr(GetTickCount - Starttime) + ' ms.'); + psWriteln('Compiled successfully in ' + IntToStr(GetTickCount - Starttime) + ' ms.'); if CompileOnly then exit; // if not (ScriptState = SCompiling) then @@ -1208,7 +1208,7 @@ begin RUTIS.Compile; if not RUTIS.CompilerError then begin - psWriteln('Compiled succesfully in ' + IntToStr(GetTickCount - Starttime) + ' ms.'); + psWriteln('Compiled successfully in ' + IntToStr(GetTickCount - Starttime) + ' ms.'); if CompileOnly then exit; RUTIS.Run;