mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:29:36 +02:00
fpvectorial: Add 2-lines-text test to visual tests.
This commit is contained in:
parent
020d5d64ad
commit
b05560e6e5
@ -1,18 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<Version Value="9"/>
|
<Version Value="12"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<General>
|
<General>
|
||||||
|
<Flags>
|
||||||
|
<CompatibilityMode Value="True"/>
|
||||||
|
</Flags>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
|
||||||
<Title Value="visualtest"/>
|
<Title Value="visualtest"/>
|
||||||
<ResourceType Value="res"/>
|
<ResourceType Value="res"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
</General>
|
</General>
|
||||||
<VersionInfo>
|
|
||||||
<StringTable ProductVersion=""/>
|
|
||||||
</VersionInfo>
|
|
||||||
<BuildModes Count="1">
|
<BuildModes Count="1">
|
||||||
<Item1 Name="Default" Default="True"/>
|
<Item1 Name="Default" Default="True"/>
|
||||||
</BuildModes>
|
</BuildModes>
|
||||||
@ -20,9 +19,10 @@
|
|||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
</PublishOptions>
|
</PublishOptions>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<local>
|
<FormatVersion Value="2"/>
|
||||||
<FormatVersion Value="1"/>
|
<Modes Count="1">
|
||||||
</local>
|
<Mode0 Name="default"/>
|
||||||
|
</Modes>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="2">
|
<RequiredPackages Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
@ -70,6 +70,7 @@
|
|||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
|
<DebugInfoType Value="dsDwarf3"/>
|
||||||
<UseExternalDbgSyms Value="True"/>
|
<UseExternalDbgSyms Value="True"/>
|
||||||
</Debugging>
|
</Debugging>
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -9,7 +9,7 @@ object MainForm: TMainForm
|
|||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
LCLVersion = '1.7'
|
LCLVersion = '2.3.0.0'
|
||||||
object GbTree: TGroupBox
|
object GbTree: TGroupBox
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 686
|
Height = 686
|
||||||
@ -31,7 +31,6 @@ object MainForm: TMainForm
|
|||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Bottom = 4
|
BorderSpacing.Bottom = 4
|
||||||
BorderSpacing.Around = 4
|
BorderSpacing.Around = 4
|
||||||
DefaultItemHeight = 18
|
|
||||||
HideSelection = False
|
HideSelection = False
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
@ -153,7 +152,7 @@ object MainForm: TMainForm
|
|||||||
Left = 4
|
Left = 4
|
||||||
Height = 128
|
Height = 128
|
||||||
Top = 130
|
Top = 130
|
||||||
Width = 118
|
Width = 116
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
@ -161,7 +160,7 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Bottom = 4
|
BorderSpacing.Bottom = 4
|
||||||
Caption = 'Origin at BOTTOM'
|
Caption = 'Origin at BOTTOM'
|
||||||
ClientHeight = 108
|
ClientHeight = 108
|
||||||
ClientWidth = 114
|
ClientWidth = 112
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object BottomLeftPaintbox: TPaintBox
|
object BottomLeftPaintbox: TPaintBox
|
||||||
@ -184,7 +183,7 @@ object MainForm: TMainForm
|
|||||||
AnchorSideTop.Control = gbBottomLeft
|
AnchorSideTop.Control = gbBottomLeft
|
||||||
AnchorSideBottom.Control = gbRenderTest
|
AnchorSideBottom.Control = gbRenderTest
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 130
|
Left = 128
|
||||||
Height = 128
|
Height = 128
|
||||||
Top = 130
|
Top = 130
|
||||||
Width = 114
|
Width = 114
|
||||||
@ -377,7 +376,7 @@ object MainForm: TMainForm
|
|||||||
Left = 4
|
Left = 4
|
||||||
Height = 129
|
Height = 129
|
||||||
Top = 156
|
Top = 156
|
||||||
Width = 209
|
Width = 210
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
@ -385,7 +384,7 @@ object MainForm: TMainForm
|
|||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Written with origin at BOTTOM'
|
Caption = 'Written with origin at BOTTOM'
|
||||||
ClientHeight = 109
|
ClientHeight = 109
|
||||||
ClientWidth = 205
|
ClientWidth = 206
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object BtnViewBottomLeft: TButton
|
object BtnViewBottomLeft: TButton
|
||||||
@ -396,7 +395,7 @@ object MainForm: TMainForm
|
|||||||
Left = 114
|
Left = 114
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 42
|
Top = 42
|
||||||
Width = 87
|
Width = 88
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
@ -508,17 +507,17 @@ object MainForm: TMainForm
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = CbFileFormat
|
AnchorSideTop.Control = CbFileFormat
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 221
|
Left = 222
|
||||||
Height = 129
|
Height = 129
|
||||||
Top = 156
|
Top = 156
|
||||||
Width = 212
|
Width = 213
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
Caption = 'Written with origin at TOP'
|
Caption = 'Written with origin at TOP'
|
||||||
ClientHeight = 109
|
ClientHeight = 109
|
||||||
ClientWidth = 208
|
ClientWidth = 209
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object BtnViewTopLeft: TButton
|
object BtnViewTopLeft: TButton
|
||||||
@ -529,7 +528,7 @@ object MainForm: TMainForm
|
|||||||
Left = 114
|
Left = 114
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 41
|
Top = 41
|
||||||
Width = 90
|
Width = 91
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
|
@ -119,10 +119,14 @@ type
|
|||||||
// Bezier
|
// Bezier
|
||||||
procedure Render_Bezier(Apage: TvVectorialPage; AIntParam: Integer);
|
procedure Render_Bezier(Apage: TvVectorialPage; AIntParam: Integer);
|
||||||
|
|
||||||
// Text
|
// Text - single line
|
||||||
procedure Render_Text(APage: TvVectorialpage; AIntParam: Integer);
|
procedure Render_Text(APage: TvVectorialpage; AIntParam: Integer);
|
||||||
procedure Render_Text_Fonts(APage: TvVectorialPage; AIntParam: Integer);
|
procedure Render_Text_Fonts(APage: TvVectorialPage; AIntParam: Integer);
|
||||||
procedure Render_Text_Colors(APage: TvVectorialPage; AIntParam: Integer);
|
procedure Render_Text_Colors(APage: TvVectorialPage; AIntParam: Integer);
|
||||||
|
|
||||||
|
// Text as paragraph: 2 lines
|
||||||
|
procedure Render_2Lines(APage: TvVectorialPage; AIntParam: Integer);
|
||||||
|
|
||||||
public
|
public
|
||||||
{ public declarations }
|
{ public declarations }
|
||||||
end;
|
end;
|
||||||
@ -141,6 +145,7 @@ uses
|
|||||||
|
|
||||||
const
|
const
|
||||||
IMG_FOLDER = 'images' + PathDelim;
|
IMG_FOLDER = 'images' + PathDelim;
|
||||||
|
REFIMG_FOLDER = IMG_FOLDER + 'ref' + PathDelim;
|
||||||
NOT_SAVED = '(not saved)';
|
NOT_SAVED = '(not saved)';
|
||||||
|
|
||||||
|
|
||||||
@ -184,8 +189,8 @@ begin
|
|||||||
try
|
try
|
||||||
png.Assign(bmp);
|
png.Assign(bmp);
|
||||||
// renderParams := TRenderParams(Tree.Selected.Data);
|
// renderParams := TRenderParams(Tree.Selected.Data);
|
||||||
ForceDirectory(IMG_FOLDER);
|
ForceDirectory(REFIMG_FOLDER);
|
||||||
fn := IncludeTrailingPathDelimiter(IMG_FOLDER) + renderParams.RefFile;
|
fn := REFIMG_FOLDER + renderParams.RefFile;
|
||||||
png.SaveToFile(fn);
|
png.SaveToFile(fn);
|
||||||
finally
|
finally
|
||||||
png.Free;
|
png.Free;
|
||||||
@ -706,7 +711,9 @@ begin
|
|||||||
{ -----------------------------------------------}
|
{ -----------------------------------------------}
|
||||||
node0 := Tree.Items.AddChild(nil, 'Text');
|
node0 := Tree.Items.AddChild(nil, 'Text');
|
||||||
{ -----------------------------------------------}
|
{ -----------------------------------------------}
|
||||||
node := Tree.Items.AddChild(node0, 'horizontal');
|
node1 := Tree.Items.AddChild(node0, 'single line');
|
||||||
|
|
||||||
|
node := Tree.Items.AddChild(node1, 'horizontal');
|
||||||
Tree.Items.AddChildObject(node, 'left aligned',
|
Tree.Items.AddChildObject(node, 'left aligned',
|
||||||
TRenderParams.Create(@Render_Text, 'text_left.png', $0000));
|
TRenderParams.Create(@Render_Text, 'text_left.png', $0000));
|
||||||
Tree.Items.AddChildObject(node, 'centered',
|
Tree.Items.AddChildObject(node, 'centered',
|
||||||
@ -714,7 +721,7 @@ begin
|
|||||||
Tree.Items.AddChildObject(node, 'right aligned',
|
Tree.Items.AddChildObject(node, 'right aligned',
|
||||||
TRenderParams.Create(@Render_Text, 'text_right.png', $0002));
|
TRenderParams.Create(@Render_Text, 'text_right.png', $0002));
|
||||||
|
|
||||||
node := Tree.Items.AddChild(node0, 'rotated by 30 deg');
|
node := Tree.Items.AddChild(node1, 'rotated by 30 deg');
|
||||||
Tree.Items.AddChildObject(node, 'left aligned',
|
Tree.Items.AddChildObject(node, 'left aligned',
|
||||||
TRenderParams.Create(@Render_Text, 'text_left_30.png', $1000));
|
TRenderParams.Create(@Render_Text, 'text_left_30.png', $1000));
|
||||||
Tree.Items.AddChildObject(node, 'centered',
|
Tree.Items.AddChildObject(node, 'centered',
|
||||||
@ -722,7 +729,7 @@ begin
|
|||||||
Tree.Items.AddChildObject(node, 'right aligned',
|
Tree.Items.AddChildObject(node, 'right aligned',
|
||||||
TRenderParams.Create(@Render_Text, 'text_right_30.png', $1002));
|
TRenderParams.Create(@Render_Text, 'text_right_30.png', $1002));
|
||||||
|
|
||||||
node := Tree.Items.AddChild(node0, 'vertical (90 deg, upward)');
|
node := Tree.Items.AddChild(node1, 'vertical (90 deg, upward)');
|
||||||
Tree.Items.AddChildObject(node, 'left aligned',
|
Tree.Items.AddChildObject(node, 'left aligned',
|
||||||
TRenderParams.Create(@Render_Text, 'text_left_90.png', $2000));
|
TRenderParams.Create(@Render_Text, 'text_left_90.png', $2000));
|
||||||
Tree.Items.AddChildObject(node, 'centered',
|
Tree.Items.AddChildObject(node, 'centered',
|
||||||
@ -730,7 +737,7 @@ begin
|
|||||||
Tree.Items.AddChildObject(node, 'right aligned',
|
Tree.Items.AddChildObject(node, 'right aligned',
|
||||||
TRenderParams.Create(@Render_Text, 'text_right_90.png', $2002));
|
TRenderParams.Create(@Render_Text, 'text_right_90.png', $2002));
|
||||||
|
|
||||||
node := Tree.Items.AddChild(node0, 'vertical (-90 deg, downward)');
|
node := Tree.Items.AddChild(node1, 'vertical (-90 deg, downward)');
|
||||||
Tree.Items.AddChildObject(node, 'left aligned',
|
Tree.Items.AddChildObject(node, 'left aligned',
|
||||||
TRenderParams.Create(@Render_Text, 'text_left_m90.png', $3000));
|
TRenderParams.Create(@Render_Text, 'text_left_m90.png', $3000));
|
||||||
Tree.Items.AddChildObject(node, 'centered',
|
Tree.Items.AddChildObject(node, 'centered',
|
||||||
@ -738,6 +745,42 @@ begin
|
|||||||
Tree.Items.AddChildObject(node, 'right aligned',
|
Tree.Items.AddChildObject(node, 'right aligned',
|
||||||
TRenderParams.Create(@Render_Text, 'text_right_m90.png', $3002));
|
TRenderParams.Create(@Render_Text, 'text_right_m90.png', $3002));
|
||||||
|
|
||||||
|
// ----
|
||||||
|
node1 := Tree.Items.AddChild(node0, 'two lines');
|
||||||
|
|
||||||
|
node := Tree.Items.AddChild(node1, 'horizontal');
|
||||||
|
Tree.Items.AddChildObject(node, 'left aligned',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_left.png', $0000));
|
||||||
|
Tree.Items.AddChildObject(node, 'centered',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_center.png', $0001));
|
||||||
|
Tree.Items.AddChildObject(node, 'right aligned',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_right.png', $0002));
|
||||||
|
|
||||||
|
node := Tree.Items.AddChild(node1, 'rotated by 30 deg');
|
||||||
|
Tree.Items.AddChildObject(node, 'left aligned',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_left_30.png', $1000));
|
||||||
|
Tree.Items.AddChildObject(node, 'centered',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_center_30.png', $1001));
|
||||||
|
Tree.Items.AddChildObject(node, 'right aligned',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_right_30.png', $1002));
|
||||||
|
|
||||||
|
node := Tree.Items.AddChild(node1, 'vertical (90 deg, upward)');
|
||||||
|
Tree.Items.AddChildObject(node, 'left aligned',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_left_90.png', $2000));
|
||||||
|
Tree.Items.AddChildObject(node, 'centered',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_center_90.png', $2001));
|
||||||
|
Tree.Items.AddChildObject(node, 'right aligned',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_right_90.png', $2002));
|
||||||
|
|
||||||
|
node := Tree.Items.AddChild(node1, 'vertical (-90 deg, downward)');
|
||||||
|
Tree.Items.AddChildObject(node, 'left aligned',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_left_m90.png', $3000));
|
||||||
|
Tree.Items.AddChildObject(node, 'centered',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_center_m90.png', $3001));
|
||||||
|
Tree.Items.AddChildObject(node, 'right aligned',
|
||||||
|
TRenderParams.Create(@Render_2Lines, 'text2_right_m90.png', $3002));
|
||||||
|
|
||||||
|
// ----
|
||||||
node := Tree.Items.AddChild(node0, 'Fonts');
|
node := Tree.Items.AddChild(node0, 'Fonts');
|
||||||
Tree.Items.AddChildObject(node, 'Times New Roman + Courier New',
|
Tree.Items.AddChildObject(node, 'Times New Roman + Courier New',
|
||||||
TRenderParams.Create(@Render_Text_Fonts, 'text_fonts.png'));
|
TRenderParams.Create(@Render_Text_Fonts, 'text_fonts.png'));
|
||||||
@ -980,14 +1023,87 @@ begin
|
|||||||
APage.AddEntity(txt);
|
APage.AddEntity(txt);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainForm.Render_2Lines(APage: TvVectorialPage; AIntParam: Integer);
|
||||||
|
{ AIntParam and $000F = $0000 --> anchor at left
|
||||||
|
$0001 --> anchor at center
|
||||||
|
$0002 --> anchor at right
|
||||||
|
AIntParam and $F000 = $0000 --> horizontal
|
||||||
|
$1000 --> rotated 30deg
|
||||||
|
$2000 --> rotated 90deg
|
||||||
|
$3000 --> rotated -90deg }
|
||||||
|
const
|
||||||
|
XTEXT = 50;
|
||||||
|
YTEXT = 40; // we assume that y points up
|
||||||
|
L = 10;
|
||||||
|
var
|
||||||
|
para: TvParagraph;
|
||||||
|
txt: TvText;
|
||||||
|
p: TPath;
|
||||||
|
angle: double;
|
||||||
|
anchor: TvTextAnchor;
|
||||||
|
begin
|
||||||
|
case AIntParam and $000F of
|
||||||
|
$0000 : anchor := vtaStart;
|
||||||
|
$0001 : anchor := vtaMiddle;
|
||||||
|
$0002 : anchor := vtaEnd;
|
||||||
|
else raise Exception.Create('Text anchor not supported');
|
||||||
|
end;
|
||||||
|
case AIntParam and $F000 of
|
||||||
|
$0000 : angle := 0;
|
||||||
|
$1000 : angle := 30;
|
||||||
|
$2000 : angle := 90;
|
||||||
|
$3000 : angle := -90;
|
||||||
|
else raise Exception.Create('Text angle not supported.');
|
||||||
|
end;
|
||||||
|
|
||||||
|
// Draw "+" at the origin of the first line of the text
|
||||||
|
if APage.UseTopLeftCoordinates then begin
|
||||||
|
APage.StartPath (XTEXT - L, PAGE_SIZE - YTEXT);
|
||||||
|
APage.AddLineToPath(XTEXT + L, PAGE_SIZE - YTEXT);
|
||||||
|
APage.AddMoveToPath(XTEXT, PAGE_SIZE - YTEXT - L);
|
||||||
|
APage.AddLineToPath(XTEXT, PAGE_SIZE - YTEXT + L);
|
||||||
|
end else begin
|
||||||
|
APage.StartPath (XTEXT - L, YTEXT);
|
||||||
|
APage.AddLineToPath(XTEXT + L, YTEXT);
|
||||||
|
APage.AddMoveToPath(XTEXT, YTEXT - L);
|
||||||
|
APage.AddLineToPath(XTEXT, YTEXT + L);
|
||||||
|
end;
|
||||||
|
p := APage.EndPath;
|
||||||
|
p.Pen.Width := 1;
|
||||||
|
p.Pen.Color := colRed;
|
||||||
|
|
||||||
|
// Create paragraph
|
||||||
|
para := TvParagraph.Create(APage);
|
||||||
|
para.X := XTEXT;
|
||||||
|
if APage.UseTopLeftCoordinates then
|
||||||
|
para.Y := PAGE_SIZE - YTEXT
|
||||||
|
else
|
||||||
|
para.Y := YTEXT;
|
||||||
|
para.Font.Size := 16;
|
||||||
|
para.TextAnchor := anchor;
|
||||||
|
para.Font.Orientation := angle;
|
||||||
|
|
||||||
|
// Add text to the paragraph
|
||||||
|
txt := para.AddText('ABCDE');
|
||||||
|
txt := para.AddText('Fghij');
|
||||||
|
txt.Y := txt.Y + 1.5 * txt.Font.Size * APage.GetTopLeftCoords_Adjustment();
|
||||||
|
|
||||||
|
APage.AddEntity(para);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainForm.Render_Text_Fonts(APage: TvVectorialPage;
|
procedure TMainForm.Render_Text_Fonts(APage: TvVectorialPage;
|
||||||
AIntParam: Integer);
|
AIntParam: Integer);
|
||||||
var
|
var
|
||||||
txt: TvText;
|
txt: TvText;
|
||||||
|
yText: Integer;
|
||||||
begin
|
begin
|
||||||
txt := TvText.Create(APage);
|
txt := TvText.Create(APage);
|
||||||
txt.X := 10;
|
txt.X := 10;
|
||||||
txt.Y := 80;
|
yText := 80;
|
||||||
|
if APage.UseTopLeftCoordinates then
|
||||||
|
txt.Y := PAGE_SIZE - yText
|
||||||
|
else
|
||||||
|
txt.Y := yText;
|
||||||
txt.Font.Name := 'Times New Roman';
|
txt.Font.Name := 'Times New Roman';
|
||||||
txt.Font.Size := 10;
|
txt.Font.Size := 10;
|
||||||
txt.Value.Add('Times');
|
txt.Value.Add('Times');
|
||||||
@ -995,7 +1111,11 @@ begin
|
|||||||
|
|
||||||
txt := TvText.Create(APage);
|
txt := TvText.Create(APage);
|
||||||
txt.X := 10;
|
txt.X := 10;
|
||||||
txt.Y := 60;
|
yText := 60;
|
||||||
|
if APage.UseTopLeftCoordinates then
|
||||||
|
txt.Y := PAGE_SIZE - yText
|
||||||
|
else
|
||||||
|
txt.Y := yText;
|
||||||
txt.Font.Name := 'Courier New';
|
txt.Font.Name := 'Courier New';
|
||||||
txt.Font.Size := 12;
|
txt.Font.Size := 12;
|
||||||
txt.Value.Add('Courier');
|
txt.Value.Add('Courier');
|
||||||
@ -1004,12 +1124,17 @@ end;
|
|||||||
|
|
||||||
procedure TMainForm.Render_Text_Colors(APage: TvVectorialPage;
|
procedure TMainForm.Render_Text_Colors(APage: TvVectorialPage;
|
||||||
AIntParam: Integer);
|
AIntParam: Integer);
|
||||||
|
const
|
||||||
|
YTEXT = 80;
|
||||||
var
|
var
|
||||||
txt: TvText;
|
txt: TvText;
|
||||||
begin
|
begin
|
||||||
txt := TvText.Create(APage);
|
txt := TvText.Create(APage);
|
||||||
txt.X := 10;
|
txt.X := 10;
|
||||||
txt.Y := 80;
|
if APage.UseTopLeftCoordinates then
|
||||||
|
txt.Y := PAGE_SIZE - YTEXT
|
||||||
|
else
|
||||||
|
txt.Y := YTEXT;
|
||||||
txt.Font.Name := 'Times New Roman';
|
txt.Font.Name := 'Times New Roman';
|
||||||
txt.Font.Size := 14;
|
txt.Font.Size := 14;
|
||||||
txt.Font.Color := colRed;
|
txt.Font.Color := colRed;
|
||||||
@ -1113,7 +1238,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
fn := IncludeTrailingPathDelimiter(IMG_FOLDER) + renderParams.RefFile;
|
fn := IncludeTrailingPathDelimiter(REFIMG_FOLDER) + renderParams.RefFile;
|
||||||
if FileExists(fn) then begin
|
if FileExists(fn) then begin
|
||||||
RefImage.Picture.LoadFromFile(fn);
|
RefImage.Picture.LoadFromFile(fn);
|
||||||
RefImage.Hint := fn;
|
RefImage.Hint := fn;
|
||||||
|
Loading…
Reference in New Issue
Block a user