mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 21:39:21 +02:00
fpvectorial: Updates all examples
git-svn-id: trunk@33556 -
This commit is contained in:
parent
f05fbd0a1f
commit
88579992c9
@ -6,12 +6,12 @@ object formCorelExplorer: TformCorelExplorer
|
||||
Caption = 'FP Corel Explorer'
|
||||
ClientHeight = 345
|
||||
ClientWidth = 466
|
||||
LCLVersion = '0.9.29'
|
||||
LCLVersion = '0.9.31'
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Height = 14
|
||||
Height = 18
|
||||
Top = 40
|
||||
Width = 123
|
||||
Width = 158
|
||||
Caption = 'Location of the Input file:'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -37,25 +37,25 @@ object formCorelExplorer: TformCorelExplorer
|
||||
end
|
||||
object labelFilename: TLabel
|
||||
Left = 256
|
||||
Height = 14
|
||||
Height = 18
|
||||
Top = 65
|
||||
Width = 47
|
||||
Width = 62
|
||||
Caption = 'Filename:'
|
||||
ParentColor = False
|
||||
end
|
||||
object labelVersion: TLabel
|
||||
Left = 256
|
||||
Height = 14
|
||||
Height = 18
|
||||
Top = 88
|
||||
Width = 40
|
||||
Width = 52
|
||||
Caption = 'Version:'
|
||||
ParentColor = False
|
||||
end
|
||||
object labelSize: TLabel
|
||||
Left = 256
|
||||
Height = 14
|
||||
Height = 18
|
||||
Top = 112
|
||||
Width = 24
|
||||
Width = 32
|
||||
Caption = 'Size:'
|
||||
ParentColor = False
|
||||
end
|
||||
|
@ -34,7 +34,7 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
fpvectorial, cdrvectorialreader, svgvectorialwriter, pdfvectorialreader,
|
||||
fpvectorial, cdrvectorialreader, svgvectorialwriter, //pdfvectorialreader,
|
||||
fpvtocanvas;
|
||||
|
||||
{$R *.lfm}
|
||||
@ -72,7 +72,7 @@ begin
|
||||
|
||||
// Main data
|
||||
lCurChunk := TCDRChunk(lChunk.ChildChunks.Items[1]);
|
||||
labelSize.Caption := 'Size: ' + ;
|
||||
//labelSize.Caption := 'Size: ' + ;
|
||||
end;
|
||||
finally
|
||||
Reader.Free;
|
||||
|
@ -4,10 +4,8 @@
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<AlwaysBuild Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="fpcorelexplorer"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
@ -18,6 +16,9 @@
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||
@ -28,10 +29,14 @@
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
<PackageName Value="fpvectorialpkg"/>
|
||||
<DefaultFilename Value="..\fpvectorialpkg.lpk" Prefer="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
@ -49,13 +54,13 @@
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="9"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="fpcorelexplorer"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)\"/>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
|
@ -7,7 +7,7 @@ uses
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, fpce_mainform
|
||||
Forms, fpce_mainform, fpvectorialpkg
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
@ -1,26 +1,26 @@
|
||||
object formVectorialConverter: TformVectorialConverter
|
||||
Left = 216
|
||||
Height = 439
|
||||
Height = 456
|
||||
Top = 192
|
||||
Width = 240
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'FP Vectorial Converter'
|
||||
ClientHeight = 439
|
||||
ClientHeight = 456
|
||||
ClientWidth = 240
|
||||
LCLVersion = '0.9.31'
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Height = 18
|
||||
Top = 112
|
||||
Width = 172
|
||||
Top = 128
|
||||
Width = 158
|
||||
Caption = 'Location of the Input file:'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 11
|
||||
Height = 104
|
||||
Top = 8
|
||||
Width = 229
|
||||
Left = 6
|
||||
Height = 120
|
||||
Top = 0
|
||||
Width = 236
|
||||
AutoSize = False
|
||||
Caption = 'This converter application use the fpvectorial library to convert between various different vectorial graphics formats. The type is detected from the extension and the supported types are: PDF (*.pdf), SVG (*.svg) and Corel Draw file (*.cdr).'
|
||||
Font.Height = -12
|
||||
@ -31,7 +31,7 @@ object formVectorialConverter: TformVectorialConverter
|
||||
object editInput: TFileNameEdit
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 128
|
||||
Top = 144
|
||||
Width = 192
|
||||
DialogOptions = []
|
||||
FilterIndex = 0
|
||||
@ -44,15 +44,15 @@ object formVectorialConverter: TformVectorialConverter
|
||||
object Label3: TLabel
|
||||
Left = 8
|
||||
Height = 18
|
||||
Top = 152
|
||||
Width = 184
|
||||
Top = 168
|
||||
Width = 169
|
||||
Caption = 'Full path of the Output file:'
|
||||
ParentColor = False
|
||||
end
|
||||
object editOutput: TFileNameEdit
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 168
|
||||
Top = 184
|
||||
Width = 192
|
||||
DialogOptions = []
|
||||
FilterIndex = 0
|
||||
@ -65,7 +65,7 @@ object formVectorialConverter: TformVectorialConverter
|
||||
object buttonConvert: TButton
|
||||
Left = 87
|
||||
Height = 25
|
||||
Top = 192
|
||||
Top = 208
|
||||
Width = 67
|
||||
Caption = 'Convert'
|
||||
OnClick = buttonConvertClick
|
||||
@ -74,7 +74,7 @@ object formVectorialConverter: TformVectorialConverter
|
||||
object buttonQuit: TButton
|
||||
Left = 176
|
||||
Height = 25
|
||||
Top = 192
|
||||
Top = 208
|
||||
Width = 59
|
||||
Caption = 'Quit'
|
||||
OnClick = buttonQuitClick
|
||||
@ -83,13 +83,13 @@ object formVectorialConverter: TformVectorialConverter
|
||||
object imagePreview: TImage
|
||||
Left = 8
|
||||
Height = 210
|
||||
Top = 224
|
||||
Top = 240
|
||||
Width = 224
|
||||
end
|
||||
object buttonVisualize: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 192
|
||||
Top = 208
|
||||
Width = 59
|
||||
Caption = 'Visualize'
|
||||
OnClick = buttonVisualizeClick
|
||||
|
@ -38,7 +38,7 @@ var
|
||||
implementation
|
||||
|
||||
uses
|
||||
fpvectorial, cdrvectorialreader, svgvectorialwriter, pdfvectorialreader,
|
||||
fpvectorial, cdrvectorialreader, svgvectorialwriter, //pdfvectorialreader,
|
||||
fpvtocanvas;
|
||||
|
||||
{$R *.lfm}
|
||||
@ -62,7 +62,7 @@ begin
|
||||
Vec.ReadFromFile(editInput.FileName, vfPDF);
|
||||
imagePreview.Canvas.Brush.Color := clWhite;
|
||||
imagePreview.Canvas.FillRect(0, 0, imagePreview.Width, imagePreview.Height);
|
||||
DrawFPVectorialToCanvas(Vec, imagePreview.Canvas);
|
||||
DrawFPVectorialToCanvas(Vec.GetPage(0), imagePreview.Canvas);
|
||||
finally
|
||||
Vec.Free;
|
||||
end;
|
||||
|
@ -4,9 +4,6 @@
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<AlwaysBuild Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="fpvectorialconverter"/>
|
||||
@ -32,10 +29,14 @@
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="LCL"/>
|
||||
<PackageName Value="fpvectorialpkg"/>
|
||||
<DefaultFilename Value="..\fpvectorialpkg.lpk" Prefer="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
@ -53,7 +54,7 @@
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="9"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="fpvectorialconverter"/>
|
||||
|
@ -4,7 +4,7 @@ program fpvectorialconverter;
|
||||
|
||||
uses
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, fpvc_mainform;
|
||||
Forms, fpvc_mainform, fpvectorialpkg;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
|
@ -33,61 +33,69 @@
|
||||
<LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<Units Count="5">
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="fpvectorialpkg"/>
|
||||
<DefaultFilename Value="../fpvectorialpkg.lpk" Prefer="True"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="6">
|
||||
<Unit0>
|
||||
<Filename Value="fpvmodifytest.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="fpvmodifytest"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="19"/>
|
||||
<CursorPos X="1" Y="44"/>
|
||||
<TopLine Value="28"/>
|
||||
<CursorPos X="26" Y="35"/>
|
||||
<UsageCount Value="23"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="fpvectorial.pas"/>
|
||||
<UnitName Value="fpvectorial"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1267"/>
|
||||
<CursorPos X="16" Y="1275"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<UnitName Value="svgvectorialwriter"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="228"/>
|
||||
<CursorPos X="19" Y="245"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="svgvectorialreader.pas"/>
|
||||
<UnitName Value="svgvectorialreader"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="319"/>
|
||||
<CursorPos X="17" Y="352"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="fpvutils.pas"/>
|
||||
<UnitName Value="fpvutils"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="2"/>
|
||||
<CursorPos X="3" Y="14"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
<Unit5>
|
||||
<Filename Value="../fpvectorial.pas"/>
|
||||
<UnitName Value="fpvectorial"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="315"/>
|
||||
<CursorPos X="17" Y="335"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<JumpHistory Count="3" HistoryIndex="2">
|
||||
<Position1>
|
||||
<Filename Value="fpvmodifytest.pas"/>
|
||||
<Caret Line="40" Column="1" TopLine="19"/>
|
||||
@ -97,121 +105,13 @@
|
||||
<Caret Line="42" Column="1" TopLine="19"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="217" Column="9" TopLine="188"/>
|
||||
<Filename Value="fpvmodifytest.pas"/>
|
||||
<Caret Line="35" Column="26" TopLine="19"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="260" Column="3" TopLine="226"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="258" Column="1" TopLine="226"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="261" Column="1" TopLine="226"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="263" Column="1" TopLine="226"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="93" Column="1" TopLine="69"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="94" Column="1" TopLine="69"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="95" Column="1" TopLine="69"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="96" Column="1" TopLine="69"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="98" Column="1" TopLine="69"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="100" Column="1" TopLine="69"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="102" Column="1" TopLine="69"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="104" Column="1" TopLine="69"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="105" Column="1" TopLine="69"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="111" Column="1" TopLine="71"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="112" Column="1" TopLine="72"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="113" Column="1" TopLine="73"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="115" Column="1" TopLine="75"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="119" Column="1" TopLine="79"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="fpvectorial.pas"/>
|
||||
<Caret Line="1224" Column="24" TopLine="1206"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="183" Column="31" TopLine="180"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="55" Column="3" TopLine="131"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="26" Column="74" TopLine="2"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="27" Column="15" TopLine="2"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="259" Column="3" TopLine="227"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="28" Column="98" TopLine="27"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="217" Column="38" TopLine="193"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="svgvectorialwriter.pas"/>
|
||||
<Caret Line="220" Column="39" TopLine="188"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="10"/>
|
||||
<Version Value="11"/>
|
||||
<Target>
|
||||
<Filename Value="fpvmodifytest"/>
|
||||
</Target>
|
||||
|
@ -8,7 +8,7 @@ program fpvmodifytest;
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
fpvectorial, svgvectorialwriter, svgvectorialreader, fpvutils;
|
||||
fpvectorial, svgvectorialwriter, svgvectorialreader, fpvutils, fpvectorialpkg;
|
||||
|
||||
const
|
||||
cFormat = vfSVG;
|
||||
|
@ -34,6 +34,12 @@
|
||||
<LaunchingApplication PathPlusParams="\usr\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="1">
|
||||
<Item1>
|
||||
<PackageName Value="fpvectorialpkg"/>
|
||||
<DefaultFilename Value="..\fpvectorialpkg.lpk" Prefer="True"/>
|
||||
</Item1>
|
||||
</RequiredPackages>
|
||||
<Units Count="1">
|
||||
<Unit0>
|
||||
<Filename Value="fpvwritetest.pas"/>
|
||||
@ -43,7 +49,7 @@
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="10"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="fpvwritetest"/>
|
||||
|
@ -22,162 +22,161 @@ program fpvwritetest;
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
fpvectorial, svgvectorialwriter, fpvutils;
|
||||
fpvectorial, svgvectorialwriter, fpvutils, fpvectorialpkg;
|
||||
|
||||
const
|
||||
cFormat = vfSVG;
|
||||
cExtension = '.svg';
|
||||
var
|
||||
Vec: TvVectorialDocument;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
Page: TvVectorialPage;
|
||||
begin
|
||||
Vec := TvVectorialDocument.Create;
|
||||
try
|
||||
// All documents are 10cm x 10cm
|
||||
Vec.Width := 100;
|
||||
Vec.Height := 100;
|
||||
Page := Vec.AddPage();
|
||||
|
||||
// single_line_1 One line from (0, 20) to (30, 30)
|
||||
Vec.StartPath(0, 20);
|
||||
Vec.AddLineToPath(30, 30);
|
||||
Vec.EndPath();
|
||||
Page.StartPath(0, 20);
|
||||
Page.AddLineToPath(30, 30);
|
||||
Page.EndPath();
|
||||
Vec.WriteToFile('single_line_1' + cExtension, cFormat);
|
||||
|
||||
// single_line_2 One line from (20, 30) to (30, 20)
|
||||
Vec.Clear;
|
||||
Vec.StartPath(20, 30);
|
||||
Vec.AddLineToPath(30, 20);
|
||||
Vec.EndPath();
|
||||
Page.Clear;
|
||||
Page.StartPath(20, 30);
|
||||
Page.AddLineToPath(30, 20);
|
||||
Page.EndPath();
|
||||
Vec.WriteToFile('single_line_2' + cExtension, cFormat);
|
||||
|
||||
// single_line_3 One line from (0, 20) to (30, 30) + frame
|
||||
Vec.Clear;
|
||||
Vec.StartPath(0, 20);
|
||||
Vec.AddLineToPath(30, 30);
|
||||
Vec.EndPath();
|
||||
Vec.StartPath(0, 0);
|
||||
Vec.AddLineToPath(100, 0);
|
||||
Vec.AddLineToPath(100, 100);
|
||||
Vec.AddLineToPath(0, 100);
|
||||
Vec.AddLineToPath(0, 0);
|
||||
Vec.EndPath();
|
||||
Page.Clear;
|
||||
Page.StartPath(0, 20);
|
||||
Page.AddLineToPath(30, 30);
|
||||
Page.EndPath();
|
||||
Page.StartPath(0, 0);
|
||||
Page.AddLineToPath(100, 0);
|
||||
Page.AddLineToPath(100, 100);
|
||||
Page.AddLineToPath(0, 100);
|
||||
Page.AddLineToPath(0, 0);
|
||||
Page.EndPath();
|
||||
Vec.WriteToFile('single_line_3' + cExtension, cFormat);
|
||||
|
||||
// polyline_1 One line from (0, 0) to (10, 10) to (20, 30) to (30, 20)
|
||||
Vec.Clear;
|
||||
Vec.StartPath(0, 0);
|
||||
Vec.AddLineToPath(10, 10);
|
||||
Vec.AddLineToPath(20, 30);
|
||||
Vec.AddLineToPath(30, 20);
|
||||
Vec.EndPath();
|
||||
Page.Clear;
|
||||
Page.StartPath(0, 0);
|
||||
Page.AddLineToPath(10, 10);
|
||||
Page.AddLineToPath(20, 30);
|
||||
Page.AddLineToPath(30, 20);
|
||||
Page.EndPath();
|
||||
Vec.WriteToFile('polyline_1' + cExtension, cFormat);
|
||||
|
||||
// polyline_2 One line from (10, 10) to (20, 30) to (30, 20) to (40, 40)
|
||||
Vec.Clear;
|
||||
Vec.StartPath(10, 10);
|
||||
Vec.AddLineToPath(20, 30);
|
||||
Vec.AddLineToPath(30, 20);
|
||||
Vec.AddLineToPath(40, 40);
|
||||
Vec.EndPath();
|
||||
Page.Clear;
|
||||
Page.StartPath(10, 10);
|
||||
Page.AddLineToPath(20, 30);
|
||||
Page.AddLineToPath(30, 20);
|
||||
Page.AddLineToPath(40, 40);
|
||||
Page.EndPath();
|
||||
Vec.WriteToFile('polyline_2' + cExtension, cFormat);
|
||||
|
||||
// bezier_1 One path starting in (0, 0) lining to (10, 10) then bezier to (20, 10) and then line to (30, 0)
|
||||
Vec.Clear;
|
||||
Vec.StartPath(0, 0);
|
||||
Vec.AddLineToPath(10, 10);
|
||||
Vec.AddBezierToPath(10, 20, 20, 20, 20, 10);
|
||||
Vec.AddLineToPath(30, 0);
|
||||
Vec.EndPath();
|
||||
Page.Clear;
|
||||
Page.StartPath(0, 0);
|
||||
Page.AddLineToPath(10, 10);
|
||||
Page.AddBezierToPath(10, 20, 20, 20, 20, 10);
|
||||
Page.AddLineToPath(30, 0);
|
||||
Page.EndPath();
|
||||
Vec.WriteToFile('bezier_1' + cExtension, cFormat);
|
||||
|
||||
// bezier_2 One curve from (10, 10) to (20, 20)
|
||||
Vec.Clear;
|
||||
Vec.StartPath(10, 10);
|
||||
Vec.AddBezierToPath(10, 15, 15, 20, 20, 10);
|
||||
Vec.EndPath();
|
||||
Page.Clear;
|
||||
Page.StartPath(10, 10);
|
||||
Page.AddBezierToPath(10, 15, 15, 20, 20, 10);
|
||||
Page.EndPath();
|
||||
Vec.WriteToFile('bezier_2' + cExtension, cFormat);
|
||||
|
||||
// text_ascii One text written at (10, 10)
|
||||
Vec.Clear;
|
||||
Vec.AddText(10, 10, 0, '10,10 Some text in english.');
|
||||
Page.Clear;
|
||||
Page.AddText(10, 10, 0, '10,10 Some text in english.');
|
||||
Vec.WriteToFile('text_ascii' + cExtension, cFormat);
|
||||
|
||||
// text_europen One text testing european languages at (20, 20)
|
||||
Vec.Clear;
|
||||
Vec.AddText(20, 20, 0, '20, 20 Mówić, cześć, Włosku, Parabéns, Assunção, Correções.');
|
||||
Page.Clear;
|
||||
Page.AddText(20, 20, 0, '20, 20 Mówić, cześć, Włosku, Parabéns, Assunção, Correções.');
|
||||
Vec.WriteToFile('text_europen' + cExtension, cFormat);
|
||||
|
||||
// text_asian One text testing asian languages at (30, 30)
|
||||
Vec.Clear;
|
||||
Vec.AddText(30, 30, 0, '30, 30 森林,是一个高密度树木的区域');
|
||||
Page.Clear;
|
||||
Page.AddText(30, 30, 0, '30, 30 森林,是一个高密度树木的区域');
|
||||
Vec.WriteToFile('text_asian' + cExtension, cFormat);
|
||||
|
||||
// multi_test_1 Combines various elements
|
||||
Vec.Clear;
|
||||
Vec.StartPath(0, 20);
|
||||
Vec.AddLineToPath(30, 30);
|
||||
Vec.EndPath();
|
||||
Vec.StartPath(0, 0);
|
||||
Vec.AddLineToPath(100, 0);
|
||||
Vec.AddLineToPath(100, 100);
|
||||
Vec.AddLineToPath(0, 100);
|
||||
Vec.AddLineToPath(0, 0);
|
||||
Vec.EndPath();
|
||||
Vec.StartPath(0, 0);
|
||||
Vec.AddLineToPath(10, 10);
|
||||
Vec.AddBezierToPath(10, 20, 20, 20, 20, 10);
|
||||
Vec.AddLineToPath(30, 0);
|
||||
Vec.EndPath();
|
||||
Vec.AddText(10, 10, 0, '10,10 Some text in english.');
|
||||
Vec.AddText(20, 20, 0, '20, 20 Mówić, cześć, Włosku, Parabéns.');
|
||||
Vec.AddText(30, 30, 0, '30, 30 森林,是一个高密');
|
||||
Page.Clear;
|
||||
Page.StartPath(0, 20);
|
||||
Page.AddLineToPath(30, 30);
|
||||
Page.EndPath();
|
||||
Page.StartPath(0, 0);
|
||||
Page.AddLineToPath(100, 0);
|
||||
Page.AddLineToPath(100, 100);
|
||||
Page.AddLineToPath(0, 100);
|
||||
Page.AddLineToPath(0, 0);
|
||||
Page.EndPath();
|
||||
Page.StartPath(0, 0);
|
||||
Page.AddLineToPath(10, 10);
|
||||
Page.AddBezierToPath(10, 20, 20, 20, 20, 10);
|
||||
Page.AddLineToPath(30, 0);
|
||||
Page.EndPath();
|
||||
Page.AddText(10, 10, 0, '10,10 Some text in english.');
|
||||
Page.AddText(20, 20, 0, '20, 20 Mówić, cześć, Włosku, Parabéns.');
|
||||
Page.AddText(30, 30, 0, '30, 30 森林,是一个高密');
|
||||
Vec.WriteToFile('multi_test_1' + cExtension, cFormat);
|
||||
|
||||
// pen_test_1 Tests the properties of the Pen
|
||||
Vec.Clear;
|
||||
Vec.StartPath(0, 20);
|
||||
Vec.AddLineToPath(30, 30);
|
||||
Vec.SetPenWidth(10);
|
||||
Vec.EndPath();
|
||||
Vec.StartPath(0, 0);
|
||||
Vec.AddLineToPath(100, 0);
|
||||
Vec.AddLineToPath(100, 100);
|
||||
Vec.AddLineToPath(0, 100);
|
||||
Vec.AddLineToPath(0, 0);
|
||||
Vec.SetPenWidth(10);
|
||||
Vec.EndPath();
|
||||
Vec.StartPath(0, 0);
|
||||
Vec.AddLineToPath(10, 10);
|
||||
Vec.AddBezierToPath(10, 20, 20, 20, 20, 10);
|
||||
Vec.AddLineToPath(30, 0);
|
||||
Vec.SetPenWidth(10);
|
||||
Vec.EndPath();
|
||||
Page.Clear;
|
||||
Page.StartPath(0, 20);
|
||||
Page.AddLineToPath(30, 30);
|
||||
Page.SetPenWidth(10);
|
||||
Page.EndPath();
|
||||
Page.StartPath(0, 0);
|
||||
Page.AddLineToPath(100, 0);
|
||||
Page.AddLineToPath(100, 100);
|
||||
Page.AddLineToPath(0, 100);
|
||||
Page.AddLineToPath(0, 0);
|
||||
Page.SetPenWidth(10);
|
||||
Page.EndPath();
|
||||
Page.StartPath(0, 0);
|
||||
Page.AddLineToPath(10, 10);
|
||||
Page.AddBezierToPath(10, 20, 20, 20, 20, 10);
|
||||
Page.AddLineToPath(30, 0);
|
||||
Page.SetPenWidth(10);
|
||||
Page.EndPath();
|
||||
Vec.WriteToFile('pen_test_1' + cExtension, cFormat);
|
||||
|
||||
// pen_test_2 Tests the properties of the Pen
|
||||
Vec.Clear;
|
||||
Vec.StartPath(0, 20);
|
||||
Vec.AddLineToPath(30, 30);
|
||||
Vec.SetPenWidth(10);
|
||||
Vec.SetPenColor(RGBToVColor(255, 0, 0));
|
||||
Vec.EndPath();
|
||||
Vec.StartPath(0, 0);
|
||||
Vec.AddLineToPath(100, 0);
|
||||
Vec.AddLineToPath(100, 100);
|
||||
Vec.AddLineToPath(0, 100);
|
||||
Vec.AddLineToPath(0, 0);
|
||||
Vec.SetPenWidth(10);
|
||||
Vec.SetPenColor(RGBToVColor(0, 255, 0));
|
||||
Vec.EndPath();
|
||||
Vec.StartPath(0, 0);
|
||||
Vec.AddLineToPath(10, 10);
|
||||
Vec.AddBezierToPath(10, 20, 20, 20, 20, 10);
|
||||
Vec.AddLineToPath(30, 0);
|
||||
Vec.SetPenWidth(10);
|
||||
Vec.SetPenColor(RGBToVColor(0, 0, 255));
|
||||
Vec.EndPath();
|
||||
Page.Clear;
|
||||
Page.StartPath(0, 20);
|
||||
Page.AddLineToPath(30, 30);
|
||||
Page.SetPenWidth(10);
|
||||
Page.SetPenColor(RGBToFPColor(255, 0, 0));
|
||||
Page.EndPath();
|
||||
Page.StartPath(0, 0);
|
||||
Page.AddLineToPath(100, 0);
|
||||
Page.AddLineToPath(100, 100);
|
||||
Page.AddLineToPath(0, 100);
|
||||
Page.AddLineToPath(0, 0);
|
||||
Page.SetPenWidth(10);
|
||||
Page.SetPenColor(RGBToFPColor(0, 255, 0));
|
||||
Page.EndPath();
|
||||
Page.StartPath(0, 0);
|
||||
Page.AddLineToPath(10, 10);
|
||||
Page.AddBezierToPath(10, 20, 20, 20, 20, 10);
|
||||
Page.AddLineToPath(30, 0);
|
||||
Page.SetPenWidth(10);
|
||||
Page.SetPenColor(RGBToFPColor(0, 0, 255));
|
||||
Page.EndPath();
|
||||
Vec.WriteToFile('pen_test_2' + cExtension, cFormat);
|
||||
finally
|
||||
Vec.Free;
|
||||
|
Loading…
Reference in New Issue
Block a user