diff --git a/lazarus/texture/project1.ico b/lazarus/texture/project1.ico new file mode 100644 index 0000000..0341321 Binary files /dev/null and b/lazarus/texture/project1.ico differ diff --git a/lazarus/texture/project1.lpi b/lazarus/texture/project1.lpi new file mode 100644 index 0000000..3afe492 --- /dev/null +++ b/lazarus/texture/project1.lpi @@ -0,0 +1,79 @@ + + + + + + + + + <ResourceType Value="res"/> + <UseXPManifest Value="True"/> + <Icon Value="0"/> + </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="project1.lpr"/> + <IsPartOfProject Value="True"/> + </Unit0> + <Unit1> + <Filename Value="unit1.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="Form1"/> + <ResourceBaseClass Value="Form"/> + <UnitName Value="Unit1"/> + </Unit1> + </Units> + </ProjectOptions> + <CompilerOptions> + <Version Value="11"/> + <Target> + <Filename Value="project1"/> + </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> diff --git a/lazarus/texture/project1.lpr b/lazarus/texture/project1.lpr new file mode 100644 index 0000000..58c35dc --- /dev/null +++ b/lazarus/texture/project1.lpr @@ -0,0 +1,21 @@ +program project1; + +{$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 }; + +{$R *.res} + +begin + RequireDerivedFormResource:=True; + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. + diff --git a/lazarus/texture/project1.res b/lazarus/texture/project1.res new file mode 100644 index 0000000..e994dfa Binary files /dev/null and b/lazarus/texture/project1.res differ diff --git a/lazarus/texture/unit1.lfm b/lazarus/texture/unit1.lfm new file mode 100644 index 0000000..5ca0091 --- /dev/null +++ b/lazarus/texture/unit1.lfm @@ -0,0 +1,9 @@ +object Form1: TForm1 + Left = 222 + Height = 510 + Top = 236 + Width = 726 + Caption = 'Form1' + OnMouseMove = FormMouseMove + LCLVersion = '1.6.2.0' +end diff --git a/lazarus/texture/unit1.pas b/lazarus/texture/unit1.pas new file mode 100644 index 0000000..454ccec --- /dev/null +++ b/lazarus/texture/unit1.pas @@ -0,0 +1,53 @@ +unit Unit1; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs; + +type + + { TForm1 } + + TForm1 = class(TForm) + procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); + private + { private declarations } + public + { public declarations } + end; + +var + Form1: TForm1; + px: integer = 0; + py: integer = 0; + +implementation + +{$R *.lfm} + +procedure Line(x1, y1, x2, y2: integer); +var + col, row: integer; +begin + for col := -10 to 10 do begin + for row := -10 to 10 do begin + Form1.Canvas.MoveTo(x1 + col*200, y1 + row*200); + Form1.Canvas.LineTo(x2 + col*200, y2 + row*200); + end; + end; +end; + +procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, + Y: Integer); +begin + if ssRight in Shift then Form1.Refresh; + if ssLeft in Shift then Line(px, py, x, y); + px := x; + py := y; +end; + +end. +