summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-07-10 21:09:12 +0200
committerErich Eckner <git@eckner.net>2023-07-10 21:09:12 +0200
commit1575af3fed5f6e312c9e4c84cffc74eb50d4ed36 (patch)
tree571ef018deeea71524178158154e95acea55ecf0
parentc28a90f1385d9dee0d42e19f45971b7ca3792999 (diff)
downloadunits-1575af3fed5f6e312c9e4c84cffc74eb50d4ed36.tar.xz
lowlevelunit.pas: point() converter
-rw-r--r--lowlevelunit.pas14
1 files changed, 14 insertions, 0 deletions
diff --git a/lowlevelunit.pas b/lowlevelunit.pas
index 37a6267..2fb1710 100644
--- a/lowlevelunit.pas
+++ b/lowlevelunit.pas
@@ -142,6 +142,8 @@ function tIntPointToStr(p: tIntPoint): string;
function strToTIntPoint(s: string): tIntPoint;
function tInt64PointToStr(p: tInt64Point): string;
procedure fehler(s: string);
+function point(x: tIntPoint): tPoint; overload;
+function point(x: tInt64Point): tPoint; overload;
function intPoint(x,y: longint): tIntPoint;
function int64Point(x,y: int64): tInt64Point;
function extPoint(x,y: extended): tExtPoint; overload;
@@ -1048,6 +1050,18 @@ begin
raise exception.create(s);
end;
+function point(x: tIntPoint): tPoint;
+begin
+ result.x:=x['x'];
+ result.y:=x['y'];
+end;
+
+function point(x: tInt64Point): tPoint;
+begin
+ result.x:=x['x'];
+ result.y:=x['y'];
+end;
+
function intPoint(x,y: longint): tIntPoint;
begin
result['x']:=x;