diff options
| author | sekelsenmat <sekelsenmat@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-01-14 12:54:17 +0000 |
|---|---|---|
| committer | sekelsenmat <sekelsenmat@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2011-01-14 12:54:17 +0000 |
| commit | f5db36a617b3aa62521b4dd5e6dc00e17c93eb1e (patch) | |
| tree | 6603328dc2468d0c0acb2dc34b7fab57703467bb /packages/fpvectorial | |
| parent | 654a004a632a0dd6fbe977d7dfc2b3039f89a277 (diff) | |
| download | fpc-f5db36a617b3aa62521b4dd5e6dc00e17c93eb1e.tar.gz | |
Starts implementing a fpvectorial viewer
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@16763 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fpvectorial')
| -rw-r--r-- | packages/fpvectorial/examples/fpvviewer/cube.dxf | 414 | ||||
| -rw-r--r-- | packages/fpvectorial/examples/fpvviewer/diamond.dxf | 200 | ||||
| -rw-r--r-- | packages/fpvectorial/examples/fpvviewer/fpvv_mainform.lfm | 34 | ||||
| -rw-r--r-- | packages/fpvectorial/examples/fpvviewer/fpvv_mainform.pas | 53 | ||||
| -rw-r--r-- | packages/fpvectorial/examples/fpvviewer/fpvviewer.lpi | 169 | ||||
| -rw-r--r-- | packages/fpvectorial/examples/fpvviewer/fpvviewer.lpr | 23 |
6 files changed, 893 insertions, 0 deletions
diff --git a/packages/fpvectorial/examples/fpvviewer/cube.dxf b/packages/fpvectorial/examples/fpvviewer/cube.dxf new file mode 100644 index 0000000000..d0497a33d1 --- /dev/null +++ b/packages/fpvectorial/examples/fpvviewer/cube.dxf @@ -0,0 +1,414 @@ + 0 +SECTION + 2 +HEADER +999 +cube.dxf created by IVREAD. +999 +Original data in cube.iv + 0 +ENDSEC + 0 +SECTION + 2 +TABLES + 0 +ENDSEC + 0 +SECTION + 2 +BLOCKS + 0 +ENDSEC + 0 +SECTION + 2 +ENTITIES + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + -0.5000 + 30 + 1.000 + 11 + 0.5000 + 21 + -0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + -0.5000 + 30 + 1.000 + 11 + 0.5000 + 21 + 0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + 0.5000 + 30 + 1.000 + 11 + -0.5000 + 21 + 0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + 0.5000 + 30 + 1.000 + 11 + -0.5000 + 21 + -0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + -0.5000 + 30 + 0.0000E+00 + 11 + -0.5000 + 21 + -0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + -0.5000 + 30 + 0.0000E+00 + 11 + -0.5000 + 21 + 0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + 0.5000 + 30 + 0.0000E+00 + 11 + 0.5000 + 21 + 0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + 0.5000 + 30 + 0.0000E+00 + 11 + 0.5000 + 21 + -0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + -0.5000 + 30 + 0.0000E+00 + 11 + -0.5000 + 21 + -0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + -0.5000 + 30 + 1.000 + 11 + -0.5000 + 21 + 0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + 0.5000 + 30 + 1.000 + 11 + -0.5000 + 21 + 0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + 0.5000 + 30 + 0.0000E+00 + 11 + -0.5000 + 21 + -0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + -0.5000 + 30 + 1.000 + 11 + 0.5000 + 21 + -0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + -0.5000 + 30 + 0.0000E+00 + 11 + 0.5000 + 21 + 0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + 0.5000 + 30 + 0.0000E+00 + 11 + 0.5000 + 21 + 0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + 0.5000 + 30 + 1.000 + 11 + 0.5000 + 21 + -0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + -0.5000 + 30 + 0.0000E+00 + 11 + 0.5000 + 21 + -0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + -0.5000 + 30 + 0.0000E+00 + 11 + 0.5000 + 21 + -0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + -0.5000 + 30 + 1.000 + 11 + -0.5000 + 21 + -0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + -0.5000 + 30 + 1.000 + 11 + -0.5000 + 21 + -0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + 0.5000 + 30 + 1.000 + 11 + 0.5000 + 21 + 0.5000 + 31 + 1.000 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + 0.5000 + 30 + 1.000 + 11 + 0.5000 + 21 + 0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 0.5000 + 20 + 0.5000 + 30 + 0.0000E+00 + 11 + -0.5000 + 21 + 0.5000 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -0.5000 + 20 + 0.5000 + 30 + 0.0000E+00 + 11 + -0.5000 + 21 + 0.5000 + 31 + 1.000 + 0 +ENDSEC + 0 +EOF diff --git a/packages/fpvectorial/examples/fpvviewer/diamond.dxf b/packages/fpvectorial/examples/fpvviewer/diamond.dxf new file mode 100644 index 0000000000..c0eb189756 --- /dev/null +++ b/packages/fpvectorial/examples/fpvviewer/diamond.dxf @@ -0,0 +1,200 @@ + 0 +SECTION + 2 +ENTITIES + 0 +LINE + 8 + 0 + 10 + 45.00 + 20 + 45.00 + 30 + 0.0000E+00 + 11 + 45.00 + 21 + -45.00 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 45.00 + 20 + -45.00 + 30 + 0.0000E+00 + 11 + 0.0000E+00 + 21 + 0.0000E+00 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 0.0000E+00 + 20 + 0.0000E+00 + 30 + 0.0000E+00 + 11 + -45.00 + 21 + 45.00 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -45.00 + 20 + 45.00 + 30 + 0.0000E+00 + 11 + 45.00 + 21 + 45.00 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 45.00 + 20 + 45.00 + 30 + 0.0000E+00 + 11 + 0.0000E+00 + 21 + 0.0000E+00 + 31 + -78.00 + 0 +LINE + 8 + 0 + 10 + 0.0000E+00 + 20 + 0.0000E+00 + 30 + -78.00 + 11 + 0.0000E+00 + 21 + 0.0000E+00 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 0.0000E+00 + 20 + 0.0000E+00 + 30 + 0.0000E+00 + 11 + -45.00 + 21 + -45.00 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -45.00 + 20 + -45.00 + 30 + 0.0000E+00 + 11 + 45.00 + 21 + 45.00 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + 45.00 + 20 + -45.00 + 30 + 0.0000E+00 + 11 + -45.00 + 21 + -45.00 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -45.00 + 20 + -45.00 + 30 + 0.0000E+00 + 11 + -45.00 + 21 + 45.00 + 31 + 0.0000E+00 + 0 +LINE + 8 + 0 + 10 + -45.00 + 20 + 45.00 + 30 + 0.0000E+00 + 11 + 0.0000E+00 + 21 + 0.0000E+00 + 31 + -78.00 + 0 +LINE + 8 + 0 + 10 + 0.0000E+00 + 20 + 0.0000E+00 + 30 + -78.00 + 11 + 45.00 + 21 + -45.00 + 31 + 0.0000E+00 + 0 +ENDSEC + 0 +EOF diff --git a/packages/fpvectorial/examples/fpvviewer/fpvv_mainform.lfm b/packages/fpvectorial/examples/fpvviewer/fpvv_mainform.lfm new file mode 100644 index 0000000000..0a305ac191 --- /dev/null +++ b/packages/fpvectorial/examples/fpvviewer/fpvv_mainform.lfm @@ -0,0 +1,34 @@ +object frmFPVViewer: TfrmFPVViewer + Left = 349 + Height = 240 + Top = 171 + Width = 240 + Caption = 'frmFPVViewer' + ClientHeight = 240 + ClientWidth = 240 + OnCreate = FormCreate + OnDestroy = FormDestroy + LCLVersion = '0.9.31' + object btnView: TButton + Left = 8 + Height = 25 + Top = 40 + Width = 224 + Caption = 'View' + OnClick = btnViewClick + TabOrder = 0 + end + object editFileName: TFileNameEdit + Left = 8 + Height = 25 + Top = 8 + Width = 200 + DialogOptions = [] + FilterIndex = 0 + HideDirectories = False + ButtonWidth = 23 + NumGlyphs = 0 + MaxLength = 0 + TabOrder = 1 + end +end diff --git a/packages/fpvectorial/examples/fpvviewer/fpvv_mainform.pas b/packages/fpvectorial/examples/fpvviewer/fpvv_mainform.pas new file mode 100644 index 0000000000..621cc96327 --- /dev/null +++ b/packages/fpvectorial/examples/fpvviewer/fpvv_mainform.pas @@ -0,0 +1,53 @@ +unit fpvv_mainform; + +{$mode objfpc}{$H+} + +interface + +uses + fpvectorial, svgvectorialwriter, Classes, SysUtils, FileUtil, Forms, Controls, + Graphics, Dialogs, StdCtrls, EditBtn; + +type + + { TfrmFPVViewer } + + TfrmFPVViewer = class(TForm) + btnView: TButton; + editFileName: TFileNameEdit; + procedure btnViewClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + private + { private declarations } + public + { public declarations } + Vec: TvVectorialDocument; + end; + +var + frmFPVViewer: TfrmFPVViewer; + +implementation + +{$R *.lfm} + +{ TfrmFPVViewer } + +procedure TfrmFPVViewer.btnViewClick(Sender: TObject); +begin + Vec.ReadFromFile(editFileName.FileName); +end; + +procedure TfrmFPVViewer.FormCreate(Sender: TObject); +begin + Vec := TvVectorialDocument.Create; +end; + +procedure TfrmFPVViewer.FormDestroy(Sender: TObject); +begin + Vec.Free; +end; + +end. + diff --git a/packages/fpvectorial/examples/fpvviewer/fpvviewer.lpi b/packages/fpvectorial/examples/fpvviewer/fpvviewer.lpi new file mode 100644 index 0000000000..3c0ddbef07 --- /dev/null +++ b/packages/fpvectorial/examples/fpvviewer/fpvviewer.lpi @@ -0,0 +1,169 @@ +<?xml version="1.0"?> +<CONFIG> + <ProjectOptions> + <Version Value="9"/> + <General> + <MainUnit Value="0"/> + <ResourceType Value="res"/> + <UseXPManifest Value="True"/> + <Icon Value="0"/> + <ActiveWindowIndexAtStart Value="0"/> + </General> + <i18n> + <EnableI18N LFM="False"/> + </i18n> + <VersionInfo> + <StringTable ProductVersion=""/> + </VersionInfo> + <BuildModes Count="1" Active="Default"> + <Item1 Name="Default" Default="True"/> + </BuildModes> + <PublishOptions> + <Version Value="2"/> + <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> + <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/> + </PublishOptions> + <RunParams> + <local> + <FormatVersion Value="1"/> + <LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> + </local> + </RunParams> + <RequiredPackages Count="1"> + <Item1> + <PackageName Value="LCL"/> + </Item1> + </RequiredPackages> + <Units Count="2"> + <Unit0> + <Filename Value="fpvviewer.lpr"/> + <IsPartOfProject Value="True"/> + <UnitName Value="fpvviewer"/> + <EditorIndex Value="1"/> + <WindowIndex Value="0"/> + <TopLine Value="1"/> + <CursorPos X="1" Y="1"/> + <UsageCount Value="20"/> + <Loaded Value="True"/> + </Unit0> + <Unit1> + <Filename Value="fpvv_mainform.pas"/> + <IsPartOfProject Value="True"/> + <ComponentName Value="frmFPVViewer"/> + <ResourceBaseClass Value="Form"/> + <UnitName Value="fpvv_mainform"/> + <IsVisibleTab Value="True"/> + <EditorIndex Value="0"/> + <WindowIndex Value="0"/> + <TopLine Value="13"/> + <CursorPos X="42" Y="39"/> + <UsageCount Value="20"/> + <Loaded Value="True"/> + <LoadedDesigner Value="True"/> + </Unit1> + </Units> + <JumpHistory Count="17" HistoryIndex="16"> + <Position1> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="11" Column="11" TopLine="1"/> + </Position1> + <Position2> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="14" Column="11" TopLine="1"/> + </Position2> + <Position3> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="171" Column="1" TopLine="135"/> + </Position3> + <Position4> + <Filename Value="fpvviewer.lpr"/> + <Caret Line="16" Column="9" TopLine="1"/> + </Position4> + <Position5> + <Filename Value="fpvviewer.lpr"/> + <Caret Line="8" Column="1" TopLine="1"/> + </Position5> + <Position6> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="36" Column="1" TopLine="25"/> + </Position6> + <Position7> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="41" Column="1" TopLine="12"/> + </Position7> + <Position8> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="8" Column="34" TopLine="1"/> + </Position8> + <Position9> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="134" Column="17" TopLine="61"/> + </Position9> + <Position10> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="8" Column="34" TopLine="1"/> + </Position10> + <Position11> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="163" Column="1" TopLine="126"/> + </Position11> + <Position12> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="8" Column="34" TopLine="1"/> + </Position12> + <Position13> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="161" Column="1" TopLine="1"/> + </Position13> + <Position14> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="8" Column="34" TopLine="1"/> + </Position14> + <Position15> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="12" Column="14" TopLine="37"/> + </Position15> + <Position16> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="47" Column="1" TopLine="26"/> + </Position16> + <Position17> + <Filename Value="fpvv_mainform.pas"/> + <Caret Line="38" Column="20" TopLine="13"/> + </Position17> + </JumpHistory> + </ProjectOptions> + <CompilerOptions> + <Version Value="9"/> + <Target> + <Filename Value="fpvviewer"/> + </Target> + <SearchPaths> + <IncludeFiles Value="$(ProjOutDir)"/> + <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> + </SearchPaths> + <Linking> + <Options> + <Win32> + <GraphicApplication Value="True"/> + </Win32> + </Options> + </Linking> + <Other> + <CompilerPath Value="$(CompPath)"/> + </Other> + </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/packages/fpvectorial/examples/fpvviewer/fpvviewer.lpr b/packages/fpvectorial/examples/fpvviewer/fpvviewer.lpr new file mode 100644 index 0000000000..9c273fea65 --- /dev/null +++ b/packages/fpvectorial/examples/fpvviewer/fpvviewer.lpr @@ -0,0 +1,23 @@ +{ +FPVectorial example application for viewing vectorial images + +Author: Felipe Monteiro de Carvalho + +License: Public Domain +} +program fpvviewer; + +{$mode objfpc}{$H+} + +uses + Interfaces, // this includes the LCL widgetset + Forms, fpvv_mainform; + +//{$R *.res} + +begin + Application.Initialize; + Application.CreateForm(TfrmFPVViewer, frmFPVViewer); + Application.Run; +end. + |
