Examples/pen_brush: Fix compilation with fpc 3.3.1

This commit is contained in:
wp_xyz 2021-09-22 19:52:20 +02:00
parent e8affb6df1
commit 22138558b0
3 changed files with 51 additions and 64 deletions

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<Version Value="10"/> <Version Value="12"/>
<General> <General>
<Flags> <Flags>
<LRSInOutputDirectory Value="False"/> <LRSInOutputDirectory Value="False"/>
<CompatibilityMode Value="True"/>
</Flags> </Flags>
<SessionStorage Value="InIDEConfig"/> <SessionStorage Value="InIDEConfig"/>
<MainUnit Value="0"/>
</General> </General>
<VersionInfo> <VersionInfo>
<Language Value=""/> <Language Value=""/>
@ -21,14 +21,12 @@
</BuildModes> </BuildModes>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions> </PublishOptions>
<RunParams> <RunParams>
<local> <FormatVersion Value="2"/>
<FormatVersion Value="1"/> <Modes Count="1">
</local> <Mode0 Name="default"/>
</Modes>
</RunParams> </RunParams>
<RequiredPackages Count="1"> <RequiredPackages Count="1">
<Item1> <Item1>

View File

@ -3,8 +3,8 @@ object Form1: TForm1
Height = 573 Height = 573
Top = 215 Top = 215
Width = 471 Width = 471
HorzScrollBar.Page = 471 HorzScrollBar.Page = 329
VertScrollBar.Page = 573 VertScrollBar.Page = 506
AutoScroll = True AutoScroll = True
AutoSize = True AutoSize = True
Caption = 'Pen and Brush' Caption = 'Pen and Brush'
@ -13,7 +13,7 @@ object Form1: TForm1
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '0.9.31' LCLVersion = '2.3.0.0'
object PaintBox: TPaintBox object PaintBox: TPaintBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
@ -34,48 +34,44 @@ object Form1: TForm1
AnchorSideTop.Control = WidthCombo AnchorSideTop.Control = WidthCombo
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 18 Left = 18
Height = 16 Height = 15
Top = 269 Top = 269
Width = 36 Width = 35
BorderSpacing.Left = 7 BorderSpacing.Left = 7
Caption = 'Width:' Caption = 'Width:'
ParentColor = False
end end
object Label4: TLabel object Label4: TLabel
AnchorSideLeft.Control = Label1 AnchorSideLeft.Control = Label1
AnchorSideTop.Control = CapsCombo AnchorSideTop.Control = CapsCombo
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 18 Left = 18
Height = 16 Height = 15
Top = 328 Top = 328
Width = 53 Width = 52
BorderSpacing.Left = 7 BorderSpacing.Left = 7
Caption = 'End Caps:' Caption = 'End Caps:'
ParentColor = False
end end
object Label5: TLabel object Label5: TLabel
AnchorSideLeft.Control = Label1 AnchorSideLeft.Control = Label1
AnchorSideTop.Control = JoinCombo AnchorSideTop.Control = JoinCombo
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 18 Left = 18
Height = 16 Height = 15
Top = 358 Top = 358
Width = 53 Width = 52
BorderSpacing.Left = 7 BorderSpacing.Left = 7
Caption = 'Join Style:' Caption = 'Join Style:'
ParentColor = False
end end
object Label6: TLabel object Label6: TLabel
AnchorSideLeft.Control = Label1 AnchorSideLeft.Control = Label1
AnchorSideTop.Control = PenColorBox AnchorSideTop.Control = PenColorBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 18 Left = 18
Height = 16 Height = 15
Top = 299 Top = 299
Width = 33 Width = 32
BorderSpacing.Left = 7 BorderSpacing.Left = 7
Caption = 'Color:' Caption = 'Color:'
ParentColor = False
end end
object Bevel1: TBevel object Bevel1: TBevel
AnchorSideLeft.Control = Label1 AnchorSideLeft.Control = Label1
@ -84,10 +80,10 @@ object Form1: TForm1
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 88 Left = 87
Height = 3 Height = 3
Top = 220 Top = 219
Width = 372 Width = 373
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 10 BorderSpacing.Left = 10
BorderSpacing.Right = 11 BorderSpacing.Right = 11
@ -97,26 +93,24 @@ object Form1: TForm1
AnchorSideTop.Control = FigureCombo AnchorSideTop.Control = FigureCombo
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 11 Left = 11
Height = 16 Height = 15
Top = 213 Top = 213
Width = 67 Width = 66
BorderSpacing.Left = 11 BorderSpacing.Left = 11
BorderSpacing.Top = 7 BorderSpacing.Top = 7
Caption = 'Pen options:' Caption = 'Pen options:'
ParentColor = False
end end
object Label2: TLabel object Label2: TLabel
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = JoinCombo AnchorSideTop.Control = JoinCombo
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 11 Left = 11
Height = 16 Height = 15
Top = 385 Top = 384
Width = 77 Width = 76
BorderSpacing.Left = 11 BorderSpacing.Left = 11
BorderSpacing.Top = 7 BorderSpacing.Top = 7
Caption = 'Brush options:' Caption = 'Brush options:'
ParentColor = False
end end
object Bevel2: TBevel object Bevel2: TBevel
AnchorSideLeft.Control = Bevel1 AnchorSideLeft.Control = Bevel1
@ -124,10 +118,10 @@ object Form1: TForm1
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 88 Left = 87
Height = 3 Height = 3
Top = 392 Top = 390
Width = 372 Width = 373
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Right = 11 BorderSpacing.Right = 11
end end
@ -136,48 +130,44 @@ object Form1: TForm1
AnchorSideTop.Control = PenStyleCombo AnchorSideTop.Control = PenStyleCombo
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 18 Left = 18
Height = 16 Height = 15
Top = 239 Top = 239
Width = 29 Width = 28
BorderSpacing.Left = 7 BorderSpacing.Left = 7
Caption = 'Style:' Caption = 'Style:'
ParentColor = False
end end
object Label8: TLabel object Label8: TLabel
AnchorSideLeft.Control = Label2 AnchorSideLeft.Control = Label2
AnchorSideTop.Control = BrushStyleCombo AnchorSideTop.Control = BrushStyleCombo
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 18 Left = 18
Height = 16 Height = 15
Top = 411 Top = 410
Width = 29 Width = 28
BorderSpacing.Left = 7 BorderSpacing.Left = 7
Caption = 'Style:' Caption = 'Style:'
ParentColor = False
end end
object Label9: TLabel object Label9: TLabel
AnchorSideLeft.Control = Label1 AnchorSideLeft.Control = Label1
AnchorSideTop.Control = BrushColorBox AnchorSideTop.Control = BrushColorBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 18 Left = 18
Height = 16 Height = 15
Top = 441 Top = 440
Width = 33 Width = 32
BorderSpacing.Left = 7 BorderSpacing.Left = 7
Caption = 'Color:' Caption = 'Color:'
ParentColor = False
end end
object Label10: TLabel object Label10: TLabel
AnchorSideLeft.Control = Label1 AnchorSideLeft.Control = Label1
AnchorSideTop.Control = FigureCombo AnchorSideTop.Control = FigureCombo
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 18 Left = 18
Height = 16 Height = 15
Top = 186 Top = 187
Width = 37 Width = 36
BorderSpacing.Left = 7 BorderSpacing.Left = 7
Caption = 'Figure:' Caption = 'Figure:'
ParentColor = False
end end
object Button1: TBitBtn object Button1: TBitBtn
AnchorSideTop.Control = BrushColorBox AnchorSideTop.Control = BrushColorBox
@ -186,16 +176,15 @@ object Form1: TForm1
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 386 Left = 385
Height = 26 Height = 26
Top = 471 Top = 469
Width = 74 Width = 75
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Around = 11 BorderSpacing.Around = 11
Caption = 'Close' Caption = 'Close'
Kind = bkClose Kind = bkClose
NumGlyphs = 0
TabOrder = 0 TabOrder = 0
end end
object WidthCombo: TComboBox object WidthCombo: TComboBox
@ -204,7 +193,7 @@ object Form1: TForm1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 100 Left = 100
Height = 23 Height = 23
Top = 266 Top = 265
Width = 140 Width = 140
AutoSelect = False AutoSelect = False
BorderSpacing.Left = 100 BorderSpacing.Left = 100
@ -231,7 +220,7 @@ object Form1: TForm1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 100 Left = 100
Height = 23 Height = 23
Top = 325 Top = 324
Width = 140 Width = 140
AutoSelect = False AutoSelect = False
BorderSpacing.Left = 100 BorderSpacing.Left = 100
@ -254,7 +243,7 @@ object Form1: TForm1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 100 Left = 100
Height = 23 Height = 23
Top = 355 Top = 354
Width = 140 Width = 140
AutoSelect = False AutoSelect = False
BorderSpacing.Left = 100 BorderSpacing.Left = 100
@ -277,7 +266,7 @@ object Form1: TForm1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 100 Left = 100
Height = 22 Height = 22
Top = 296 Top = 295
Width = 140 Width = 140
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames] Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames]
AutoSelect = False AutoSelect = False
@ -293,7 +282,7 @@ object Form1: TForm1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 100 Left = 100
Height = 23 Height = 23
Top = 236 Top = 235
Width = 140 Width = 140
AutoSelect = False AutoSelect = False
BorderSpacing.Left = 100 BorderSpacing.Left = 100
@ -309,7 +298,7 @@ object Form1: TForm1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 100 Left = 100
Height = 23 Height = 23
Top = 408 Top = 406
Width = 140 Width = 140
AutoSelect = False AutoSelect = False
BorderSpacing.Left = 100 BorderSpacing.Left = 100
@ -325,7 +314,7 @@ object Form1: TForm1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 100 Left = 100
Height = 22 Height = 22
Top = 438 Top = 436
Width = 140 Width = 140
Selected = clBtnFace Selected = clBtnFace
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames] Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames]
@ -368,7 +357,7 @@ object Form1: TForm1
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 247 Left = 247
Height = 19 Height = 19
Top = 268 Top = 267
Width = 70 Width = 70
BorderSpacing.Left = 7 BorderSpacing.Left = 7
Caption = 'Cosmetic' Caption = 'Cosmetic'

View File

@ -192,7 +192,7 @@ end;
procedure TForm1.PenChange(Sender: TObject); procedure TForm1.PenChange(Sender: TObject);
var var
Dashes: array[0..3] of DWord = (3, 7, 8, 6); Dashes: Graphics.TPenPattern = (3, 7, 8, 6);
begin begin
if PenStyleCombo.ItemIndex <> -1 then if PenStyleCombo.ItemIndex <> -1 then
PaintBox.Canvas.Pen.Style := TPenStyle(PenStyleCombo.ItemIndex); PaintBox.Canvas.Pen.Style := TPenStyle(PenStyleCombo.ItemIndex);