RebuildStandartModulesMono.pas

This commit is contained in:
Mikhalkovich Stanislav 2021-04-09 23:38:07 +03:00
parent 13c677e66e
commit daca8873cb
6 changed files with 62 additions and 11 deletions

View file

@ -0,0 +1,18 @@
uses
PABCSystem, PABCExtensions, __RedirectIOMode, __RunMode,
Events, FilesOperations,
NumLibABC,
IniFile, PointerTools, PointRect,
Sockets, Utils, Timers,
Collections, Arrays, Core, ClientServer, Countries,
ABCDatabases
{,
OpenGLABCBase, OpenGL, OpenGLABC
,
BBCMicroBit, School, SF, TwoPanelsWindow}
;
begin
//writeln(cos(pi));
//readln;
end.

View file

@ -14,7 +14,7 @@ mono --aot bin/OptimizerConversion.dll
mono --aot bin/Errors.dll
export MONO_IOMAP=all
cd ReleaseGenerators
mono ../bin/pabcnetc.exe RebuildStandartModules.pas /rebuild
mono ../bin/pabcnetc.exe RebuildStandartModulesMono.pas /rebuild
if [ $? -eq 0 ]; then
cd PABCRtl
mono ../../bin/pabcnetc.exe PABCRtl.pas /rebuild

View file

@ -217,6 +217,10 @@ type
procedure Load(fname: string);
/// Заполняет содержимое графического окна обоями из файла с именем fname
procedure Fill(fname: string);
/// Возвращает случайную точку в границах экрана. Необязательный параметр margin задаёт минимальный отступ от границы
function RandomPoint(margin: real := 0): Point;
/// Очищает графическое окно белым цветом
procedure Clear;
end;
// Специфический тип окна для модуля GraphWPF
@ -1672,6 +1676,14 @@ begin
//FillWindow(fname);
end;
procedure GraphWindowType.Clear;
begin
Window.Clear;
end;
function GraphWindowType.RandomPoint(margin: real): Point := Pnt(Random(margin,Width-margin),Random(margin,Height-margin));
function GraphWindowType.Center: Point := Pnt(Width/2,Height/2);
function GraphWindowType.ClientRect: GRect := Rect(0,0,Width,Height);

View file

@ -143,8 +143,8 @@ type
function Center: Point;
/// Возвращает прямоугольник клиентской области окна
function ClientRect: GRect;
/// Возвращает случайную точку в границах экрана. Необязательный параметр w задаёт минимальный отступ от границы
function RandomPoint(w: real := 0): Point;
/// Возвращает случайную точку в границах экрана. Необязательный параметр margin задаёт минимальный отступ от границы
function RandomPoint(margin: real := 0): Point;
private procedure CenterOnScreenP;
end;
//{{{--doc: Конец секции 1 }}}
@ -237,7 +237,7 @@ procedure WindowType.Clear := Invoke(WindowTypeClearP);
procedure WindowType.Clear(c: GColor);
begin
raise new System.NotImplementedException('WindowType.Clear(c) пока не реализовано. Честное слово - в будущем!')
raise new System.NotImplementedException('WindowType.Clear(color) не реализовано')
end;
procedure WindowTypeSetSizeP(w, h: real);
@ -281,7 +281,7 @@ function WindowType.Center := Pnt(Width/2,Height/2);
function WindowType.ClientRect := Rect(0,0,Width,Height);
function WindowType.RandomPoint(w: real): Point := Pnt(Random(w,Width-w),Random(w,Height-w));
function WindowType.RandomPoint(margin: real): Point := Pnt(Random(margin,Width-margin),Random(margin,Height-margin));
function operator implicit(Self: (integer, integer)): Point; extensionmethod := new Point(Self[0], Self[1]);
function operator implicit(Self: (integer, real)): Point; extensionmethod := new Point(Self[0], Self[1]);

View file

@ -71,8 +71,7 @@ function Divisors(n: integer): List<integer>;
///--
function Divizors(n: integer): List<integer>;
/// Возвращает список всех k делителей натурального числа n.
/// Если делителей не ровно k, возвращает пустой список
///--
function Divisors(n, k: integer): List<integer>;
/// Возвращает Sin угла, заданного в градусах
@ -587,8 +586,7 @@ function Divisors(Self: integer): List<integer>; extensionmethod :=
function Divizors(Self: integer): List<integer>; extensionmethod :=
Divisors(Self);
/// Возвращает список всех k делителей натурального числа n.
/// Если делителей не ровно k, возвращает пустой список
///--
function Divisors(n, k: integer): List<integer>;
begin
n := Abs(n); // foolproof
@ -634,8 +632,7 @@ begin
Result := L
end;
/// Возвращает список всех k делителей натурального числа n.
/// Если делителей не ровно k, возвращает пустой список
///--
function Divisors(Self, k: integer): List<integer>; extensionmethod :=
Divisors(Self, k);

View file

@ -1238,6 +1238,27 @@ procedure __FinalizeModule__;
//procedure BeginFrameBasedAnimationTime(DrawT: procedure(dt: real));
/// Класс, содержащий константы направления
type Direction = class
/// Направление "Влево"
static property Left: (real,real) read (-1.0,0.0);
/// Направление "Вправо"
static property Right: (real,real) read (1.0,0.0);
/// Направление "Вверх"
static property Up: (real,real) read (0.0,-1.0);
/// Направление "Вниз"
static property Down: (real,real) read (0.0,1.0);
/// Направление "Влево вверх"
static property LeftUp: (real,real) read (-1.0,-1.0);
/// Направление "Влево вниз"
static property LeftDown: (real,real) read (-1.0,1.0);
/// Направление "Вправо вверх"
static property RightUp: (real,real) read (1.0,-1.0);
/// Направление "Вправо вниз"
static property RightDown: (real,real) read (1.0,1.0);
/// Нулевое направление (объект неподвижен)
static property Zero: (real,real) read (0.0,0.0);
end;
implementation
@ -1508,6 +1529,7 @@ end;
function ObjectsIntersect(o1,o2: ObjectWPF)
:= Invoke&<boolean>(ObHelper.Create(o1,o2).IntersectP);
/// Возвращает список объектов, пересекающихся с данным
function IntersectionList(Self: ObjectWPF): List<ObjectWPF>; extensionmethod
:= Invoke&<List<ObjectWPF>>(OLHelper.Create(Self).f);
@ -1515,8 +1537,10 @@ procedure ToFront(o: ObjectWPF) := Objects.ToFront(o);
procedure ToBack(o: ObjectWPF) := Objects.ToBack(o);
/// Перемещает объект на передний план
procedure ToFront(Self: ObjectWPF); extensionmethod := Objects.ToFront(Self);
/// Перемещает объект на задний план
procedure ToBack(Self: ObjectWPF); extensionmethod := Objects.ToBack(Self);
function operator implicit (t: (integer,integer)): (real,real); extensionmethod := (real(t[0]),real(t[1]));