diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 4232c7316..da21279c0 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "11"; public const string Build = "0"; - public const string Revision = "3647"; + public const string Revision = "3649"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 33674043c..0e1523336 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ %MINOR%=11 -%REVISION%=3647 +%REVISION%=3649 %COREVERSION%=0 %MAJOR%=3 diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 37afe055a..f0e446692 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.11.0.3647 +3.11.0.3649 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 3462bad34..e6f2ef968 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.11.0.3647' +!define VERSION '3.11.0.3649' diff --git a/TestSuite/CompilationSamples/Coords.pas b/TestSuite/CompilationSamples/Coords.pas index a80eb9055..d2565ba1b 100644 --- a/TestSuite/CompilationSamples/Coords.pas +++ b/TestSuite/CompilationSamples/Coords.pas @@ -35,8 +35,10 @@ begin Result := Self; end; +const InitialPenWidth = 1.4; + var - CurrentPen := ColorPen(Colors.Black,1.4); // Для LineTo + CurrentPen := ColorPen(Colors.Black,InitialPenWidth); // Для LineTo CurrentFontFace := new Typeface('Arial'); diff --git a/TestSuite/CompilationSamples/Turtle.pas b/TestSuite/CompilationSamples/Turtle.pas index 4667a2895..51b5c9c38 100644 --- a/TestSuite/CompilationSamples/Turtle.pas +++ b/TestSuite/CompilationSamples/Turtle.pas @@ -1,10 +1,10 @@ /// Исполнитель Черепаха unit Turtle; +interface + uses GraphWPFBase; uses GraphWPF; -uses System.Threading.Tasks; -uses Coords; type Colors = GraphWPF.Colors; @@ -14,6 +14,70 @@ var tp: Point; // текущая точка Черепахи (экранная, но сделаем её логической) angle: real; // Угол поворота Черепахи dr := False; // Опущен хвост Черепахи или нет + +function Window: WindowTypeWPF; + +/// Продвигает Черепаху вперед на расстояние r +procedure Forw(r: real); + +/// Продвигает Черепаху назад на расстояние r +procedure Back(r: real); + +/// Поворачивает Черепаху на угол da по часовой стрелке +procedure Turn(da: real); + +/// Поворачивает Черепаху на угол da по часовой стрелке +procedure TurnRight(da: real); + +/// Поворачивает Черепаху на угол da против часовой стрелки +procedure TurnLeft(da: real); + +/// Опускает хвост Черепахи +procedure Down; + +/// Поднимает хвост Черепахи +procedure Up; + +/// Перемещает Черепаху в точку (x,y) +procedure ToPoint(x,y: real); + +/// Рисует окружность указанного радиуса +procedure Circle(r: real); + +/// Рисует окружность указанного радиуса и цвета +procedure Circle(r: real; color: GColor); + +/// Рисует точку заданным цветом заданного размера +procedure DrawPoint(x,y: real; color: GColor := Colors.Black; PointRadius: real := 2); + +/// Рисует точки заданным цветом заданного размера +procedure DrawPoints(points: array of Point; color: GColor; PointRadius: real := -1); + +/// Рисует точки следующим цветом в палитре цветов +procedure DrawPoints(points: array of Point; PointRadius: real := -1); + +/// Рисует точки заданным цветом +procedure DrawPoints(xx,yy: array of real; color: GColor; PointRadius: real := -1); + +/// Рисует точки следующим цветом в палитре цветов +procedure DrawPoints(xx,yy: array of real; PointRadius: real := -1); + +/// Устанавливает ширину линии Черепахи +procedure SetWidth(w: real); + +/// Устанавливает цвет линии Черепахи +procedure SetColor(c: GColor); + +/// Устанавливает положение начала координат +procedure SetOrigin(x,y: real); + +{$endregion} + + +implementation + +uses System.Threading.Tasks; +uses Coords; procedure MoveToReal(x,y: real); begin @@ -239,23 +303,24 @@ begin end; /// Рисует точку заданным цветом -procedure DrawPoint(x,y: real; color: GColor := Colors.Black; PointRadius: real := 2) := Coords.DrawPoint(x,y,color,PointRadius); +procedure DrawPoint(x,y: real; color: GColor; PointRadius: real) := Coords.DrawPoint(x,y,color,PointRadius); /// Рисует точки заданным цветом -procedure DrawPoints(points: array of Point; color: GColor; PointRadius: real := -1) := Coords.DrawPoints(points,color,PointRadius); +procedure DrawPoints(points: array of Point; color: GColor; PointRadius: real) := Coords.DrawPoints(points,color,PointRadius); /// Рисует точки следующим цветом в палитре цветов -procedure DrawPoints(points: array of Point; PointRadius: real := -1) := Coords.DrawPoints(points,PointRadius); +procedure DrawPoints(points: array of Point; PointRadius: real) := Coords.DrawPoints(points,PointRadius); /// Рисует точки заданным цветом -procedure DrawPoints(xx,yy: array of real; color: GColor; PointRadius: real := -1) := Coords.DrawPoints(xx,yy,color,PointRadius); +procedure DrawPoints(xx,yy: array of real; color: GColor; PointRadius: real) := Coords.DrawPoints(xx,yy,color,PointRadius); /// Рисует точки следующим цветом в палитре цветов -procedure DrawPoints(xx,yy: array of real; PointRadius: real := -1) := Coords.DrawPoints(xx,yy,PointRadius); +procedure DrawPoints(xx,yy: array of real; PointRadius: real) := Coords.DrawPoints(xx,yy,PointRadius); /// Устанавливает ширину линии Черепахи procedure SetWidth(w: real); begin + AddCommand(new SetWidthC(w)); CurrentPen := ColorPen(Pen.Color,w); Pen.Width := w; end; @@ -263,6 +328,7 @@ end; /// Устанавливает цвет линии Черепахи procedure SetColor(c: GColor); begin + AddCommand(new SetColorC(c)); CurrentPen := ColorPen(c,Pen.Width); Pen.Color := c; end; @@ -282,6 +348,7 @@ begin tp := (0,0); angle := 90; MoveToReal(tp.X,tp.Y); + CurrentPen := ColorPen(Colors.Black,InitialPenWidth); dr := False; end;