mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-16 06:15:09 -05:00
RGB in Colour History
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@278 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
dfb8e0fa7a
commit
a9b3f15758
@ -90,4 +90,14 @@ object ColourHistoryForm: TColourHistoryForm
|
|||||||
OnClick = OkButtonClick
|
OnClick = OkButtonClick
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
|
object CH_RGB_Label: TLabel
|
||||||
|
Left = 361
|
||||||
|
Height = 18
|
||||||
|
Top = 128
|
||||||
|
Width = 112
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
Caption = 'RGBValues'
|
||||||
|
Constraints.MinWidth = 112
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -26,5 +26,8 @@ LazarusResources.Add('TColourHistoryForm','FORMDATA',[
|
|||||||
+'t'#3#152#0#6'Height'#2#24#3'Top'#3#209#0#5'Width'#2'9'#7'Anchors'#11#6'akLe'
|
+'t'#3#152#0#6'Height'#2#24#3'Top'#3#209#0#5'Width'#2'9'#7'Anchors'#11#6'akLe'
|
||||||
+'ft'#7'akRight'#8'akBottom'#0#0#0#7'TButton'#8'OkButton'#4'Left'#3#137#1#6'H'
|
+'ft'#7'akRight'#8'akBottom'#0#0#0#7'TButton'#8'OkButton'#4'Left'#3#137#1#6'H'
|
||||||
+'eight'#2#24#3'Top'#3#209#0#5'Width'#2'P'#7'Anchors'#11#7'akRight'#8'akBotto'
|
+'eight'#2#24#3'Top'#3#209#0#5'Width'#2'P'#7'Anchors'#11#7'akRight'#8'akBotto'
|
||||||
+'m'#0#7'Caption'#6#2'Ok'#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#5#0#0#0
|
+'m'#0#7'Caption'#6#2'Ok'#7'OnClick'#7#13'OkButtonClick'#8'TabOrder'#2#5#0#0#6
|
||||||
|
+'TLabel'#12'CH_RGB_Label'#4'Left'#3'i'#1#6'Height'#2#18#3'Top'#3#128#0#5'Wid'
|
||||||
|
+'th'#2'p'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#9'RGBValues'#20'C'
|
||||||
|
+'onstraints.MinWidth'#2'p'#11'ParentColor'#8#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -22,6 +22,7 @@ type
|
|||||||
{ TColourHistoryForm }
|
{ TColourHistoryForm }
|
||||||
|
|
||||||
TColourHistoryForm = class(TForm)
|
TColourHistoryForm = class(TForm)
|
||||||
|
CH_RGB_Label: TLabel;
|
||||||
OkButton: TButton;
|
OkButton: TButton;
|
||||||
ColourValue: TEdit;
|
ColourValue: TEdit;
|
||||||
CoordValue: TLabel;
|
CoordValue: TLabel;
|
||||||
@ -59,7 +60,7 @@ var
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses
|
uses
|
||||||
TestUnit;
|
colour_conv, TestUnit;
|
||||||
|
|
||||||
constructor TColourPickerObject.Create(C: Integer; P: TPoint; N: String);
|
constructor TColourPickerObject.Create(C: Integer; P: TPoint; N: String);
|
||||||
begin
|
begin
|
||||||
@ -110,6 +111,8 @@ end;
|
|||||||
|
|
||||||
procedure TColourHistoryForm.ChangeViewData(Sender: TObject; Item: TListItem;
|
procedure TColourHistoryForm.ChangeViewData(Sender: TObject; Item: TListItem;
|
||||||
Selected: Boolean);
|
Selected: Boolean);
|
||||||
|
var
|
||||||
|
r,g,b:integer;
|
||||||
begin
|
begin
|
||||||
if not Assigned(Item) then
|
if not Assigned(Item) then
|
||||||
exit;
|
exit;
|
||||||
@ -120,12 +123,16 @@ begin
|
|||||||
if not Assigned(Item.Data) then
|
if not Assigned(Item.Data) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
colour_conv.ColorToRGB(TColourPickerObject(Item.Data).Colour, r, g, b);
|
||||||
|
|
||||||
{ Change Form Text / Values }
|
{ Change Form Text / Values }
|
||||||
ColourValue.Caption := IntToStr(TColourPickerObject(Item.Data).Colour);
|
ColourValue.Caption := IntToStr(TColourPickerObject(Item.Data).Colour);
|
||||||
CoordValue.Caption := 'Coords: ' + IntToStr(TColourPickerObject(Item.Data).Pos.X) +
|
CoordValue.Caption := 'Coords: ' + IntToStr(TColourPickerObject(Item.Data).Pos.X) +
|
||||||
', ' + IntToStr(TColourPickerObject(Item.Data).Pos.Y);
|
', ' + IntToStr(TColourPickerObject(Item.Data).Pos.Y);
|
||||||
SelectionName.Text := TColourPickerObject(Item.Data).Name;
|
SelectionName.Text := TColourPickerObject(Item.Data).Name;
|
||||||
|
|
||||||
|
CH_RGB_Label.Caption:=Format('RGB:%d,%d%d', [r,g,b]);
|
||||||
|
|
||||||
{ Draw the Image }
|
{ Draw the Image }
|
||||||
ColourImage.Canvas.Brush.Color := TColourPickerObject(Item.Data).Colour;
|
ColourImage.Canvas.Brush.Color := TColourPickerObject(Item.Data).Colour;
|
||||||
ColourImage.Canvas.Rectangle(0,0,ColourImage.Width, ColourImage.Height);
|
ColourImage.Canvas.Rectangle(0,0,ColourImage.Width, ColourImage.Height);
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<TargetFileExt Value=""/>
|
<TargetFileExt Value=""/>
|
||||||
<Title Value="Mufasa Stand Alone"/>
|
<Title Value="Mufasa Stand Alone"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
<ActiveEditorIndexAtStart Value="4"/>
|
<ActiveEditorIndexAtStart Value="5"/>
|
||||||
</General>
|
</General>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<ProjectVersion Value=""/>
|
<ProjectVersion Value=""/>
|
||||||
@ -167,8 +167,8 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="TestUnit"/>
|
<UnitName Value="TestUnit"/>
|
||||||
<CursorPos X="32" Y="742"/>
|
<CursorPos X="61" Y="756"/>
|
||||||
<TopLine Value="734"/>
|
<TopLine Value="110"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="4"/>
|
||||||
<UsageCount Value="202"/>
|
<UsageCount Value="202"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -730,7 +730,7 @@
|
|||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="colourpicker"/>
|
<UnitName Value="colourpicker"/>
|
||||||
<CursorPos X="1" Y="148"/>
|
<CursorPos X="1" Y="148"/>
|
||||||
<TopLine Value="113"/>
|
<TopLine Value="1"/>
|
||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="8"/>
|
||||||
<UsageCount Value="201"/>
|
<UsageCount Value="201"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -1513,9 +1513,11 @@
|
|||||||
<ComponentName Value="ColourHistoryForm"/>
|
<ComponentName Value="ColourHistoryForm"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="colourhistory"/>
|
<UnitName Value="colourhistory"/>
|
||||||
<CursorPos X="88" Y="7"/>
|
<CursorPos X="75" Y="103"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="79"/>
|
||||||
|
<EditorIndex Value="5"/>
|
||||||
<UsageCount Value="93"/>
|
<UsageCount Value="93"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit208>
|
</Unit208>
|
||||||
<Unit209>
|
<Unit209>
|
||||||
<Filename Value="../../../Documents/lazarus/lcl/comctrls.pp"/>
|
<Filename Value="../../../Documents/lazarus/lcl/comctrls.pp"/>
|
||||||
@ -1799,7 +1801,7 @@
|
|||||||
<ComponentState Value="1"/>
|
<ComponentState Value="1"/>
|
||||||
<CursorPos X="62" Y="62"/>
|
<CursorPos X="62" Y="62"/>
|
||||||
<TopLine Value="54"/>
|
<TopLine Value="54"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="6"/>
|
||||||
<UsageCount Value="36"/>
|
<UsageCount Value="36"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit249>
|
</Unit249>
|
||||||
@ -1856,13 +1858,11 @@
|
|||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit257>
|
</Unit257>
|
||||||
<Unit258>
|
<Unit258>
|
||||||
<Filename Value="../../../../../../../usr/lib/lazarus/components/mouseandkeyinput/keyinputintf.pas"/>
|
<Filename Value="../../../../../../usr/lib/lazarus/components/mouseandkeyinput/keyinputintf.pas"/>
|
||||||
<UnitName Value="KeyInputIntf"/>
|
<UnitName Value="KeyInputIntf"/>
|
||||||
<CursorPos X="16" Y="50"/>
|
<CursorPos X="16" Y="50"/>
|
||||||
<TopLine Value="47"/>
|
<TopLine Value="47"/>
|
||||||
<EditorIndex Value="6"/>
|
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="13"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit258>
|
</Unit258>
|
||||||
<Unit259>
|
<Unit259>
|
||||||
<Filename Value="project1.lpi"/>
|
<Filename Value="project1.lpi"/>
|
||||||
@ -1872,127 +1872,123 @@
|
|||||||
<SyntaxHighlighter Value="XML"/>
|
<SyntaxHighlighter Value="XML"/>
|
||||||
</Unit259>
|
</Unit259>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="29" HistoryIndex="28">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||||
<Caret Line="1681" Column="29" TopLine="1656"/>
|
<Caret Line="1616" Column="14" TopLine="1601"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||||
<Caret Line="1616" Column="14" TopLine="1601"/>
|
<Caret Line="104" Column="31" TopLine="89"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
||||||
<Caret Line="104" Column="31" TopLine="89"/>
|
<Caret Line="1681" Column="96" TopLine="1662"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="../../Units/MMLCore/finder.pas"/>
|
|
||||||
<Caret Line="1681" Column="96" TopLine="1662"/>
|
|
||||||
</Position4>
|
|
||||||
<Position5>
|
|
||||||
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
|
||||||
<Caret Line="137" Column="23" TopLine="121"/>
|
<Caret Line="137" Column="23" TopLine="121"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="testunit.pas"/>
|
||||||
|
<Caret Line="40" Column="51" TopLine="40"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="40" Column="51" TopLine="40"/>
|
<Caret Line="45" Column="51" TopLine="1"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="45" Column="51" TopLine="1"/>
|
<Caret Line="379" Column="26" TopLine="359"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="379" Column="26" TopLine="359"/>
|
<Caret Line="362" Column="32" TopLine="359"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="362" Column="32" TopLine="359"/>
|
<Caret Line="1311" Column="57" TopLine="1291"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="1311" Column="57" TopLine="1291"/>
|
<Caret Line="1316" Column="57" TopLine="1291"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="1316" Column="57" TopLine="1291"/>
|
<Caret Line="10" Column="75" TopLine="1"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="10" Column="75" TopLine="1"/>
|
<Caret Line="1311" Column="65" TopLine="1291"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="1311" Column="65" TopLine="1291"/>
|
<Caret Line="8" Column="103" TopLine="3"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="8" Column="103" TopLine="3"/>
|
<Caret Line="180" Column="25" TopLine="160"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="180" Column="25" TopLine="160"/>
|
<Caret Line="1311" Column="57" TopLine="1291"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="1311" Column="57" TopLine="1291"/>
|
<Caret Line="10" Column="108" TopLine="1"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="testunit.pas"/>
|
|
||||||
<Caret Line="10" Column="108" TopLine="1"/>
|
|
||||||
</Position17>
|
|
||||||
<Position18>
|
|
||||||
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
|
||||||
<Caret Line="104" Column="73" TopLine="73"/>
|
<Caret Line="104" Column="73" TopLine="73"/>
|
||||||
</Position18>
|
</Position17>
|
||||||
<Position19>
|
<Position18>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="165" Column="119" TopLine="160"/>
|
<Caret Line="165" Column="119" TopLine="160"/>
|
||||||
</Position19>
|
</Position18>
|
||||||
<Position20>
|
<Position19>
|
||||||
<Filename Value="../../../../../../../usr/lib/lazarus/components/mouseandkeyinput/keyinputintf.pas"/>
|
|
||||||
<Caret Line="1" Column="1" TopLine="1"/>
|
|
||||||
</Position20>
|
|
||||||
<Position21>
|
|
||||||
<Filename Value="project1.lpr"/>
|
<Filename Value="project1.lpr"/>
|
||||||
<Caret Line="38" Column="79" TopLine="5"/>
|
<Caret Line="38" Column="79" TopLine="5"/>
|
||||||
|
</Position19>
|
||||||
|
<Position20>
|
||||||
|
<Filename Value="testunit.pas"/>
|
||||||
|
<Caret Line="1129" Column="75" TopLine="1105"/>
|
||||||
|
</Position20>
|
||||||
|
<Position21>
|
||||||
|
<Filename Value="debugimage.pas"/>
|
||||||
|
<Caret Line="115" Column="99" TopLine="94"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="1129" Column="75" TopLine="1105"/>
|
<Caret Line="1053" Column="33" TopLine="1049"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="debugimage.pas"/>
|
<Filename Value="debugimage.pas"/>
|
||||||
<Caret Line="115" Column="99" TopLine="94"/>
|
<Caret Line="81" Column="35" TopLine="78"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="testunit.pas"/>
|
|
||||||
<Caret Line="1053" Column="33" TopLine="1049"/>
|
|
||||||
</Position24>
|
|
||||||
<Position25>
|
|
||||||
<Filename Value="debugimage.pas"/>
|
|
||||||
<Caret Line="81" Column="35" TopLine="78"/>
|
|
||||||
</Position25>
|
|
||||||
<Position26>
|
|
||||||
<Filename Value="debugimage.pas"/>
|
<Filename Value="debugimage.pas"/>
|
||||||
<Caret Line="71" Column="47" TopLine="59"/>
|
<Caret Line="71" Column="47" TopLine="59"/>
|
||||||
|
</Position24>
|
||||||
|
<Position25>
|
||||||
|
<Filename Value="testunit.pas"/>
|
||||||
|
<Caret Line="1052" Column="53" TopLine="1049"/>
|
||||||
|
</Position25>
|
||||||
|
<Position26>
|
||||||
|
<Filename Value="testunit.pas"/>
|
||||||
|
<Caret Line="993" Column="49" TopLine="736"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="1052" Column="53" TopLine="1049"/>
|
<Caret Line="817" Column="39" TopLine="23"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="testunit.pas"/>
|
||||||
<Caret Line="993" Column="49" TopLine="736"/>
|
<Caret Line="24" Column="53" TopLine="1"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="testunit.pas"/>
|
<Filename Value="colourhistory.pas"/>
|
||||||
<Caret Line="817" Column="39" TopLine="23"/>
|
<Caret Line="7" Column="88" TopLine="1"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
|
||||||
<Filename Value="testunit.pas"/>
|
|
||||||
<Caret Line="24" Column="53" TopLine="1"/>
|
|
||||||
</Position30>
|
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
Loading…
Reference in New Issue
Block a user