1
0
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:
Wizzup? 2009-12-21 15:13:41 +00:00
parent f80a36be1b
commit c3f91d9199
7 changed files with 3038 additions and 2992 deletions

View File

@ -5,7 +5,7 @@ object ColourHistoryForm: TColourHistoryForm
Width = 490
ActiveControl = SelectionName
Caption = 'Colour Picker History'
ClientHeight = 225
ClientHeight = 227
ClientWidth = 490
Constraints.MinHeight = 200
Constraints.MinWidth = 490
@ -17,7 +17,7 @@ object ColourHistoryForm: TColourHistoryForm
object DeleteButton: TButton
Left = 16
Height = 25
Top = 183
Top = 185
Width = 128
Anchors = [akLeft, akBottom]
Caption = 'Delete'
@ -38,7 +38,7 @@ object ColourHistoryForm: TColourHistoryForm
object PickNewColourButton: TButton
Left = 217
Height = 25
Top = 183
Top = 185
Width = 128
Anchors = [akRight, akBottom]
Caption = 'Pick New Colour'
@ -67,14 +67,14 @@ object ColourHistoryForm: TColourHistoryForm
object ColourImage: TImage
Left = 152
Height = 24
Top = 184
Top = 186
Width = 57
Anchors = [akLeft, akRight, akBottom]
end
object OkButton: TButton
Left = 393
Height = 24
Top = 184
Top = 186
Width = 80
Anchors = [akRight, akBottom]
Caption = 'Ok'
@ -93,7 +93,7 @@ object ColourHistoryForm: TColourHistoryForm
end
object ColourTree: TTreeView
Left = 8
Height = 144
Height = 146
Top = 16
Width = 337
Anchors = [akTop, akLeft, akRight, akBottom]

View File

