here's a feature I wanted to make LONG time ago: variation preview in editor!!!

(still not sure if it will be MUCH useful... for an ordinary user... hmm... :)
This commit is contained in:
zueuk 2005-10-22 15:03:59 +00:00
parent 144fe058f6
commit 71923637a4
2 changed files with 202 additions and 103 deletions

View File

@ -81,7 +81,7 @@ object EditForm: TEditForm
object EditorToolBar: TToolBar object EditorToolBar: TToolBar
Left = 1 Left = 1
Top = 1 Top = 1
Width = 376 Width = 408
Height = 22 Height = 22
Align = alLeft Align = alLeft
ButtonWidth = 25 ButtonWidth = 25
@ -264,6 +264,25 @@ object EditForm: TEditForm
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
end end
object ToolButton2: TToolButton
Left = 374
Top = 0
Width = 8
Caption = 'ToolButton2'
ImageIndex = 14
Style = tbsSeparator
end
object tbVarPreview: TToolButton
Left = 382
Top = 0
Hint = 'Show/hide variation preview'
Caption = 'Variation Preview'
ImageIndex = 14
ParentShowHint = False
ShowHint = True
Style = tbsCheck
OnClick = tbVarPreviewClick
end
end end
end end
object EditPnl: TPanel object EditPnl: TPanel
@ -1312,14 +1331,14 @@ object EditForm: TEditForm
Left = 8 Left = 8
Top = 2 Top = 2
Width = 145 Width = 145
Height = 70 Height = 71
Caption = 'Transform color' Caption = 'Transform color'
TabOrder = 0 TabOrder = 0
object scrlXFormColor: TScrollBar object scrlXFormColor: TScrollBar
Left = 8 Left = 8
Top = 44 Top = 46
Width = 129 Width = 129
Height = 17 Height = 15
LargeChange = 10 LargeChange = 10
Max = 1000 Max = 1000
PageSize = 0 PageSize = 0
@ -1349,41 +1368,48 @@ object EditForm: TEditForm
Left = 8 Left = 8
Top = 77 Top = 77
Width = 145 Width = 145
Height = 217 Height = 212
Caption = 'Graph' Caption = 'Graph'
TabOrder = 1 TabOrder = 1
object Label20: TLabel object Label20: TLabel
Left = 8 Left = 8
Top = 56 Top = 56
Width = 82 Width = 56
Height = 13 Height = 13
Caption = 'Background color' Caption = 'Background'
end end
object Label21: TLabel object Label21: TLabel
Left = 8 Left = 8
Top = 176 Top = 96
Width = 89 Width = 50
Height = 13 Height = 13
Caption = 'Reference triangle' Caption = 'Reference'
end end
object Label8: TLabel object Label8: TLabel
Left = 8 Left = 75
Top = 96 Top = 56
Width = 50 Width = 50
Height = 13 Height = 13
Caption = 'Grid colors' Caption = 'Grid colors'
end end
object Label10: TLabel object Label10: TLabel
Left = 75
Top = 96
Width = 36
Height = 13
Caption = 'Helpers'
end
object Label1: TLabel
Left = 8 Left = 8
Top = 136 Top = 136
Width = 62 Width = 83
Height = 13 Height = 13
Caption = 'Helpers color' Caption = 'Variation preview'
end end
object pnlBackColor: TPanel object pnlBackColor: TPanel
Left = 8 Left = 8
Top = 72 Top = 72
Width = 129 Width = 62
Height = 17 Height = 17
Cursor = crHandPoint Cursor = crHandPoint
BevelOuter = bvLowered BevelOuter = bvLowered
@ -1405,7 +1431,7 @@ object EditForm: TEditForm
Top = 36 Top = 36
Width = 129 Width = 129
Height = 17 Height = 17
Caption = 'Enable helpers' Caption = 'Helper lines'
Checked = True Checked = True
State = cbChecked State = cbChecked
TabOrder = 2 TabOrder = 2
@ -1413,8 +1439,8 @@ object EditForm: TEditForm
end end
object pnlReference: TPanel object pnlReference: TPanel
Left = 8 Left = 8
Top = 192 Top = 112
Width = 129 Width = 62
Height = 17 Height = 17
Cursor = crHandPoint Cursor = crHandPoint
BevelOuter = bvLowered BevelOuter = bvLowered
@ -1423,9 +1449,9 @@ object EditForm: TEditForm
OnClick = pnlReferenceClick OnClick = pnlReferenceClick
end end
object pnlGridColor1: TPanel object pnlGridColor1: TPanel
Left = 8 Left = 75
Top = 112 Top = 72
Width = 62 Width = 29
Height = 17 Height = 17
Cursor = crHandPoint Cursor = crHandPoint
BevelOuter = bvLowered BevelOuter = bvLowered
@ -1434,9 +1460,9 @@ object EditForm: TEditForm
OnClick = pnlGridColor1Click OnClick = pnlGridColor1Click
end end
object pnlGridColor2: TPanel object pnlGridColor2: TPanel
Left = 75 Left = 108
Top = 112 Top = 72
Width = 62 Width = 29
Height = 17 Height = 17
Cursor = crHandPoint Cursor = crHandPoint
BevelOuter = bvLowered BevelOuter = bvLowered
@ -1445,9 +1471,9 @@ object EditForm: TEditForm
OnClick = pnlGridColor2Click OnClick = pnlGridColor2Click
end end
object pnlHelpersColor: TPanel object pnlHelpersColor: TPanel
Left = 8 Left = 75
Top = 152 Top = 112
Width = 129 Width = 62
Height = 17 Height = 17
Cursor = crHandPoint Cursor = crHandPoint
BevelOuter = bvLowered BevelOuter = bvLowered
@ -1455,6 +1481,36 @@ object EditForm: TEditForm
TabOrder = 6 TabOrder = 6
OnClick = pnlHelpersColorClick OnClick = pnlHelpersColorClick
end end
object trkVarPreviewDensity: TTrackBar
Left = 8
Top = 184
Width = 129
Height = 25
Hint = 'Variation preview density'
Min = 1
ParentShowHint = False
Position = 10
ShowHint = True
TabOrder = 7
TabStop = False
ThumbLength = 15
OnChange = tbVarPreviewClick
end
object trkVarPreviewRange: TTrackBar
Left = 8
Top = 152
Width = 129
Height = 25
Hint = 'Variation preview range'
Min = 1
ParentShowHint = False
Position = 1
ShowHint = True
TabOrder = 8
TabStop = False
ThumbLength = 15
OnChange = tbVarPreviewClick
end
end end
end end
end end
@ -1575,7 +1631,7 @@ object EditForm: TEditForm
Left = 353 Left = 353
Top = 80 Top = 80
Bitmap = { Bitmap = {
494C01010E001300040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 494C01010F001300040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
0000000000003600000028000000400000005000000001002000000000000050 0000000000003600000028000000400000005000000001002000000000000050
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
@ -1718,111 +1774,111 @@ object EditForm: TEditForm
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000049004B00000000000000000049004B00000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000 0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000004900
4B00000000000000000000000000000000000000000000000000000000000000
000049004B000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000049004B0000000000000000000000
0000000000000000000049004B00000000000000000049004B00000000000000
000000000000000000000000000049004B000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000 0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
000049004B000000000000000000000000000000000000000000000000004900
4B00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000049004B000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000049004B0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000049004B0000000000000000000000
00000000000000000000EBEBEB00A0A0A000A0A0A000EBEBEB00000000000000
000000000000000000000000000049004B000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000 0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000EBEBEB00EBEBEB00EBEBEB000000000000000000EBEBEB00EBEBEB00EBEB
0000000000000000000000000000000000000000000000000000000000000000 EB00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000 0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000008000800080008000800080008000 0000000000000000000000000000000000008000800080008000800080008000
8000000000000000000080008000800080008000800080008000800080008000 8000000000000000000080008000800080008000800080008000800080008000
8000800080008000800080008000800080000000000000000000000000000000 8000800080008000800080008000800080000000000000000000000000000000
0000EBEBEB00EBEBEB00EBEBEB000000000000000000EBEBEB00EBEBEB00EBEB
EB00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000049004B0000000000000000000000
00000000000000000000EBEBEB00A0A0A000A0A0A000EBEBEB00000000000000
000000000000000000000000000049004B000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000049004B000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000049004B0000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
000049004B000000000000000000000000000000000000000000000000004900
4B00000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000049004B0000000000000000000000
0000000000000000000049004B00000000000000000049004B00000000000000
000000000000000000000000000049004B000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000004900
4B00000000000000000000000000000000000000000000000000000000000000
000049004B000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000 0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000049004B00000000000000000049004B00000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000008000800000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
@ -2223,11 +2279,11 @@ object EditForm: TEditForm
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000FF7FFFFF00000000FF7FFFFF00000000 00000000000000000000000000000000FF7FFFFFFFFF0000FF7FFFFFFDBF0000
FF7FFFFF00000000E00FF3E700000000E007E1E700000000FF63C0E700000000 FF7FFFFFEFF70000E00FF3E77DBE0000E007E1E7F7EF0000FF63C0E7DC3B0000
FF73F3E700000000FF73F3E700000000FB73000000000000F363F3E700000000 FF73F3E7700E0000FF73F3E7E0070000FB730000E0070000F363F3E7700E0000
E007F3E700000000E00FF1C700000000F37FF80F00000000FB7FFC1F00000000 E007F3E7DC3B0000E00FF1C7F7EF0000F37FF80F7DBE0000FB7FFC1FEFF70000
FF7FFFFF00000000FF7FFFFF00000000FFFFFFFFFFFFFFFFF0070001FEFF8003 FF7FFFFFFDBF0000FF7FFFFFFFFF0000FFFFFFFFFFFFFFFFF0070001FEFF8003
F9F79FFD7FFDCFE7FCF7C8053EF9E7CFF277E4F51FF1F39FEF37F2754EE5F93F F9F79FFD7FFDCFE7FCF7C8053EF9E7CFF277E4F51FF1F39FEF37F2754EE5F93F
EF97F93567CDFC7FDFC7FC95729DFEFFDFE7FE45793D5555DFF7FF25729DFEFF EF97F93567CDFC7FDFC7FC95729DFEFFDFE7FE45793D5555DFF7FF25729DFEFF
DFFFFF9567CDFC7FEFC3FFCD4EE5F93FEFF3FFE51FF1F39FF3CBFFF13EF9E7CF DFFFFF9567CDFC7FEFC3FFCD4EE5F93FEFF3FFE51FF1F39FF3CBFFF13EF9E7CF
@ -2239,7 +2295,6 @@ object EditForm: TEditForm
C003E001E001E001C003F1F9F1F9F1F9C003F8F90009D8D9C003FC7980098C09 C003E001E001E001C003F1F9F1F9F1F9C003F8F90009D8D9C003FC7980098C09
C003F239C609C619C003F319E309E219C003F389F189F009C003F3C1F8C1F8C1 C003F239C609C619C003F319E309E219C003F389F189F009C003F3C1F8C1F8C1
C0030021FC41F061C0070031FE01E231C00FF3F9FF09C719C01FF3FDFF8D8F8D C0030021FC41F061C0070031FE01E231C00FF3F9FF09C719C01FF3FDFF8D8F8D
C03FF3FFFFCFDFDFFFFFF3FFFFEFFFFF00000000000000000000000000000000 C03FF3FFFFCFDFDFFFFFF3FFFFEFFFFF}
000000000000}
end end
end end

