SRL Archive - Todo

My little list!


mastaraymond

2009-10-17 14:19:07

  • Web/HTTP stuff
  • Files (Has already been made, just needs to be implemented)
  • BitmapMasks
  • Deformed Bitmap / Rotated bitmaps
  • [*]OCR (Same story as files, just requires implementation)
  • Few finder functions (Coloredarea, findcirclecolor etc..)
  • Sounds, do not know whether it's necessary though.
  • GUI: Tabs
  • Testing, still need to test all of those bitmap functions (:()
  • Test/sample scripts; We need a set of scripts who cover most of the basic functions.
  • Colour Picker (rewrite, it is too messy)

Can't think of anything else right now.

Wizzup?

2009-10-17 14:34:03

To do for alpha:

  • Use XTst for Input on linux. It's better to use XTst for now.
  • DTM clean up / rewrite. (Add names. Fix bugs)
  • DTM Rotated.
  • DTM *Not* points.
  • OCR Filter (Only some optional stuff left
  • OCR Implementation. Partially done.
  • Add file functions to PS.
  • http://code.remobjects.com/p/pascalscript/issues/74/
  • Settings - A way to load and save options (to a file). No registry crap, etc.
  • Import / Export with Colour History.

Other stuff:

  • Script Manager
  • Script Debug Info (Open Files/Bitmaps/DTM's and their names.)
  • Thread manager for GUI -> Stopping threads. (Pause perhaps too?)

Nava2

2009-10-17 15:47:23

I can work on sample scripts etc. I wish my knowledge was more useful, but I might as well work where I'm good ;)

mastaraymond

2009-10-17 18:21:51

Created a FindDeformedBitmap.. See it for the lawls -> nested loops ftw:

function TMFinder.FindDeformedBitmapToleranceIn(bitmap: TMufasaBitmap; var x,
y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer; Range: Integer;
AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean;
var
MainRowdata : TPRGB32Array;
BmpRowData : TPRGB32Array;
PtrData : TRetData;
BmpW,BmpH : integer;
xBmp,yBmp : integer;
tmpY,tmpX : integer;
dX, dY, xx, yy: Integer;
SearchdX,SearchdY : integer;
CCTS : integer;
GoodCount : integer;//Save the amount of pixels who have found a correspondening pixel
BestCount : integer;//The best amount of pixels till now..
BestPT : TPoint; //The point where it found the most pixels.
RangeX,RangeY : Integer;
H,S,L,HMod,SMod : extended;
label FoundBMPPoint;
//Don't know if the compiler has any speed-troubles with goto jumping in nested for loops.

begin
Result := false;
// checks for valid xs,ys,xe,ye? (may involve GetDimensions)
DefaultOperations(xs,ys,xe,ye);

// calculate delta x and y
dX := xe - xs;
dY := ye - ys;
SearchDx := dX;
SearchDy := dY;
PtrData := TClient(Client).MWindow.ReturnData(xs, ys, dX + 1, dY + 1);
//Caculate the row ptrs
MainRowdata:= CalculateRowPtrs(PtrData,dy+1);
BmpRowData:= CalculateRowPtrs(bitmap);
//Get the 'fixed' bmp size
BmpW := bitmap.Width - 1;
BmpH := bitmap.Height - 1;
//Heck our bitmap cannot be outside the search area
dX := dX - bmpW;
dY := dY - bmpH;
//We wont want HSL comparison with BMPs, right? Not for now atleast.
CCTS := Self.CTS;
if CCTS > 1 then
CCTS := 1;
//Reset the accuracy :-)
Accuracy := 0;
BestCount := -1;
BestPT := Point(-1,-1);

for yy := 0 to dY do
for xx := 0 to dX do
begin;
GoodCount := 0;
for yBmp:= 0 to BmpH do
begin;
//Calculate points of the BMP left against Goodcount (if it cannot possibly get more points skip this x,y?
if bestCount > (goodcount + (Bmph - yBmp) * (bmpW)) then
Break;
for xBmp := 0 to BmpW do
begin;

for RangeY := (yy-Range) to (yy + Range) do
begin;
tmpY := yBmp + RangeY;
if (tmpY < 0) or (tmpY > SearchdY ) then
continue;
for RangeX := (xx-Range) to (xx + Range) do
begin;
tmpX := xBmp + RangeX;
if (tmpX < 0) or (tmpX > SearchdX) then
Continue;
if ColorSame(CCTS,tolerance,
BmpRowData[yBmp][xBmp].R,BmpRowData[yBmp][xBmp].G,BmpRowData[yBmp][xBmp].B,
MainRowdata[tmpY][tmpX].R,MainRowdata[tmpY][tmpX].G,MainRowdata[tmpY][tmpX].B,
H,S,L,HMod,SMod) then
goto FoundBMPPoint;
end;
end;
//We did not find a good point so were continueing!
Continue;
FoundBMPPoint:
//We found a pooint woot!
inc(GoodCount);
end;
end;
if GoodCount > BestCount then //This x,y has the best Acc so far!
begin;
BestCount := GoodCount;
BestPT := Point(xx+xs,yy+ys);
end;
end;
TClient(Client).MWindow.FreeReturnData;
if BestCount = 0 then
Exit;
accuracy := BestCount / ((BmpW + 1) * (BmpH+1));
if (accuracy = 1) or AllowPartialAccuracy then
begin
x := BestPT.x;
y := BestPT.y;
Exit(true);
end;
end;

Yet another function I've got to test :-(

Nava2

2009-10-17 18:55:39

From: mastaraymond
Created a FindDeformedBitmap.. See it for the lawls -> nested loops ftw:

//We wont want HSL comparison with BMPs, right? Not for now atleast.
CCTS := Self.CTS;
if CCTS > 1 then
CCTS := 1;

Yet another function I've got to test :-(


Do we compare bitmaps using CTS 0? You are allowing that there.. also, you could easily avoid the goto using a boolean. Since we all know goto's cause boom, probably a good idea to change that.

:)

Wizzup?

2009-10-17 18:57:17

The goto is fine. It is a good optimalisation.

R0b0t1

2009-10-17 19:38:08

Get R0b0t1 a working FPC/Laz install. ASAP.

Nava2

2009-10-17 23:26:33

From: Wizzup?
The goto is fine. It is a good optimalisation.


Weren't you the one who told me using a goto is like dividing by zero? Vortexes are created in the time space continuum.

Like so:

Wizzup?

2009-10-18 05:36:38

Yes, in normal logical constructs they are bad practice, but in 4 nested loops, it is better to use a go-to…

Nava2

2009-10-18 10:11:15

From: Wizzup?
Yes, in normal logical constructs they are bad practice, but in 4 nested loops, it is better to use a go-to…


Just because the speed of the boolean check each time would be slowing it down?

Markus

2009-10-18 10:39:44

Because it would be very ugly code, and goto's are really suitable to skip out of epicly nested loops.

Wizzup?

2009-10-18 10:43:30

From: Nava2
Just because the speed of the boolean check each time would be slowing it down?


You would have a huge overhead. You'd need to test that one one boolean every time, in every loop. I'm sure you can see how that adds up. ;)

Nava2

2009-10-18 11:12:02

From: Wizzup?
You would have a huge overhead. You'd need to test that one one boolean every time, in every loop. I'm sure you can see how that adds up. ;)


That was my point ;)