@ -3,31 +3,31 @@
LazarusResources.Add('TColourHistoryForm','FORMDATA',[
'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
+'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
+#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'
+'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'
+'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'
+#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'
+'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'
+'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'
+'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'
+#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'
+'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'
+'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'
+'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
+'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'

View File

@ -158,23 +158,51 @@ begin
SetNodeBitmap(it);
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);
var
i:integer;
e: TTreeNodesEnumerator;
begin
if (Assigned(ColourTree.Selected)) then
begin
if Assigned(ColourTree.Selected.Data) then
TColourPickerObject(ColourTree.Selected.Data).Free;
i:=ColourTree.Selected.ImageIndex;
ColourTree.Selected.ImageIndex:=0;
ColourTree.Selected.SelectedIndex:=-0;
CHImages.Delete(i);
WalkDeleteTree(ColourTree.Selected, CHImages);
WriteLn('Deleting ImageIndex: ' + IntToStr(ColourTree.Selected.ImageIndex) + '; Text: ' + ColourTree.Selected.Text);
CHImages.Delete(ColourTree.Selected.ImageIndex);
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;

View File

@ -36,7 +36,7 @@
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="260">
<Units Count="261">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
@ -196,8 +196,8 @@
<Filename Value="../../Units/MMLCore/client.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="Client"/>
<CursorPos X="45" Y="14"/>
<TopLine Value="1"/>
<CursorPos X="48" Y="33"/>
<TopLine Value="13"/>
<EditorIndex Value="1"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
@ -250,7 +250,7 @@
<CursorPos X="23" Y="8"/>
<TopLine Value="1"/>
<EditorIndex Value="18"/>
<UsageCount Value="78"/>
<UsageCount Value="79"/>
<Loaded Value="True"/>
</Unit27>
<Unit28>
@ -266,7 +266,7 @@
<UnitName Value="finder"/>
<CursorPos X="58" Y="23"/>
<TopLine Value="1"/>
<EditorIndex Value="8"/>
<EditorIndex Value="9"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
</Unit29>
@ -750,7 +750,7 @@
<CursorPos X="33" Y="34"/>
<TopLine Value="30"/>
<EditorIndex Value="17"/>
<UsageCount Value="37"/>
<UsageCount Value="38"/>
<Loaded Value="True"/>
</Unit98>
<Unit99>
@ -814,9 +814,9 @@
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="ocr"/>
<CursorPos X="105" Y="105"/>
<TopLine Value="252"/>
<EditorIndex Value="9"/>
<CursorPos X="59" Y="119"/>
<TopLine Value="114"/>
<EditorIndex Value="8"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit107>
@ -1139,7 +1139,7 @@
<UnitName Value="framescript"/>
<CursorPos X="106" Y="190"/>
<TopLine Value="180"/>
<UsageCount Value="197"/>
<UsageCount Value="199"/>
</Unit151>
<Unit152>
<Filename Value="framesynedit.lrs"/>
@ -1451,10 +1451,10 @@
<ComponentName Value="ColourHistoryForm"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="colourhistory"/>
<CursorPos X="76" Y="324"/>
<TopLine Value="295"/>
<CursorPos X="22" Y="203"/>
<TopLine Value="183"/>
<EditorIndex Value="6"/>
<UsageCount Value="134"/>
<UsageCount Value="136"/>
<Loaded Value="True"/>
</Unit198>
<Unit199>
@ -1705,7 +1705,7 @@
<UnitName Value="about"/>
<CursorPos X="44" Y="21"/>
<TopLine Value="4"/>
<UsageCount Value="97"/>
<UsageCount Value="99"/>
</Unit235>
<Unit236>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/file.inc"/>
@ -1719,7 +1719,7 @@
<UnitName Value="internets"/>
<CursorPos X="87" Y="3"/>
<TopLine Value="1"/>
<UsageCount Value="91"/>
<UsageCount Value="93"/>
</Unit237>
<Unit238>
<Filename Value="debugimageform.pas"/>
@ -1728,7 +1728,7 @@
<UnitName Value="debugimageform"/>
<CursorPos X="20" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="78"/>
<UsageCount Value="80"/>
</Unit238>
<Unit239>
<Filename Value="debugimage.pas"/>
@ -1739,7 +1739,7 @@
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<EditorIndex Value="7"/>
<UsageCount Value="77"/>
<UsageCount Value="79"/>
<Loaded Value="True"/>
</Unit239>
<Unit240>
@ -1812,9 +1812,9 @@
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<UnitName Value="ocrutil"/>
<CursorPos X="64" Y="22"/>
<TopLine Value="157"/>
<TopLine Value="25"/>
<EditorIndex Value="10"/>
<UsageCount Value="25"/>
<UsageCount Value="26"/>
<Loaded Value="True"/>
</Unit250>
<Unit251>
@ -1843,7 +1843,7 @@
<CursorPos X="37" Y="3116"/>
<TopLine Value="3105"/>
<EditorIndex Value="3"/>
<UsageCount Value="20"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit254>
<Unit255>
@ -1879,127 +1879,133 @@
<TopLine Value="138"/>
<UsageCount Value="11"/>
</Unit259>
<Unit260>
<Filename Value="../../../../Documents/lazarus/lcl/include/graphic.inc"/>
<CursorPos X="1" Y="177"/>
<TopLine Value="157"/>
<UsageCount Value="10"/>
</Unit260>
</Units>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="colourhistory.pas"/>
<Caret Line="212" Column="23" TopLine="189"/>
<Caret Line="410" Column="48" TopLine="387"/>
</Position1>
<Position2>
<Filename Value="colourhistory.pas"/>
<Caret Line="217" Column="32" TopLine="193"/>
<Caret Line="87" Column="26" TopLine="58"/>
</Position2>
<Position3>
<Filename Value="colourhistory.pas"/>
<Caret Line="199" Column="21" TopLine="193"/>
<Caret Line="366" Column="8" TopLine="350"/>
</Position3>
<Position4>
<Filename Value="colourhistory.pas"/>
<Caret Line="192" Column="28" TopLine="157"/>
<Caret Line="365" Column="79" TopLine="344"/>
</Position4>
<Position5>
<Filename Value="colourhistory.pas"/>
<Caret Line="155" Column="4" TopLine="139"/>
<Caret Line="371" Column="21" TopLine="355"/>
</Position5>
<Position6>
<Filename Value="colourhistory.pas"/>
<Caret Line="150" Column="25" TopLine="148"/>
<Caret Line="376" Column="64" TopLine="356"/>
</Position6>
<Position7>
<Filename Value="colourhistory.pas"/>
<Caret Line="196" Column="34" TopLine="176"/>
<Caret Line="393" Column="36" TopLine="356"/>
</Position7>
<Position8>
<Filename Value="colourhistory.pas"/>
<Caret Line="334" Column="23" TopLine="297"/>
<Caret Line="389" Column="29" TopLine="361"/>
</Position8>
<Position9>
<Filename Value="colourhistory.pas"/>
<Caret Line="362" Column="15" TopLine="325"/>
<Caret Line="399" Column="39" TopLine="371"/>
</Position9>
<Position10>
<Filename Value="colourhistory.pas"/>
<Caret Line="381" Column="5" TopLine="356"/>
<Caret Line="395" Column="31" TopLine="375"/>
</Position10>
<Position11>
<Filename Value="colourhistory.pas"/>
<Caret Line="376" Column="64" TopLine="356"/>
<Caret Line="342" Column="79" TopLine="330"/>
</Position11>
<Position12>
<Filename Value="colourhistory.pas"/>
<Caret Line="410" Column="48" TopLine="387"/>
<Caret Line="391" Column="29" TopLine="361"/>
</Position12>
<Position13>
<Filename Value="colourhistory.pas"/>
<Caret Line="87" Column="26" TopLine="58"/>
<Caret Line="91" Column="15" TopLine="56"/>
</Position13>
<Position14>
<Filename Value="colourhistory.pas"/>
<Caret Line="366" Column="8" TopLine="350"/>
<Caret Line="31" Column="65" TopLine="23"/>
</Position14>
<Position15>
<Filename Value="colourhistory.pas"/>
<Caret Line="365" Column="79" TopLine="344"/>
<Caret Line="393" Column="72" TopLine="383"/>
</Position15>
<Position16>
<Filename Value="colourhistory.pas"/>
<Caret Line="371" Column="21" TopLine="355"/>
<Caret Line="364" Column="17" TopLine="332"/>
</Position16>
<Position17>
<Filename Value="colourhistory.pas"/>
<Caret Line="376" Column="64" TopLine="356"/>
<Caret Line="227" Column="1" TopLine="200"/>
</Position17>
<Position18>
<Filename Value="colourhistory.pas"/>
<Caret Line="393" Column="36" TopLine="356"/>
<Caret Line="79" Column="26" TopLine="52"/>
</Position18>
<Position19>
<Filename Value="colourhistory.pas"/>
<Caret Line="389" Column="29" TopLine="361"/>
<Caret Line="177" Column="1" TopLine="134"/>
</Position19>
<Position20>
<Filename Value="colourhistory.pas"/>
<Caret Line="399" Column="39" TopLine="371"/>
<Caret Line="317" Column="54" TopLine="295"/>
</Position20>
<Position21>
<Filename Value="colourhistory.pas"/>
<Caret Line="395" Column="31" TopLine="375"/>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="33" Column="48" TopLine="13"/>
</Position21>
<Position22>
<Filename Value="colourhistory.pas"/>
<Caret Line="342" Column="79" TopLine="330"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="137" Column="43" TopLine="109"/>
</Position22>
<Position23>
<Filename Value="colourhistory.pas"/>
<Caret Line="391" Column="29" TopLine="361"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="134" Column="60" TopLine="114"/>
</Position23>
<Position24>
<Filename Value="colourhistory.pas"/>
<Caret Line="91" Column="15" TopLine="56"/>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<Caret Line="135" Column="18" TopLine="114"/>
</Position24>
<Position25>
<Filename Value="colourhistory.pas"/>
<Caret Line="31" Column="65" TopLine="23"/>
<Caret Line="74" Column="29" TopLine="49"/>
</Position25>
<Position26>
<Filename Value="colourhistory.pas"/>
<Caret Line="393" Column="72" TopLine="383"/>
<Caret Line="170" Column="14" TopLine="153"/>
</Position26>
<Position27>
<Filename Value="colourhistory.pas"/>
<Caret Line="364" Column="17" TopLine="332"/>
<Caret Line="191" Column="1" TopLine="169"/>
</Position27>
<Position28>
<Filename Value="colourhistory.pas"/>
<Caret Line="227" Column="1" TopLine="200"/>
<Caret Line="172" Column="83" TopLine="157"/>
</Position28>
<Position29>
<Filename Value="colourhistory.pas"/>
<Caret Line="79" Column="26" TopLine="52"/>
<Caret Line="201" Column="15" TopLine="172"/>
</Position29>
<Position30>
<Filename Value="colourhistory.pas"/>
<Caret Line="177" Column="1" TopLine="134"/>
<Caret Line="205" Column="32" TopLine="169"/>
</Position30>
</JumpHistory>
</ProjectOptions>

View File

@ -5,7 +5,7 @@ object Form1: TForm1
Width = 731
ActiveControl = ScriptPanel
Caption = 'THA FUKING MUFASA'
ClientHeight = 537
ClientHeight = 534
ClientWidth = 731
KeyPreview = True
Menu = MainMenu1
@ -166,8 +166,8 @@ object Form1: TForm1
end
object StatusBar: TStatusBar
Left = 0
Height = 23
Top = 514
Height = 17
Top = 517
Width = 731
Panels = <
item
@ -185,7 +185,7 @@ object Form1: TForm1
object PanelMemo: TPanel
Left = 0
Height = 154
Top = 360
Top = 363
Width = 731
Align = alBottom
ClientHeight = 154
@ -205,25 +205,25 @@ object Form1: TForm1
Cursor = crVSplit
Left = 0
Height = 5
Top = 355
Top = 358
Width = 731
Align = alBottom
ResizeAnchor = akBottom
end
object ScriptPanel: TPanel
Left = 0
Height = 331
Height = 334
Top = 24
Width = 731
Align = alClient
BevelOuter = bvNone
Caption = 'ScriptPanel'
ClientHeight = 331
ClientHeight = 334
ClientWidth = 731
TabOrder = 4
object PageControl1: TPageControl
Left = 0
Height = 296
Height = 299
Top = 0
Width = 731
Align = alClient
@ -241,7 +241,7 @@ object Form1: TForm1
object SearchPanel: TPanel
Left = 0
Height = 35
Top = 296
Top = 299
Width = 731
Align = alBottom
BevelOuter = bvSpace
@ -337,7 +337,7 @@ object Form1: TForm1
end
object LabeledEditSearch: TLabeledEdit
Left = 104
Height = 21
Height = 27
Top = 6
Width = 174
EditLabel.AnchorSideLeft.Control = LabeledEditSearch
@ -345,10 +345,10 @@ object Form1: TForm1
EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = LabeledEditSearch
EditLabel.AnchorSideBottom.Control = LabeledEditSearch
EditLabel.Left = 73
EditLabel.Height = 14
EditLabel.Top = 9
EditLabel.Width = 28
EditLabel.Left = 67
EditLabel.Height = 18
EditLabel.Top = 10
EditLabel.Width = 34
EditLabel.Caption = 'Find: '
EditLabel.ParentColor = False
LabelPosition = lpLeft
@ -361,9 +361,9 @@ object Form1: TForm1
end
object CheckBoxMatchCase: TCheckBox
Left = 320
Height = 17
Height = 20
Top = 7
Width = 72
Width = 95
Caption = 'Match case'
OnClick = CheckBoxMatchCaseClick
TabOrder = 1

View File

@ -3,7 +3,7 @@
LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#18#1#6'Height'#3'-'#2#3'Top'#3#233#0#5'Wi'
+'dth'#3#219#2#13'ActiveControl'#7#11'ScriptPanel'#7'Caption'#6#17'THA FUKING'
+' MUFASA'#12'ClientHeight'#3#25#2#11'ClientWidth'#3#219#2#10'KeyPreview'#9#4
+' MUFASA'#12'ClientHeight'#3#22#2#11'ClientWidth'#3#219#2#10'KeyPreview'#9#4
+'Menu'#7#9'MainMenu1'#7'OnClose'#7#9'FormClose'#8'OnCreate'#7#10'FormCreate'
+#9'OnDestroy'#7#11'FormDestroy'#10'OnShortCut'#7#13'FormShortCuts'#8'Positio'
+'n'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.29'#7'Visible'#9#0#8'TToolBa'
@ -44,26 +44,26 @@ LazarusResources.Add('TForm1','FORMDATA',[
+'Save'#4'Left'#2'/'#4'Hint'#6#4'Save'#3'Top'#2#2#6'Action'#7#16'ActionSaveSc'
+'ript'#0#0#11'TToolButton'#10'TB_SaveAll'#4'Left'#2'F'#4'Hint'#6#8'Save all'
+#3'Top'#2#2#6'Action'#7#13'ActionSaveAll'#7'Enabled'#8#0#0#0#10'TStatusBar'#9
+'StatusBar'#4'Left'#2#0#6'Height'#2#23#3'Top'#3#2#2#5'Width'#3#219#2#6'Panel'
+'StatusBar'#4'Left'#2#0#6'Height'#2#17#3'Top'#3#5#2#5'Width'#3#219#2#6'Panel'
+'s'#14#1#5'Width'#2'<'#0#1#4'Text'#6#8'Untitled'#5'Width'#3#150#0#0#1#5'Widt'
+'h'#2'2'#0#0#11'SimplePanel'#8#0#0#6'TPanel'#9'PanelMemo'#4'Left'#2#0#6'Heig'
+'ht'#3#154#0#3'Top'#3'h'#1#5'Width'#3#219#2#5'Align'#7#8'alBottom'#12'Client'
+'ht'#3#154#0#3'Top'#3'k'#1#5'Width'#3#219#2#5'Align'#7#8'alBottom'#12'Client'
+'Height'#3#154#0#11'ClientWidth'#3#219#2#8'TabOrder'#2#2#0#5'TMemo'#5'Memo1'
+#4'Left'#2#1#6'Height'#3#152#0#3'Top'#2#1#5'Width'#3#217#2#5'Align'#7#8'alCl'
+'ient'#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#0#0#0#9'TSplitter'#19
+'SplitterMemoSynedit'#6'Cursor'#7#8'crVSplit'#4'Left'#2#0#6'Height'#2#5#3'To'
+'p'#3'c'#1#5'Width'#3#219#2#5'Align'#7#8'alBottom'#12'ResizeAnchor'#7#8'akBo'
+'ttom'#0#0#6'TPanel'#11'ScriptPanel'#4'Left'#2#0#6'Height'#3'K'#1#3'Top'#2#24
+'p'#3'f'#1#5'Width'#3#219#2#5'Align'#7#8'alBottom'#12'ResizeAnchor'#7#8'akBo'
+'ttom'#0#0#6'TPanel'#11'ScriptPanel'#4'Left'#2#0#6'Height'#3'N'#1#3'Top'#2#24
+#5'Width'#3#219#2#5'Align'#7#8'alClient'#10'BevelOuter'#7#6'bvNone'#7'Captio'
+'n'#6#11'ScriptPanel'#12'ClientHeight'#3'K'#1#11'ClientWidth'#3#219#2#8'TabO'
+'rder'#2#4#0#12'TPageControl'#12'PageControl1'#4'Left'#2#0#6'Height'#3'('#1#3
+'n'#6#11'ScriptPanel'#12'ClientHeight'#3'N'#1#11'ClientWidth'#3#219#2#8'TabO'
+'rder'#2#4#0#12'TPageControl'#12'PageControl1'#4'Left'#2#0#6'Height'#3'+'#1#3
+'Top'#2#0#5'Width'#3#219#2#5'Align'#7#8'alClient'#6'Images'#7#17'Mufasa_Imag'
+'e_List'#9'PopupMenu'#7#8'TabPopup'#8'TabOrder'#2#0#8'OnChange'#7#18'PageCon'
+'trol1Change'#10'OnChanging'#7#20'PageControl1Changing'#14'OnContextPopup'#7
+#24'PageControl1ContextPopup'#10'OnDragDrop'#7#20'PageControl1DragDrop'#10'O'
+'nDragOver'#7#20'PageControl1DragOver'#11'OnMouseDown'#7#21'PageControl1Mous'
+'eDown'#13'OnPageChanged'#7#18'PageControl1Change'#0#0#6'TPanel'#11'SearchPa'
+'nel'#4'Left'#2#0#6'Height'#2'#'#3'Top'#3'('#1#5'Width'#3#219#2#5'Align'#7#8
+'nel'#4'Left'#2#0#6'Height'#2'#'#3'Top'#3'+'#1#5'Width'#3#219#2#5'Align'#7#8
+'alBottom'#10'BevelOuter'#7#7'bvSpace'#12'ClientHeight'#2'#'#11'ClientWidth'
,#3#219#2#8'TabOrder'#2#1#7'Visible'#8#0#12'TSpeedButton'#17'SpeedButtonSearc'
+'h'#4'Left'#2' '#6'Height'#2#19#3'Top'#2#7#5'Width'#2#16#5'Color'#7#9'clBtnF'
@ -132,18 +132,18 @@ LazarusResources.Add('TForm1','FORMDATA',[
,#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#9'NumGl'
+'yphs'#2#0#7'OnClick'#7#22'SpeedButtonSearchClick'#0#0#12'TLabeledEdit'#17'L'
+'abeledEditSearch'#4'Left'#2'h'#6'Height'#2#21#3'Top'#2#6#5'Width'#3#174#0' '
+'abeledEditSearch'#4'Left'#2'h'#6'Height'#2#27#3'Top'#2#6#5'Width'#3#174#0' '
+'EditLabel.AnchorSideLeft.Control'#7#17'LabeledEditSearch'#31'EditLabel.Anch'
+'orSideTop.Control'#7#17'LabeledEditSearch'#28'EditLabel.AnchorSideTop.Side'
+#7#9'asrCenter!EditLabel.AnchorSideRight.Control'#7#17'LabeledEditSearch"Edi'
+'tLabel.AnchorSideBottom.Control'#7#17'LabeledEditSearch'#14'EditLabel.Left'
+#2'I'#16'EditLabel.Height'#2#14#13'EditLabel.Top'#2#9#15'EditLabel.Width'#2
+#28#17'EditLabel.Caption'#6#6'Find: '#21'EditLabel.ParentColor'#8#13'LabelPo'
+#2'C'#16'EditLabel.Height'#2#18#13'EditLabel.Top'#2#10#15'EditLabel.Width'#2
+'"'#17'EditLabel.Caption'#6#6'Find: '#21'EditLabel.ParentColor'#8#13'LabelPo'
+'sition'#7#6'lpLeft'#8'TabOrder'#2#0#8'OnChange'#7#16'EditSearchChange'#7'On'
+'Enter'#7#22'LabeledEditSearchEnter'#6'OnExit'#7#21'LabeledEditSearchExit'#9
+'OnKeyDown'#7#24'LabeledEditSearchKeyDown'#10'OnKeyPress'#7#25'LabeledEditSe'
+'archKeyPress'#0#0#9'TCheckBox'#17'CheckBoxMatchCase'#4'Left'#3'@'#1#6'Heigh'
+'t'#2#17#3'Top'#2#7#5'Width'#2'H'#7'Caption'#6#10'Match case'#7'OnClick'#7#22
+'t'#2#20#3'Top'#2#7#5'Width'#2'_'#7'Caption'#6#10'Match case'#7'OnClick'#7#22
+'CheckBoxMatchCaseClick'#8'TabOrder'#2#1#0#0#0#0#9'TMainMenu'#9'MainMenu1'#4
+'left'#3#16#2#0#9'TMenuItem'#8'MenuFile'#7'Caption'#6#5'&File'#13'SubMenuIma'
+'ges'#7#17'Mufasa_Image_List'#0#9'TMenuItem'#11'MenuItemNew'#6'Action'#7#15

View File

@ -54,6 +54,7 @@ uses
const
ocr_Limit_High = 190;
ocr_Limit_Med = 130;
ocr_Limit_Low = 65;
ocr_White = 16777215;
@ -125,7 +126,18 @@ begin
bmp.fastsetpixel(x,y,ocr_Red);
continue;
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
begin
bmp.FastSetPixel(x,y, ocr_Purple);