mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 18:59:08 +02:00
Examples: Improve LazFreetype demo UI layout. Issue #39281, patch by CudaText man.
git-svn-id: trunk@65494 -
This commit is contained in:
parent
1205405307
commit
38023062fe
@ -20,8 +20,11 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, fpimage, Laz_AVL_Tree,
|
Classes, SysUtils, fpimage, Laz_AVL_Tree,
|
||||||
// LazUtils // Note: Types must be after TTTypes for PByte.
|
// LazUtils
|
||||||
LazUTF8, LazFreeType, TTRASTER, TTTypes, TTObjs, Types;
|
LazUTF8,
|
||||||
|
// FreeType
|
||||||
|
LazFreeType, TTRASTER, TTTypes, TTObjs,
|
||||||
|
Types; // Note: Types must be after TTTypes for PByte.
|
||||||
|
|
||||||
type
|
type
|
||||||
TGlyphRenderQuality = (grqMonochrome, grqLowQuality, grqHighQuality);
|
TGlyphRenderQuality = (grqMonochrome, grqLowQuality, grqHighQuality);
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
object Form1: TForm1
|
object Form1: TForm1
|
||||||
Left = 362
|
Left = 362
|
||||||
Height = 336
|
Height = 367
|
||||||
Top = 172
|
Top = 172
|
||||||
Width = 624
|
Width = 676
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
Caption = 'Test LazFreeType'
|
Caption = 'Test LazFreeType'
|
||||||
ClientHeight = 336
|
ClientHeight = 367
|
||||||
ClientWidth = 624
|
ClientWidth = 676
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
@ -14,54 +14,67 @@ object Form1: TForm1
|
|||||||
OnPaint = FormPaint
|
OnPaint = FormPaint
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
Position = poDefault
|
Position = poDefault
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.3.0.0'
|
||||||
object Panel_Option: TPanel
|
object Panel_Option: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 40
|
Height = 56
|
||||||
Top = 296
|
Top = 311
|
||||||
Width = 624
|
Width = 676
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
ClientHeight = 40
|
ClientHeight = 56
|
||||||
ClientWidth = 624
|
ClientWidth = 676
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object TrackBar_Size: TTrackBar
|
object TrackBar_Size: TTrackBar
|
||||||
Left = 96
|
AnchorSideLeft.Control = SpinEdit_Zoom
|
||||||
Height = 25
|
AnchorSideLeft.Side = asrBottom
|
||||||
Top = 8
|
AnchorSideTop.Control = Panel_Option
|
||||||
Width = 280
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = LFontSize
|
||||||
|
Left = 100
|
||||||
|
Height = 46
|
||||||
|
Top = 5
|
||||||
|
Width = 292
|
||||||
Frequency = 0
|
Frequency = 0
|
||||||
Max = 300
|
Max = 300
|
||||||
Min = 1
|
Min = 1
|
||||||
OnChange = TrackBar_SizeChange
|
OnChange = TrackBar_SizeChange
|
||||||
Position = 30
|
Position = 30
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Left = 4
|
||||||
|
BorderSpacing.Right = 4
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object LFontSize: TLabel
|
object LFontSize: TLabel
|
||||||
Left = 376
|
AnchorSideTop.Control = Panel_Option
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = LAngle
|
||||||
|
Left = 396
|
||||||
Height = 16
|
Height = 16
|
||||||
Top = 11
|
Top = 20
|
||||||
Width = 51
|
Width = 51
|
||||||
Alignment = taCenter
|
Alignment = taCenter
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
|
BorderSpacing.Right = 4
|
||||||
Caption = 'LFontSize'
|
Caption = 'LFontSize'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
|
AnchorSideTop.Control = Panel_Option
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 15
|
Height = 17
|
||||||
Top = 12
|
Top = 20
|
||||||
Width = 32
|
Width = 39
|
||||||
Caption = 'Zoom'
|
Caption = 'Zoom'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object SpinEdit_Zoom: TSpinEdit
|
object SpinEdit_Zoom: TSpinEdit
|
||||||
|
AnchorSideTop.Control = Panel_Option
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 48
|
Left = 48
|
||||||
Height = 23
|
Height = 26
|
||||||
Top = 8
|
Top = 15
|
||||||
Width = 40
|
Width = 48
|
||||||
MaxValue = 9
|
MaxValue = 9
|
||||||
MinValue = 1
|
MinValue = 1
|
||||||
OnChange = SpinEdit_ZoomChange
|
OnChange = SpinEdit_ZoomChange
|
||||||
@ -69,40 +82,56 @@ object Form1: TForm1
|
|||||||
Value = 1
|
Value = 1
|
||||||
end
|
end
|
||||||
object LAngle: TLabel
|
object LAngle: TLabel
|
||||||
Left = 440
|
AnchorSideTop.Control = Panel_Option
|
||||||
Height = 15
|
AnchorSideTop.Side = asrCenter
|
||||||
Top = 11
|
AnchorSideRight.Control = CheckBox_SingleLine
|
||||||
Width = 11
|
Left = 451
|
||||||
|
Height = 17
|
||||||
|
Top = 20
|
||||||
|
Width = 15
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Right = 4
|
||||||
Caption = '0º'
|
Caption = '0º'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
object CheckBox_SingleLine: TRadioButton
|
object CheckBox_SingleLine: TRadioButton
|
||||||
Left = 472
|
AnchorSideTop.Control = Panel_Option
|
||||||
Height = 19
|
AnchorSideTop.Side = asrCenter
|
||||||
Top = 12
|
AnchorSideRight.Control = CheckBox_Para
|
||||||
Width = 51
|
Left = 470
|
||||||
|
Height = 24
|
||||||
|
Top = 16
|
||||||
|
Width = 65
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Right = 4
|
||||||
Caption = '1 Line'
|
Caption = '1 Line'
|
||||||
OnChange = CheckBox_SingleLineChange
|
OnChange = CheckBox_SingleLineChange
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object CheckBox_Rot: TRadioButton
|
object CheckBox_Rot: TRadioButton
|
||||||
Left = 576
|
AnchorSideTop.Control = Panel_Option
|
||||||
Height = 19
|
AnchorSideTop.Side = asrCenter
|
||||||
Top = 12
|
AnchorSideRight.Control = Panel_Option
|
||||||
Width = 38
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 599
|
||||||
|
Height = 24
|
||||||
|
Top = 16
|
||||||
|
Width = 72
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Caption = 'Rot'
|
BorderSpacing.Right = 4
|
||||||
|
Caption = 'Rotate'
|
||||||
OnChange = CheckBox_SingleLineChange
|
OnChange = CheckBox_SingleLineChange
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object CheckBox_Para: TRadioButton
|
object CheckBox_Para: TRadioButton
|
||||||
Left = 528
|
AnchorSideTop.Control = Panel_Option
|
||||||
Height = 19
|
AnchorSideTop.Side = asrCenter
|
||||||
Top = 12
|
AnchorSideRight.Control = CheckBox_Rot
|
||||||
Width = 43
|
Left = 539
|
||||||
|
Height = 24
|
||||||
|
Top = 16
|
||||||
|
Width = 56
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Right = 4
|
||||||
Caption = 'Rect'
|
Caption = 'Rect'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = CheckBox_SingleLineChange
|
OnChange = CheckBox_SingleLineChange
|
||||||
|
@ -5,14 +5,14 @@ unit mainform;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Math, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
Classes, SysUtils, Math, fpimage,
|
||||||
ComCtrls, ExtCtrls, Spin, fpimage, LCLType,
|
// LazUtils
|
||||||
|
FileUtil,
|
||||||
IntfGraphics, GraphType, //Intf basic routines
|
// FreeType
|
||||||
|
EasyLazFreeType, LazFreeTypeFontCollection,
|
||||||
EasyLazFreeType, LazFreeTypeIntfDrawer, //EasyFreeType with Intf
|
// LCL
|
||||||
LazFreeTypeFontCollection
|
Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls, ExtCtrls, Spin, LCLType,
|
||||||
;
|
IntfGraphics, GraphType, LazFreeTypeIntfDrawer;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -7,7 +7,9 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, FPimage,
|
Classes, SysUtils, FPimage,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
GraphType, EasyLazFreeType,
|
GraphType,
|
||||||
|
// FreeType
|
||||||
|
EasyLazFreeType,
|
||||||
// LCL
|
// LCL
|
||||||
Graphics, IntfGraphics;
|
Graphics, IntfGraphics;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user