mastaraymond

2009-10-19 14:08:14

I need a "New file & Open File" icon, anyone? ^_^

Markus

2009-10-19 14:09:27

Correction: we need a great GUI/gfx designer, which none of us is afaik? As Cogat Mufasa also needs a great logo :p

nielsie95

2009-10-19 14:17:26

For your icon needs:

Fugue
Sweetie BasePack
FamFamFam mini/silk
Vaga

I personally like the first two :)

Wizzup?

2009-10-19 15:20:14

Make them yourself in PhotoShop/GIMP, like we have done for the current icons.
They are uber sexy. <3

R0b0t1

2009-10-19 17:25:35

Logo should be the all seeing eye or a lion.

Nava2

2009-10-19 17:38:41

Why not add support to use the Icons generally used for the OS. Like, in gnome your icons are preset based on what they are. I mean, that being said, you would have changing icons and static ones based on things that just aren't in the packages, but it could be an option.

Also I like our current ones. Wizzup, make moar.

(Might be worth it to bring someone in who is good with gfx, I have a friend if you want to bring him in. I know he is trustworthy, it is xxx toxin xxx

Wizzup?

2009-10-20 06:16:04

I don't think the prettiness of the GUI belongs to our main concerns, ATM.
That's something to do after I've fixed my DTM bugs, added OCR, wrote File Wrappers…
GUI Stuff is:
  • Add tabs
  • Add Options. (Saving Options, etc)

Another thing I'd like to do is to write python wrappers for the library! :)

mastaraymond

2009-10-20 15:49:11

Made bitmap masks, seems to work :).

mastaraymond

2009-10-22 08:49:54

Extensively tested deformeds, they seem to work perfectly. And in most of my test settings Mufasadeformeds are significantly faster.

mastaraymond

2009-10-24 07:37:37

From: nielsie95
For your icon needs:

Fugue
Sweetie BasePack
FamFamFam mini/silk
Vaga

I personally like the first two :)

Looks like lazarus uses the FamFamFam package

Nava2

2009-10-27 10:23:35

From: mastaraymond
Looks like lazarus uses the FamFamFam package


