Стартовый пул
This commit is contained in:
78
ATSynEdit/app/test_canvasline/demo.lpi
Normal file
78
ATSynEdit/app/test_canvasline/demo.lpi
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="demo"/>
|
||||
<ResourceType Value="res"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="demo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="demo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
19
ATSynEdit/app/test_canvasline/demo.lpr
Normal file
19
ATSynEdit/app/test_canvasline/demo.lpr
Normal file
@@ -0,0 +1,19 @@
|
||||
program demo;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1
|
||||
{ you can add units after this };
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
20
ATSynEdit/app/test_canvasline/unit1.lfm
Normal file
20
ATSynEdit/app/test_canvasline/unit1.lfm
Normal file
@@ -0,0 +1,20 @@
|
||||
object Form1: TForm1
|
||||
Left = 456
|
||||
Height = 278
|
||||
Top = 453
|
||||
Width = 500
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 278
|
||||
ClientWidth = 500
|
||||
OnPaint = FormPaint
|
||||
LCLVersion = '1.5'
|
||||
object Button1: TButton
|
||||
Left = 154
|
||||
Height = 25
|
||||
Top = 68
|
||||
Width = 75
|
||||
Caption = 'close'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
58
ATSynEdit/app/test_canvasline/unit1.pas
Normal file
58
ATSynEdit/app/test_canvasline/unit1.pas
Normal file
@@ -0,0 +1,58 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
||||
ExtCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure FormPaint(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormPaint(Sender: TObject);
|
||||
var
|
||||
c: tcanvas;
|
||||
begin
|
||||
c:= self.canvas;
|
||||
c.brush.color:= clyellow;
|
||||
c.fillrect(0, 0, 200, 200);
|
||||
|
||||
c.pen.color:= clred;
|
||||
c.line(10,10,30,10);
|
||||
c.line(30,10,50,10);
|
||||
c.line(50,10,80,10);
|
||||
|
||||
c.line(10,10,10,30);
|
||||
c.line(10,30,10,50);
|
||||
c.line(10,50,10,80);
|
||||
end;
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
close;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user