View File

@ -152,6 +152,11 @@ type
btnCoefsRect: TSpeedButton; btnCoefsRect: TSpeedButton;
btnCoefsPolar: TSpeedButton; btnCoefsPolar: TSpeedButton;
chkPreserve: TCheckBox; chkPreserve: TCheckBox;
Label1: TLabel;
trkVarPreviewDensity: TTrackBar;
trkVarPreviewRange: TTrackBar;
ToolButton2: TToolButton;
tbVarPreview: TToolButton;
procedure ValidateVariable; procedure ValidateVariable;
procedure vleVariablesValidate(Sender: TObject; ACol, ARow: Integer; const KeyName, KeyValue: string); procedure vleVariablesValidate(Sender: TObject; ACol, ARow: Integer; const KeyName, KeyValue: string);
procedure vleVariablesKeyPress(Sender: TObject; var Key: Char); procedure vleVariablesKeyPress(Sender: TObject; var Key: Char);
@ -276,6 +281,7 @@ type
procedure btnYcoefsClick(Sender: TObject); procedure btnYcoefsClick(Sender: TObject);
procedure btnOcoefsClick(Sender: TObject); procedure btnOcoefsClick(Sender: TObject);
procedure btnCoefsModeClick(Sender: TObject); procedure btnCoefsModeClick(Sender: TObject);
procedure tbVarPreviewClick(Sender: TObject);
private private
TriangleView: TCustomDrawControl; TriangleView: TCustomDrawControl;
@ -298,10 +304,12 @@ type
varDragPos, varDragOld: integer; varDragPos, varDragOld: integer;
varMM: boolean; //hack? varMM: boolean; //hack?
{
spinnerMode: boolean; spinnerMode: boolean;
spinnerOld, spinnerPos: integer; spinnerOld, spinnerPos: integer;
spinnerValue: double; spinnerValue: double;
SpinnerAssoc: TEdit; SpinnerAssoc: TEdit;
}
// --Z-- variables moved from outside // --Z-- variables moved from outside
GraphZoom: double; GraphZoom: double;
@ -1055,6 +1063,26 @@ begin
TextOut(a.x+2, a.y+1, 'A'); TextOut(a.x+2, a.y+1, 'A');
end; end;
if tbVarPreview.Down then
begin
assert(trkVarPreviewRange.position > 0);
assert(trkVarPreviewDensity.position > 0);
cp.xform[SelectedTriangle].prepare;
//for i := 0 to Transforms-1 do cp.xform[i].prepare;
i := trkVarPreviewRange.position * trkVarPreviewDensity.position;
d1 := trkVarPreviewDensity.position;
for ax := -i to i do
for ay := -i to i do
begin
tx := ax / d1;
ty := ay / d1;
//cp.xform[random(Transforms)].nextpoint(tx,ty,d);
cp.xform[SelectedTriangle].NextPoint(tx, ty, d); // d used as dummy var
a := toscreen(tx,-ty);
Pixels[a.x, a.Y] := GetTriangleColor(SelectedTriangle);//$ffffff;
end;
end;
if (TriangleCaught or CornerCaught) then // if dragging, draw pivot axis if (TriangleCaught or CornerCaught) then // if dragging, draw pivot axis
begin begin
@ -1834,6 +1862,14 @@ begin
mnuResetLoc.checked := Registry.ReadBool('ResetLocation') mnuResetLoc.checked := Registry.ReadBool('ResetLocation')
else mnuResetLoc.checked := true; else mnuResetLoc.checked := true;
//tbResetLoc.Down := mnuResetLoc.checked; //tbResetLoc.Down := mnuResetLoc.checked;
if Registry.ValueExists('VariationPreview') then
tbVarPreview.Down := Registry.ReadBool('VariationPreview')
else tbVarPreview.Down := false;
if Registry.ValueExists('VariationPreviewRange') then
trkVarPreviewRange.Position := Registry.ReadInteger('VariationPreviewRange');
if Registry.ValueExists('VariationPreviewDensity') then
trkVarPreviewDensity.Position := Registry.ReadInteger('VariationPreviewDensity');
end end
else begin else begin
UseTransformColors := False; UseTransformColors := False;
@ -2133,6 +2169,9 @@ begin
Registry.WriteInteger('HelpersColor', HelpersColor); Registry.WriteInteger('HelpersColor', HelpersColor);
Registry.WriteInteger('ReferenceTriangleColor', ReferenceTriangleColor); Registry.WriteInteger('ReferenceTriangleColor', ReferenceTriangleColor);
Registry.WriteBool('ResetLocation', mnuResetLoc.checked); Registry.WriteBool('ResetLocation', mnuResetLoc.checked);
Registry.WriteBool('VariationPreview', tbVarPreview.Down);
Registry.WriteInteger('VariationPreviewRange', trkVarPreviewRange.Position);
Registry.WriteInteger('VariationPreviewDensity', trkVarPreviewDensity.Position);
{ Size and position } { Size and position }
if EditForm.WindowState <> wsMaximized then begin if EditForm.WindowState <> wsMaximized then begin
Registry.WriteInteger('Top', EditForm.Top); Registry.WriteInteger('Top', EditForm.Top);
@ -3461,5 +3500,10 @@ begin
ShowSelectedInfo; ShowSelectedInfo;
end; end;
procedure TEditForm.tbVarPreviewClick(Sender: TObject);
begin
TriangleView.Invalidate;
end;
end. end.