And Mufasa!

What web things need to be completed?

Wizzup?

2009-10-27 10:54:41

From: Nava2
And Mufasa!

What web things need to be completed?


They are very easy, but will only be done when everything else is finished. It requires a package that is HUGE. (Indy)

Nava2

2009-10-27 11:21:44

From: Wizzup?
They are very easy, but will only be done when everything else is finished. It requires a package that is HUGE. (Indy)


I knew that it was Indy, but is it all done then?

What can I do :( You never answered my question, buddy. :(

mastaraymond

2009-10-27 12:11:52

From: Wizzup?
They are very easy, but will only be done when everything else is finished. It requires a package that is HUGE. (Indy)

So hurry up and complete the rest.

Nava2

2009-10-27 12:13:22

From: mastaraymond
So hurry up and complete the rest.


That there is team work!

Nava2

2009-10-29 13:53:52

Function List?

Wizzup?

2009-10-29 15:05:23

From: Nava2
That there is team work!


There is. I am just behind on my stuff. Ray is the one with more free time. ;)

From: Nava2
Function List?


Check the code for now.
A parser isn't very important yet, especially since that requires that everything is commented, as well.

Nava2

2009-10-29 16:12:51

From: Wizzup?
Check the code for now.
A parser isn't very important yet, especially since that requires that everything is commented, as well.


No, no. I meant function list for scripts. Runtime persay.

Like the one that is on the right of SCAR. To be honest, I miss that from Borland when using Laz.

bullzeye95

2009-10-29 18:03:46

Lazarus has a function list.

per se*

nielsie95

2009-10-29 18:29:10

Otherwise I might have something that could be of help.

Hit F9 for a dump of the list.
Hit CTRL+Space for function list.
Set the cursor near a variable/function reference and hit F10 to find the declaration.
Param completion should work too (doesn't support build in functions yet).

Should also work with includes, with statements and arrays (I also tried something with displaying errors). The only problem with porting this to Lazarus is that Lazarus doesn't have such a fancy SynEdit Completion Propasal component, the other things work.

Wizzup?

2009-10-29 18:39:12

From: Nava2
No, no. I meant function list for scripts. Runtime persay.

Like the one that is on the right of SCAR. To be honest, I miss that from Borland when using Laz.


You mean a function parser. This shouldn't be hard to do. But then again, it is a GUI feature, and I'm not going to work on GUI features until the actual lib is able to macro reasonably.
Someone else may feel like being friendly and write it - it is Open Source after all.

EDIT: Hai Niels! ^

mastaraymond

2009-10-31 17:46:10

Made the tabs, they seem to work allright :-).

Nava2

2009-10-31 17:52:14

From: mastaraymond
Made the tabs, they seem to work allright :-).


The tabs are very nice :)

Just need to add the short-cuts now :D

Wizzup?

2009-11-16 20:08:25

Updated 2nd post to reflect changes.

Markus

2009-11-18 12:27:25

From: Wizzup?
A way to load and save options (to a file). I say read/write from a "mufasasetting.ini" file in our current directory. No registry crap, etc.


Objection. It isn't a good idea to put stuff like settings like in /usr/local/bin or c:\program files\ or wherever. I cbf running with root privileges all the time.
Kaitnieks made this mistake, and now Vista+7 still suffer from it (as they don't run as admin all the time).
So pleeaasee somewhere in %appdata% or /home/.mufasa or something like that. That would also be the ideal place to put includes (maybe allow the user to set the include directory? so I could put my includes in a folder with really easy access).

Wizzup?

2009-11-18 12:46:50

From: Markus
Objection. It isn't a good idea to put stuff like settings like in /usr/local/bin or c:\program files\ or wherever. I cbf running with root privileges all the time.
Kaitnieks made this mistake, and now Vista+7 still suffer from it (as they don't run as admin all the time).
So pleeaasee somewhere in %appdata% or /home/.mufasa or something like that. That would also be the ideal place to put includes (maybe allow the user to set the include directory? so I could put my includes in a folder with really easy access).


Who says you have to keep it in your Program\ Files?
You can just unzip (install…?) it in any directory you want. If it is in a dir that has your perms, then you don't need to run as admin.
The reason I prefer a local settings.ini is because you can have different Mufasa's with different settings.


So that's an idea we will have to discuss. Local or Global. :p

mastaraymond

2009-11-18 13:24:39

Make a setting!!

Markus

2009-11-18 14:16:46

From: mastaraymond
Make a setting!!


<3.

Wizzup?

2009-12-11 14:38:27

From: mastaraymond
Make a setting!!


Still needs to be implemented. Let's do it locally.

Wizzup?

2010-01-09 07:03:37

From: Wizzup?
Updated 2nd post to reflect changes.


That^