mirror of
https://github.com/moparisthebest/Simba
synced 2025-01-10 13:18:00 -05:00
Very sad bug... TImageList.Delete actually sorts the list of the images left,
so all the images of other nodes are invalid. So if an node is deleted, we have to Clear; the ImageList, en reassign all... Also made a few changes to OCR. git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@305 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
f80a36be1b
commit
c3f91d9199
@ -5,7 +5,7 @@ object ColourHistoryForm: TColourHistoryForm
|
|||||||
Width = 490
|
Width = 490
|
||||||
ActiveControl = SelectionName
|
ActiveControl = SelectionName
|
||||||
Caption = 'Colour Picker History'
|
Caption = 'Colour Picker History'
|
||||||
ClientHeight = 225
|
ClientHeight = 227
|
||||||
ClientWidth = 490
|
ClientWidth = 490
|
||||||
Constraints.MinHeight = 200
|
Constraints.MinHeight = 200
|
||||||
Constraints.MinWidth = 490
|
Constraints.MinWidth = 490
|
||||||
@ -17,7 +17,7 @@ object ColourHistoryForm: TColourHistoryForm
|
|||||||
object DeleteButton: TButton
|
object DeleteButton: TButton
|
||||||
Left = 16
|
Left = 16
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 183
|
Top = 185
|
||||||
Width = 128
|
Width = 128
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
Caption = 'Delete'
|
Caption = 'Delete'
|
||||||
@ -38,7 +38,7 @@ object ColourHistoryForm: TColourHistoryForm
|
|||||||
object PickNewColourButton: TButton
|
object PickNewColourButton: TButton
|
||||||
Left = 217
|
Left = 217
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 183
|
Top = 185
|
||||||
Width = 128
|
Width = 128
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
Caption = 'Pick New Colour'
|
Caption = 'Pick New Colour'
|
||||||
@ -67,14 +67,14 @@ object ColourHistoryForm: TColourHistoryForm
|
|||||||
object ColourImage: TImage
|
object ColourImage: TImage
|
||||||
Left = 152
|
Left = 152
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 184
|
Top = 186
|
||||||
Width = 57
|
Width = 57
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
Anchors = [akLeft, akRight, akBottom]
|
||||||
end
|
end
|
||||||
object OkButton: TButton
|
object OkButton: TButton
|
||||||
Left = 393
|
Left = 393
|
||||||
Height = 24
|
Height = 24
|
||||||
Top = 184
|
Top = 186
|
||||||
Width = 80
|
Width = 80
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
Caption = 'Ok'
|
Caption = 'Ok'
|
||||||
@ -93,7 +93,7 @@ object ColourHistoryForm: TColourHistoryForm
|
|||||||
end
|
end
|
||||||
object ColourTree: TTreeView
|
object ColourTree: TTreeView
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 144
|
Height = 146
|
||||||
Top = 16
|
Top = 16
|
||||||
Width = 337
|
Width = 337
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
@ -3,31 +3,31 @@
|
|||||||
LazarusResources.Add('TColourHistoryForm','FORMDATA',[
|
LazarusResources.Add('TColourHistoryForm','FORMDATA',[
|
||||||
'TPF0'#18'TColourHistoryForm'#17'ColourHistoryForm'#4'Left'#3'u'#1#6'Height'#3
|
'TPF0'#18'TColourHistoryForm'#17'ColourHistoryForm'#4'Left'#3'u'#1#6'Height'#3
|
||||||
+#250#0#3'Top'#3'4'#1#5'Width'#3#234#1#13'ActiveControl'#7#13'SelectionName'#7
|
+#250#0#3'Top'#3'4'#1#5'Width'#3#234#1#13'ActiveControl'#7#13'SelectionName'#7
|
||||||
+'Caption'#6#21'Colour Picker History'#12'ClientHeight'#3#225#0#11'ClientWidt'
|
+'Caption'#6#21'Colour Picker History'#12'ClientHeight'#3#227#0#11'ClientWidt'
|
||||||
+'h'#3#234#1#21'Constraints.MinHeight'#3#200#0#20'Constraints.MinWidth'#3#234
|
+'h'#3#234#1#21'Constraints.MinHeight'#3#200#0#20'Constraints.MinWidth'#3#234
|
||||||
+#1#4'Menu'#7#10'CHMainMenu'#8'OnCreate'#7#10'FormCreate'#6'OnHide'#7#15'UnSe'
|
+#1#4'Menu'#7#10'CHMainMenu'#8'OnCreate'#7#10'FormCreate'#6'OnHide'#7#15'UnSe'
|
||||||
+'tCHShowMenu'#6'OnShow'#7#13'SetCHShowMenu'#10'LCLVersion'#6#6'0.9.29'#0#7'T'
|
+'tCHShowMenu'#6'OnShow'#7#13'SetCHShowMenu'#10'LCLVersion'#6#6'0.9.29'#0#7'T'
|
||||||
+'Button'#12'DeleteButton'#4'Left'#2#16#6'Height'#2#25#3'Top'#3#183#0#5'Width'
|
+'Button'#12'DeleteButton'#4'Left'#2#16#6'Height'#2#25#3'Top'#3#185#0#5'Width'
|
||||||
+#3#128#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#6'Delete'#7'OnCl'
|
+#3#128#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#6'Delete'#7'OnCl'
|
||||||
+'ick'#7#14'DeleteSelected'#8'TabOrder'#2#0#0#0#5'TEdit'#13'SelectionName'#4
|
+'ick'#7#14'DeleteSelected'#8'TabOrder'#2#0#0#0#5'TEdit'#13'SelectionName'#4
|
||||||
+'Left'#3'i'#1#6'Height'#2#27#3'Top'#2#16#5'Width'#2'p'#7'Anchors'#11#5'akTop'
|
+'Left'#3'i'#1#6'Height'#2#27#3'Top'#2#16#5'Width'#2'p'#7'Anchors'#11#5'akTop'
|
||||||
+#7'akRight'#0#8'OnChange'#7#10'ChangeName'#10'OnKeyPress'#7#21'SelectionName'
|
+#7'akRight'#0#8'OnChange'#7#10'ChangeName'#10'OnKeyPress'#7#21'SelectionName'
|
||||||
+'KeyPress'#8'TabOrder'#2#1#4'Text'#6#4'Name'#0#0#7'TButton'#19'PickNewColour'
|
+'KeyPress'#8'TabOrder'#2#1#4'Text'#6#4'Name'#0#0#7'TButton'#19'PickNewColour'
|
||||||
+'Button'#4'Left'#3#217#0#6'Height'#2#25#3'Top'#3#183#0#5'Width'#3#128#0#7'An'
|
+'Button'#4'Left'#3#217#0#6'Height'#2#25#3'Top'#3#185#0#5'Width'#3#128#0#7'An'
|
||||||
+'chors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#15'Pick New Colour'#8'TabOr'
|
+'chors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#15'Pick New Colour'#8'TabOr'
|
||||||
+'der'#2#2#0#0#5'TEdit'#11'ColourValue'#4'Left'#3'i'#1#6'Height'#2#27#3'Top'#2
|
+'der'#2#2#0#0#5'TEdit'#11'ColourValue'#4'Left'#3'i'#1#6'Height'#2#27#3'Top'#2
|
||||||
+'8'#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'ReadOnly'#9#8'TabOrd'
|
+'8'#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'ReadOnly'#9#8'TabOrd'
|
||||||
+'er'#2#3#4'Text'#6#11'ColourValue'#0#0#6'TLabel'#10'CoordValue'#4'Left'#3'i'
|
+'er'#2#3#4'Text'#6#11'ColourValue'#0#0#6'TLabel'#10'CoordValue'#4'Left'#3'i'
|
||||||
+#1#6'Height'#2#18#3'Top'#2'`'#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'
|
+#1#6'Height'#2#18#3'Top'#2'`'#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'
|
||||||
+#0#7'Caption'#6#10'CoordValue'#20'Constraints.MinWidth'#2'p'#11'ParentColor'
|
+#0#7'Caption'#6#10'CoordValue'#20'Constraints.MinWidth'#2'p'#11'ParentColor'
|
||||||
+#8#0#0#6'TImage'#11'ColourImage'#4'Left'#3#152#0#6'Height'#2#24#3'Top'#3#184
|
+#8#0#0#6'TImage'#11'ColourImage'#4'Left'#3#152#0#6'Height'#2#24#3'Top'#3#186
|
||||||
+#0#5'Width'#2'9'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#0#0#7'TBut'
|
+#0#5'Width'#2'9'#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#0#0#7'TBut'
|
||||||
+'ton'#8'OkButton'#4'Left'#3#137#1#6'Height'#2#24#3'Top'#3#184#0#5'Width'#2'P'
|
+'ton'#8'OkButton'#4'Left'#3#137#1#6'Height'#2#24#3'Top'#3#186#0#5'Width'#2'P'
|
||||||
+#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#2'Ok'#7'OnClick'#7#13'O'
|
+#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#2'Ok'#7'OnClick'#7#13'O'
|
||||||
+'kButtonClick'#8'TabOrder'#2#4#0#0#6'TLabel'#12'CH_RGB_Label'#4'Left'#3'i'#1
|
+'kButtonClick'#8'TabOrder'#2#4#0#0#6'TLabel'#12'CH_RGB_Label'#4'Left'#3'i'#1
|
||||||
+#6'Height'#2#18#3'Top'#3#128#0#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRigh'
|
+#6'Height'#2#18#3'Top'#3#128#0#5'Width'#2'p'#7'Anchors'#11#5'akTop'#7'akRigh'
|
||||||
+'t'#0#7'Caption'#6#9'RGBValues'#20'Constraints.MinWidth'#2'p'#11'ParentColor'
|
+'t'#0#7'Caption'#6#9'RGBValues'#20'Constraints.MinWidth'#2'p'#11'ParentColor'
|
||||||
+#8#0#0#9'TTreeView'#10'ColourTree'#4'Left'#2#8#6'Height'#3#144#0#3'Top'#2#16
|
+#8#0#0#9'TTreeView'#10'ColourTree'#4'Left'#2#8#6'Height'#3#146#0#3'Top'#2#16
|
||||||
+#5'Width'#3'Q'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17
|
+#5'Width'#3'Q'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17
|
||||||
+'DefaultItemHeight'#2#19#8'DragMode'#7#11'dmAutomatic'#6'Images'#7#8'CHImage'
|
+'DefaultItemHeight'#2#19#8'DragMode'#7#11'dmAutomatic'#6'Images'#7#8'CHImage'
|
||||||
+'s'#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#5#8'OnChange'#7#16'ColourT'
|
+'s'#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#5#8'OnChange'#7#16'ColourT'
|
||||||
|
@ -158,23 +158,51 @@ begin
|
|||||||
SetNodeBitmap(it);
|
SetNodeBitmap(it);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure WalkDeleteTree(Node: TTreeNode; Img: TImageList);
|
||||||
|
var
|
||||||
|
N: TTreeNode;
|
||||||
|
|
||||||
|
begin
|
||||||
|
N := Node.GetFirstChild;
|
||||||
|
|
||||||
|
while assigned(n) do
|
||||||
|
begin
|
||||||
|
If Assigned(N.Data) then
|
||||||
|
TColourPickerObject(N.Data).Free;
|
||||||
|
WriteLn('Deleting ImageIndex: ' + IntToStr(n.ImageIndex) + '; Text: ' + N.Text);
|
||||||
|
Img.Delete(n.ImageIndex);
|
||||||
|
WalkDeleteTree(n, img);
|
||||||
|
n := n.GetNextSibling;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TColourHistoryForm.DeleteSelected(Sender: TObject);
|
procedure TColourHistoryForm.DeleteSelected(Sender: TObject);
|
||||||
|
|
||||||
var
|
var
|
||||||
i:integer;
|
i:integer;
|
||||||
|
e: TTreeNodesEnumerator;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (Assigned(ColourTree.Selected)) then
|
if (Assigned(ColourTree.Selected)) then
|
||||||
begin
|
begin
|
||||||
if Assigned(ColourTree.Selected.Data) then
|
if Assigned(ColourTree.Selected.Data) then
|
||||||
TColourPickerObject(ColourTree.Selected.Data).Free;
|
TColourPickerObject(ColourTree.Selected.Data).Free;
|
||||||
i:=ColourTree.Selected.ImageIndex;
|
|
||||||
ColourTree.Selected.ImageIndex:=0;
|
WalkDeleteTree(ColourTree.Selected, CHImages);
|
||||||
ColourTree.Selected.SelectedIndex:=-0;
|
|
||||||
CHImages.Delete(i);
|
WriteLn('Deleting ImageIndex: ' + IntToStr(ColourTree.Selected.ImageIndex) + '; Text: ' + ColourTree.Selected.Text);
|
||||||
|
CHImages.Delete(ColourTree.Selected.ImageIndex);
|
||||||
|
|
||||||
ColourTree.Selected.Delete;
|
ColourTree.Selected.Delete;
|
||||||
TreeChanged:=True;
|
TreeChanged := True;
|
||||||
|
|
||||||
|
{ Now, we have to recreate all images and their indices... Since the TImageList
|
||||||
|
fiddles with it's indices if one is deleted... Wtf? }
|
||||||
|
CHImages.Clear;
|
||||||
|
|
||||||
|
e := ColourTree.Items.GetEnumerator;
|
||||||
|
while e.MoveNext do
|
||||||
|
SetNodeBitmap(e.Current);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="260">
|
<Units Count="261">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="project1.lpr"/>
|
<Filename Value="project1.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -196,8 +196,8 @@
|
|||||||
<Filename Value="../../Units/MMLCore/client.pas"/>
|
<Filename Value="../../Units/MMLCore/client.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="Client"/>
|
<UnitName Value="Client"/>
|
||||||
<CursorPos X="45" Y="14"/>
|
<CursorPos X="48" Y="33"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="13"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<UsageCount Value="201"/>
|
<UsageCount Value="201"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -250,7 +250,7 @@
|
|||||||
<CursorPos X="23" Y="8"/>
|
<CursorPos X="23" Y="8"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="18"/>
|
<EditorIndex Value="18"/>
|
||||||
<UsageCount Value="78"/>
|
<UsageCount Value="79"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit27>
|
</Unit27>
|
||||||
<Unit28>
|
<Unit28>
|
||||||
@ -266,7 +266,7 @@
|
|||||||
<UnitName Value="finder"/>
|
<UnitName Value="finder"/>
|
||||||
<CursorPos X="58" Y="23"/>
|
<CursorPos X="58" Y="23"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="9"/>
|
||||||
<UsageCount Value="201"/>
|
<UsageCount Value="201"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit29>
|
</Unit29>
|
||||||
@ -750,7 +750,7 @@
|
|||||||
<CursorPos X="33" Y="34"/>
|
<CursorPos X="33" Y="34"/>
|
||||||
<TopLine Value="30"/>
|
<TopLine Value="30"/>
|
||||||
<EditorIndex Value="17"/>
|
<EditorIndex Value="17"/>
|
||||||
<UsageCount Value="37"/>
|
<UsageCount Value="38"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit98>
|
</Unit98>
|
||||||
<Unit99>
|
<Unit99>
|
||||||
@ -814,9 +814,9 @@
|
|||||||
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="ocr"/>
|
<UnitName Value="ocr"/>
|
||||||
<CursorPos X="105" Y="105"/>
|
<CursorPos X="59" Y="119"/>
|
||||||
<TopLine Value="252"/>
|
<TopLine Value="114"/>
|
||||||
<EditorIndex Value="9"/>
|
<EditorIndex Value="8"/>
|
||||||
<UsageCount Value="200"/>
|
<UsageCount Value="200"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit107>
|
</Unit107>
|
||||||
@ -1139,7 +1139,7 @@
|
|||||||
<UnitName Value="framescript"/>
|
<UnitName Value="framescript"/>
|
||||||
<CursorPos X="106" Y="190"/>
|
<CursorPos X="106" Y="190"/>
|
||||||
<TopLine Value="180"/>
|
<TopLine Value="180"/>
|
||||||
<UsageCount Value="197"/>
|
<UsageCount Value="199"/>
|
||||||
</Unit151>
|
</Unit151>
|
||||||
<Unit152>
|
<Unit152>
|
||||||
<Filename Value="framesynedit.lrs"/>
|
<Filename Value="framesynedit.lrs"/>
|
||||||
@ -1451,10 +1451,10 @@
|
|||||||
<ComponentName Value="ColourHistoryForm"/>
|
<ComponentName Value="ColourHistoryForm"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="colourhistory"/>
|
<UnitName Value="colourhistory"/>
|
||||||
<CursorPos X="76" Y="324"/>
|
<CursorPos X="22" Y="203"/>
|
||||||
<TopLine Value="295"/>
|
<TopLine Value="183"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="6"/>
|
||||||
<UsageCount Value="134"/>
|
<UsageCount Value="136"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit198>
|
</Unit198>
|
||||||
<Unit199>
|
<Unit199>
|
||||||
@ -1705,7 +1705,7 @@
|
|||||||
<UnitName Value="about"/>
|
<UnitName Value="about"/>
|
||||||
<CursorPos X="44" Y="21"/>
|
<CursorPos X="44" Y="21"/>
|
||||||
<TopLine Value="4"/>
|
<TopLine Value="4"/>
|
||||||
<UsageCount Value="97"/>
|
<UsageCount Value="99"/>
|
||||||
</Unit235>
|
</Unit235>
|
||||||
<Unit236>
|
<Unit236>
|
||||||
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/file.inc"/>
|
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/file.inc"/>
|
||||||
@ -1719,7 +1719,7 @@
|
|||||||
<UnitName Value="internets"/>
|
<UnitName Value="internets"/>
|
||||||
<CursorPos X="87" Y="3"/>
|
<CursorPos X="87" Y="3"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="91"/>
|
<UsageCount Value="93"/>
|
||||||
</Unit237>
|
</Unit237>
|
||||||
<Unit238>
|
<Unit238>
|
||||||
<Filename Value="debugimageform.pas"/>
|
<Filename Value="debugimageform.pas"/>
|
||||||
@ -1728,7 +1728,7 @@
|
|||||||
<UnitName Value="debugimageform"/>
|
<UnitName Value="debugimageform"/>
|
||||||
<CursorPos X="20" Y="1"/>
|
<CursorPos X="20" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<UsageCount Value="78"/>
|
<UsageCount Value="80"/>
|
||||||
</Unit238>
|
</Unit238>
|
||||||
<Unit239>
|
<Unit239>
|
||||||
<Filename Value="debugimage.pas"/>
|
<Filename Value="debugimage.pas"/>
|
||||||
@ -1739,7 +1739,7 @@
|
|||||||
<CursorPos X="1" Y="1"/>
|
<CursorPos X="1" Y="1"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="7"/>
|
||||||
<UsageCount Value="77"/>
|
<UsageCount Value="79"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit239>
|
</Unit239>
|
||||||
<Unit240>
|
<Unit240>
|
||||||
@ -1812,9 +1812,9 @@
|
|||||||
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
|
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
|
||||||
<UnitName Value="ocrutil"/>
|
<UnitName Value="ocrutil"/>
|
||||||
<CursorPos X="64" Y="22"/>
|
<CursorPos X="64" Y="22"/>
|
||||||
<TopLine Value="157"/>
|
<TopLine Value="25"/>
|
||||||
<EditorIndex Value="10"/>
|
<EditorIndex Value="10"/>
|
||||||
<UsageCount Value="25"/>
|
<UsageCount Value="26"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit250>
|
</Unit250>
|
||||||
<Unit251>
|
<Unit251>
|
||||||
@ -1843,7 +1843,7 @@
|
|||||||
<CursorPos X="37" Y="3116"/>
|
<CursorPos X="37" Y="3116"/>
|
||||||
<TopLine Value="3105"/>
|
<TopLine Value="3105"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="3"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="21"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit254>
|
</Unit254>
|
||||||
<Unit255>
|
<Unit255>
|
||||||
@ -1879,127 +1879,133 @@
|
|||||||
<TopLine Value="138"/>
|
<TopLine Value="138"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="11"/>
|
||||||
</Unit259>
|
</Unit259>
|
||||||
|
<Unit260>
|
||||||
|
<Filename Value="../../../../Documents/lazarus/lcl/include/graphic.inc"/>
|
||||||
|
<CursorPos X="1" Y="177"/>
|
||||||
|
<TopLine Value="157"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit260>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="212" Column="23" TopLine="189"/>
|
<Caret Line="410" Column="48" TopLine="387"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="217" Column="32" TopLine="193"/>
|
<Caret Line="87" Column="26" TopLine="58"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="199" Column="21" TopLine="193"/>
|
<Caret Line="366" Column="8" TopLine="350"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="192" Column="28" TopLine="157"/>
|
<Caret Line="365" Column="79" TopLine="344"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="155" Column="4" TopLine="139"/>
|
<Caret Line="371" Column="21" TopLine="355"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="150" Column="25" TopLine="148"/>
|
<Caret Line="376" Column="64" TopLine="356"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="196" Column="34" TopLine="176"/>
|
<Caret Line="393" Column="36" TopLine="356"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="334" Column="23" TopLine="297"/>
|
<Caret Line="389" Column="29" TopLine="361"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="362" Column="15" TopLine="325"/>
|
<Caret Line="399" Column="39" TopLine="371"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="381" Column="5" TopLine="356"/>
|
<Caret Line="395" Column="31" TopLine="375"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="376" Column="64" TopLine="356"/>
|
<Caret Line="342" Column="79" TopLine="330"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="410" Column="48" TopLine="387"/>
|
<Caret Line="391" Column="29" TopLine="361"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="87" Column="26" TopLine="58"/>
|
<Caret Line="91" Column="15" TopLine="56"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="366" Column="8" TopLine="350"/>
|
<Caret Line="31" Column="65" TopLine="23"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="365" Column="79" TopLine="344"/>
|
<Caret Line="393" Column="72" TopLine="383"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="371" Column="21" TopLine="355"/>
|
<Caret Line="364" Column="17" TopLine="332"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="376" Column="64" TopLine="356"/>
|
<Caret Line="227" Column="1" TopLine="200"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="393" Column="36" TopLine="356"/>
|
<Caret Line="79" Column="26" TopLine="52"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="389" Column="29" TopLine="361"/>
|
<Caret Line="177" Column="1" TopLine="134"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="399" Column="39" TopLine="371"/>
|
<Caret Line="317" Column="54" TopLine="295"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="../../Units/MMLCore/client.pas"/>
|
||||||
<Caret Line="395" Column="31" TopLine="375"/>
|
<Caret Line="33" Column="48" TopLine="13"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||||
<Caret Line="342" Column="79" TopLine="330"/>
|
<Caret Line="137" Column="43" TopLine="109"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||||
<Caret Line="391" Column="29" TopLine="361"/>
|
<Caret Line="134" Column="60" TopLine="114"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="../../Units/MMLCore/ocr.pas"/>
|
||||||
<Caret Line="91" Column="15" TopLine="56"/>
|
<Caret Line="135" Column="18" TopLine="114"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="31" Column="65" TopLine="23"/>
|
<Caret Line="74" Column="29" TopLine="49"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="393" Column="72" TopLine="383"/>
|
<Caret Line="170" Column="14" TopLine="153"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="364" Column="17" TopLine="332"/>
|
<Caret Line="191" Column="1" TopLine="169"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="227" Column="1" TopLine="200"/>
|
<Caret Line="172" Column="83" TopLine="157"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="79" Column="26" TopLine="52"/>
|
<Caret Line="201" Column="15" TopLine="172"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="colourhistory.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="177" Column="1" TopLine="134"/>
|
<Caret Line="205" Column="32" TopLine="169"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@ -5,7 +5,7 @@ object Form1: TForm1
|
|||||||
Width = 731
|
Width = 731
|
||||||
ActiveControl = ScriptPanel
|
ActiveControl = ScriptPanel
|
||||||
Caption = 'THA FUKING MUFASA'
|
Caption = 'THA FUKING MUFASA'
|
||||||
ClientHeight = 537
|
ClientHeight = 534
|
||||||
ClientWidth = 731
|
ClientWidth = 731
|
||||||
KeyPreview = True
|
KeyPreview = True
|
||||||
Menu = MainMenu1
|
Menu = MainMenu1
|
||||||
@ -166,8 +166,8 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object StatusBar: TStatusBar
|
object StatusBar: TStatusBar
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 17
|
||||||
Top = 514
|
Top = 517
|
||||||
Width = 731
|
Width = 731
|
||||||
Panels = <
|
Panels = <
|
||||||
item
|
item
|
||||||
@ -185,7 +185,7 @@ object Form1: TForm1
|
|||||||
object PanelMemo: TPanel
|
object PanelMemo: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 154
|
Height = 154
|
||||||
Top = 360
|
Top = 363
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
ClientHeight = 154
|
ClientHeight = 154
|
||||||
@ -205,25 +205,25 @@ object Form1: TForm1
|
|||||||
Cursor = crVSplit
|
Cursor = crVSplit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 5
|
Height = 5
|
||||||
Top = 355
|
Top = 358
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
ResizeAnchor = akBottom
|
ResizeAnchor = akBottom
|
||||||
end
|
end
|
||||||
object ScriptPanel: TPanel
|
object ScriptPanel: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 331
|
Height = 334
|
||||||
Top = 24
|
Top = 24
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
Caption = 'ScriptPanel'
|
Caption = 'ScriptPanel'
|
||||||
ClientHeight = 331
|
ClientHeight = 334
|
||||||
ClientWidth = 731
|
ClientWidth = 731
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 296
|
Height = 299
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -241,7 +241,7 @@ object Form1: TForm1
|
|||||||
object SearchPanel: TPanel
|
object SearchPanel: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 35
|
Height = 35
|
||||||
Top = 296
|
Top = 299
|
||||||
Width = 731
|
Width = 731
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvSpace
|
BevelOuter = bvSpace
|
||||||
@ -337,7 +337,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object LabeledEditSearch: TLabeledEdit
|
object LabeledEditSearch: TLabeledEdit
|
||||||
Left = 104
|
Left = 104
|
||||||
Height = 21
|
Height = 27
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 174
|
Width = 174
|
||||||
EditLabel.AnchorSideLeft.Control = LabeledEditSearch
|
EditLabel.AnchorSideLeft.Control = LabeledEditSearch
|
||||||
@ -345,10 +345,10 @@ object Form1: TForm1
|
|||||||
EditLabel.AnchorSideTop.Side = asrCenter
|
EditLabel.AnchorSideTop.Side = asrCenter
|
||||||
EditLabel.AnchorSideRight.Control = LabeledEditSearch
|
EditLabel.AnchorSideRight.Control = LabeledEditSearch
|
||||||
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
|
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
|
||||||
EditLabel.Left = 73
|
EditLabel.Left = 67
|
||||||
EditLabel.Height = 14
|
EditLabel.Height = 18
|
||||||
EditLabel.Top = 9
|
EditLabel.Top = 10
|
||||||
EditLabel.Width = 28
|
EditLabel.Width = 34
|
||||||
EditLabel.Caption = 'Find: '
|
EditLabel.Caption = 'Find: '
|
||||||
EditLabel.ParentColor = False
|
EditLabel.ParentColor = False
|
||||||
LabelPosition = lpLeft
|
LabelPosition = lpLeft
|
||||||
@ -361,9 +361,9 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object CheckBoxMatchCase: TCheckBox
|
object CheckBoxMatchCase: TCheckBox
|
||||||
Left = 320
|
Left = 320
|
||||||
Height = 17
|
Height = 20
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 72
|
Width = 95
|
||||||
Caption = 'Match case'
|
Caption = 'Match case'
|
||||||
OnClick = CheckBoxMatchCaseClick
|
OnClick = CheckBoxMatchCaseClick
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -54,6 +54,7 @@ uses
|
|||||||
|
|
||||||
const
|
const
|
||||||
ocr_Limit_High = 190;
|
ocr_Limit_High = 190;
|
||||||
|
ocr_Limit_Med = 130;
|
||||||
ocr_Limit_Low = 65;
|
ocr_Limit_Low = 65;
|
||||||
|
|
||||||
ocr_White = 16777215;
|
ocr_White = 16777215;
|
||||||
@ -125,7 +126,18 @@ begin
|
|||||||
bmp.fastsetpixel(x,y,ocr_Red);
|
bmp.fastsetpixel(x,y,ocr_Red);
|
||||||
continue;
|
continue;
|
||||||
end;
|
end;
|
||||||
|
if (r > ocr_Limit_High) and (g > ocr_Limit_Low) and (b < ocr_Limit_Low) then
|
||||||
|
begin
|
||||||
|
bmp.fastsetpixel(x,y,ocr_Red);
|
||||||
|
continue;
|
||||||
|
end;
|
||||||
|
if (r > ocr_Limit_Med) and (r < (ocr_Limit_High + 10)) and (g > ocr_Limit_Low - 10) and
|
||||||
|
(b < 20) then
|
||||||
|
begin
|
||||||
|
bmp.fastsetpixel(x,y,ocr_Green);
|
||||||
|
continue;
|
||||||
|
end;
|
||||||
|
//shadow
|
||||||
if (r < ocr_Limit_Low) and (g < ocr_Limit_Low) and (b < ocr_Limit_Low) then
|
if (r < ocr_Limit_Low) and (g < ocr_Limit_Low) and (b < ocr_Limit_Low) then
|
||||||
begin
|
begin
|
||||||
bmp.FastSetPixel(x,y, ocr_Purple);
|
bmp.FastSetPixel(x,y, ocr_Purple);
|
||||||
|
Loading…
Reference in New Issue
Block a user