Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1202 lines (747 sloc)
30.7 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- add tests for new stuff | |
- seeing occasional "rewind image with active regions" message | |
- should parse_float / _int etc. allow leading and trailing spaces? | |
(split is_space x)?0 | |
- how about adding | |
zip2 10 [1..5] == [[10, 1], [10, 2], [10, 3], .. | |
should be harmless, and quite useful | |
same for zip3 etc. as well | |
check zip use, we probably have this code there already, in various places | |
- sharpen should use new interface? | |
- can we call affine from nip2 vips_call? do we need a double array? | |
- hough_circle etc. don't get cached ... they use the vips8 API and the vips | |
cache only works for vips8 | |
we can't turn on the vips8 cache since it does not know about invalidate | |
- columns can move about on load in large workspaces | |
- hide tabs if only one tab in window, though we'd need to allow tab drop | |
anywhere in window for that | |
- Matrix / New / Laplacian | |
edit a cell, turns into a plain matrix | |
need to override edit method | |
same for gaussian | |
rather tricky, compared to square / circle etc. | |
- breadcrumb trail for prog window, so you can get back to where you were? | |
- lambdas don't pattern match? | |
(\[a, b] a + b) | |
- load jpg, ^Q, no leaks | |
load jpg, paint bar, paint one dot, ^Q, no leaks | |
load jpg, extract area, paint bar, paint one dot, ^Q, leaks | |
load jpg, extract area, paint bar, paint one dot, ^Z, ^Q, leaks | |
load jpg, extract area, paint bar, paint one dot, close window, ^Q, leaks | |
seems to leak: | |
original image, | |
one large regions on that image (full width) | |
extract area operation | |
extracted image | |
region a bit bigger than paint action on that image | |
0) VipsRegion (0x8b052a0) | |
VipsRegion (object), base class VipsRegion: 0x8b052a0, im = 0x887aad0, left = | |
192, top = 128, width = 45, height = 2 VipsRegion (0x8b052a0) | |
1) VipsImage (0x887aad0) | |
VipsImage (image), image class 237x202 uchar, 3 bands, srgb, partial VipsImage | |
(0x887aad0) | |
2) VipsImage (0x8016b30) | |
VipsImage (image), image class 972x1296 uchar, 3 bands, srgb, openin VipsImage | |
(0x8016b30) | |
3) VipsRegion (0x8b05340) | |
VipsRegion (object), base class VipsRegion: 0x8b05340, im = 0x8016b30, left = | |
0, top = 30, width = 972, height = 283 VipsRegion (0x8b05340) | |
4) VipsExtractArea (0x882a910) | |
VipsExtractArea (extract_area), extract an area from an image - extract_area | |
((VipsImage*) 0x8016b30) 142 158 237 202 VipsExtractArea (0x882a910) | |
something to do with vips_image_wio_input() and the way it rewinds a PARTIAL | |
image? called from im_rwcheck() | |
- os x build reports missing jasper dylib? | |
- draw_circle could extract, draw and insert for huge memuse reduction | |
- section on compat mode for the docs | |
see mail to MvGulick for some notes | |
- expose more of the tone funcs in nip2 | |
- quite a few hist operations have no GUI ... histspec, for example? | |
- nip2 should use zooming support, if possible | |
- the windows setup .exe install a bazillion .png icons we will never use, | |
then installs them all again as .svg, which we will certainly never use | |
- add extract_volume, cf. "grid" | |
record tile_size in meta somewhere? grid could set it, save a parameter off | |
extract_volume | |
also extract_sequence to get volume over time | |
- image + complex constant would be nice | |
- ban parameters which are built-ins, eg. "im", "re" etc., you get nasty | |
crashes | |
see also notes below: a new parser could fix this | |
can only ban for new code? do we have duff code in compat? | |
argh yes there are at least 15 like this, fix them or fix the parser? also | |
need to disable this check for compat defs | |
better to fix the parser, it can't be that hard | |
need to fix up the list comp compiler too, sigh | |
- we can't define local superclasses at the moment | |
eg. consider: | |
Fred = class { | |
Jim a = class { | |
value = a + 12; | |
} | |
Jennie x = class Jim x { | |
value = 99; | |
} | |
} | |
you can't do (Fred.Jennie 12) since Jim will have a secret 'this' param | |
(because it is a class member) and superclass constructors can't have | |
secrets | |
don't automatically give all members 'this' as a secret, check that they | |
make references to other class members that do need secrets first | |
- turn on GM in prefs, have to restart before _stdenv.def:magick sees the | |
change | |
- try this: | |
Workspaces.untitled | |
has_member "A1" A1 | |
doesn't seem to work? | |
- matrix_gaussian_blur could have an 'accuracy' or 'max error' param? expose | |
in custom blur etc. | |
- oo_binary etc. needs revising, we don't search down branches as we should | |
for example, Matrix does: | |
// compound ... don't do iteration | |
[this.Matrix_base (op.fn this.value x.value), | |
(is_Matrix x || is_Real x || is_Vector x) && | |
op.type == Operator_type.COMPOUND_REWRAP], | |
which is stupid, we should not wire Real and Vector in there, it ought to be | |
something like: | |
[this.Matrix_base (op.fn this.value x), | |
op.type == Operator_type.COMPOUND_REWRAP], | |
ie. don't strip the .value off x and rely on op.fn to do that, but this | |
breaks in various ways | |
remove all of _Object and redo it, thinking about what we want operators to | |
look like and what we want types to look like. | |
Have a base class for operators that does most of the standard stuff | |
get rid of the operator types rewrap / arithmetic / relational etc. etc. | |
- try | |
point re | |
= x | |
{ | |
(x, y) = re; | |
} | |
it's the 're' param, it stops x being bound to the | |
get-real-part-of-complex builtin | |
expands to | |
point re | |
= x | |
{ | |
$$x = re; | |
x | |
= re $$x, is_complex $$x | |
= error "bad match"; | |
} | |
add secrets | |
point point.re | |
= x point.re | |
{ | |
$$1 $$1.re = point.re; | |
x x.re | |
= x.re ($$x point.re), is_complex ($$x point.re) | |
= error "bad match"; | |
} | |
x compiles to | |
if_then_else (<symbol "point.x.is_complex"> (<symbol "point.$$pattern_lhs78"> <symbol "point.re">)) | |
<symbol "point.x.re"> (<symbol "point.$$pattern_lhs78"> <symbol "point.re">) | |
<symbol "point.x.error"> <Managed* 0x37c5a80> | |
abstracting point.re | |
after var abstract | |
((S ((Sr (if_then_else <compileref "point.x">)) ((Sl ((Sr (&& <compileref "point.x">)) ((Sr <symbol "point.x.is_complex">) <symbol "point.$$pattern_lhs78">))) true))) ((Sl ((Sr SHARE0[(: <compileref "point.x">)]) ((Sr <symbol "point.x.re">) <symbol "point.$$pattern_lhs78">))) ((REF0 (<symbol "point.x.error"> <Managed* 0x3a55980>)) [ ]))) | |
reduce and get | |
reduce_spine: (<symbol "point.x.re"> (<symbol "point.$$pattern_lhs0"> (I (1,2)))) | |
reduce_spine: (<symbol "point.re"> (<symbol "point.$$pattern_lhs0"> (I (1,2)))) | |
sym-param found, argh: point.re | |
maybe fix this when we revise the parser | |
would be a good time to add multiple definitions as well | |
- redo name resolution in parser ... scrap the patch thing, instead have a | |
separate 'resolve' step that runs after parsing a top-level | |
don't create ZOMBIE symbols, instead make REF nodes in the tree | |
this binds local references, but leaves external refs dangling | |
we do a final link at load time when we copy into the heap | |
do we need zombies at all now? | |
make a fork for this | |
- we have ws->window_width, can we use the one on Model now instead? | |
- new inplace stuff needs a test suite | |
- 'don't show this dialog again' on delete row dialog, also in prefs | |
box_yesno() could take a string which is the name of a pref to check for | |
ask-or-not | |
- how about something that does: | |
im' = operation_list [a, b, c, d] im | |
it does a fold: | |
im' = d (c (b (a im))) | |
but the intermediate images are reused, so you can do in-place stuff with it | |
we could get rid of lineset! | |
- mac binary has a broken im_text() argh | |
- do we allow | |
[r, g, b] = Image_file "babe.jpg" | |
since ? is band index and list index, it seems to make sense | |
we have | |
image ++ image | |
image ++ [] == image | |
for bandjoin, so that lines up too, I guess | |
hmm | |
reverse image | |
to swap the bands over? heh need to be able to override hd and tl | |
- Ackermann | |
http://shootout.alioth.debian.org/great/benchmark.php?test=ackermann&lang=all&sort=cpu | |
A x y | |
= y + 1, x == 0 | |
= A (x - 1) 1, y == 0 | |
= A (x - 1) (A x (y - 1)); | |
correct test result: A 3 4 == 125 | |
A 3 10 is benchmark test ... we fail with a "C stack overflow" error | |
A 3 9 == 4093 works OK | |
we could make this a lot quicker with some arithmetic streamlining | |
could we do tail-recursion elimination? | |
strictness analysis would help too | |
- Fib | |
http://shootout.alioth.debian.org/great/benchmark.php?test=fibo&lang=all&sort=cpu | |
F x | |
= 1, x == 0 | |
= 1, x == 1 | |
= F (x - 2) + F (x - 1); | |
correct output F 32 == 3524578 | |
cima is ~370s for this (!!) | |
work machine is about 50s | |
dell vostro laptop is 45s without optimiser | |
- turn on DEBUG in heap.c, run the fibonacci benchmark | |
we heap_copy F every time it recurses! because when we heap_copy we don't | |
link recursive references | |
try fixing this ... but remember the problems we had with shared classes | |
when we did link-to-value rather than link-to-copy | |
we also have a huge amount of stuff in the heap, could we trim this down? | |
how does it all get pulled in? is it preferences? | |
in nip1, F is about 4x faster | |
WONTFIX for 7.20 | |
================ | |
- look at: | |
http://www.eggheadcafe.com/software/aspnet/35467981/programmatic-console-appl.aspx | |
possibly better than nip2-cli.exe | |
- turning a column from Many Stats into a vector for doing arithmetic is very | |
tricky argh | |
add a matrix->vector converter? or maybe a one column or 1 row matrix should | |
also be a vector | |
- try: | |
nip2 Workspaces.uniformshapes2.A1.start_line=21 uniformshapes2.ws | |
--set does not work for non-toplevels | |
- try: | |
A1 = [1] | |
A2 = [x :: x <- A1] | |
change A1, A2 does not update, argh | |
we get: | |
link_expr_new: expr A2.$$lcomp0 references link->child = A1 | |
so perhaps we are updating the local of A2, but not A2? | |
A2 is certainly being marked dirty ... on change of A1 we get: | |
row_dirty_set_single: A1 clear_error = true | |
symbol_dirty_set: A1 (0x1a59480) | |
symbol_dirty_set: A2 (0x1a595a0) | |
symbol_recalculate_check: untitled.A1 | |
row_dirty_clear: A1 | |
row_recomp_all: done row A1 - 0.000143873s | |
row_dirty_set_single: A1 clear_error = false | |
row_dirty_clear: A1 | |
symbol_dirty_clear: A1 (0x1a59480) | |
success: [2] | |
symbol_recalculate_check: untitled.A2 | |
symbol_dirty_clear: A2 (0x1a595a0) | |
success: [1] | |
so maybe A2.something is being updated, but the row is not | |
we now mark a row dirty if a sub-expr is dirty. but in row_renerate(), we | |
don't build subexprs | |
should we mark the subexpr dirty? (or maybe we do?) | |
or should we always copy all subexprs when we copy an expr | |
or only subexprs with no row? | |
do we calc rows outside-in or inside-out? does this affect copying subrows? | |
when do we copy now, the first time a row is made? | |
- we destroy and rebuild all links during recomp (eg. turn on DEBUG in | |
link.c), why is this? can't we only rebuild on a change of source text? | |
- fix the FIXME in itext_clear_edited() or wherever it is | |
- try: | |
start nip2 | |
dir untitled | |
create A2, A3, etc. | |
A1 does not update | |
when we add/remove a def to workspace, should we mark the ws dirty? | |
- lambdas should allow patterns? eg.: | |
map (\[x, y] x + y) [[1, 2], [3, 4]] == [3, 7] | |
- OS X bundler: | |
http://sourceforge.net/apps/trac/gtk-osx/wiki/Bundle | |
test? | |
- imageinfo_make_paintable() no longer copies to a file, since this used to | |
cause problems with dangling pointers because of the im_close()s we had to | |
do | |
however, this means we now do all painting in memory :-( do we need to add | |
API to change a memory image (eg. a "p") into a file? | |
- test Joe's layout thing, compare to the thing we do in study2 to make the | |
diagnostic image | |
- im_blend(), im_ifthenelse(), im_add() etc. now do bandalike/formatalike | |
where do we use our bandalike/formatalike stuff? remove our stuff, though | |
make sure we have equivalents in vips now | |
- outline text example | |
- needs a custom convol menu item which can loop over a group of matricies | |
with a single image | |
actually, we need to nail this down, otherwise when we pass in a list of | |
sample texts the loops don't nest | |
- right-click menu on row button should have items for "Jump to referrer / WC1 | |
/ JC1 ..." and "Jump to referred / ..." | |
- why didn't im_copy_file() work? mysterious | |
- line colours are wrong, argh, very mysterious, see | |
plot_new_gplot() | |
- gtk3.0 tests: | |
build with | |
#define G_DISABLE_DEPRECATED | |
#define G_DISABLE_SINGLE_INCLUDES | |
#define GDK_DISABLE_DEPRECATED | |
#define GTK_DISABLE_DEPRECATED | |
#define GDK_DISABLE_SINGLE_INCLUDES | |
#define GTK_DISABLE_SINGLE_INCLUDES | |
paste into config.h, somehow | |
need to remove: | |
GtkType | |
gtk_type_new | |
gtk_signal_connect | |
GTK_SIGNAL_FUNC | |
gtk_signal_handler_block_by_data | |
` gtk_signal_connect_object | |
GTK_CHECK_CAST | |
GTK_CHECK_TYPE | |
GtkSignalFunc | |
- add Set menu to Math with mkset/union/intersection/difference ? | |
could do bit operations on images? | |
- lcomps like: | |
argh = [x :: x <- poop] | |
the 'x' gets copied inside the lcomp, leaving a zombie 'x' attached to argh, | |
which Program / View / Errors then reports | |
fix: don't resolve names as we parse and junk the ugly patch list thing | |
instead, have a separate resolve stage that runs after we've moved scraps | |
of graph to their final home | |
- if we want full VipsObject introspection we will need a lot more | |
vips_object_arguments (name2gtype "VipsInterpolateYafrsmooth") | |
-> ["sharpness"] | |
need some equivalent for GParamSpec / VipsArgument | |
VipsArgument name type .... = class {} | |
return a list of these from vips_object_arguments()? | |
- heap_map_dict() should be reduce_map_dict(), since it does reduction, argh | |
redo heap_map_dict() in terms of reduce_map_dict() | |
actually, remove all the reduce_ stuff, it's daft to have a distinction | |
something to do when we break Snip out into libsnip | |
- Plot window should have image header menu item? | |
not trivial, image header needs a conversion to watch | |
we'd need to make a conversion in plotmodel | |
- filesel guess-file-type-from-suffix needs fixing | |
copy the vips model of having a user_name which is just "Workspace" or | |
somesuch, and making "Workspace file (*.ws)" string at runtime | |
use this to identity file types in util.c as well: get_image_info() needs it | |
- for rows made by typing stuff, always show the formula as well as the value | |
by default anyway? | |
we'd need to always show the up/down arrows, not just for classes | |
- drag from an image thumbnail to the ws background and you get a new column | |
with "A2" or whgatever in | |
does not work for plot thumbnails! how annoying | |
- right-click on image background to get a context menu with | |
save/replace/header? same as row thumbnail context? | |
- look at using goffice instead of gtkplot for graphs | |
http://ftp.gnome.org/pub/gnome/sources/goffice/ | |
also in synaptic | |
there's also a new cairo-based gtkplot in SVN, apparently | |
- try | |
last [1..] | |
then CTRL-W ... we can quit the app, but it's still evaling and the prompt | |
never comes back | |
- Math / Cluster is a bit useless, will it work for complex numbers? vectors? | |
colours? groups? | |
what would we have to do to get it to work for these other types? | |
- toolkit load is where compiled code would go in | |
need to make load / parse / compile self-contained ... the only output is a | |
list of symbols, each with code and sub-symbols; there are no toolkits or | |
whatever made | |
after load / parse / compile, we need to walk the symbol list building tools | |
and all that stuff | |
we do: | |
load toolkit: | |
get filesize, date last modified, md5sum | |
look in ~/.nip2-7.x.x/cache for a file named with that md5sum | |
if present, open and check first two fields: filesize and date | |
if match, load compiled code | |
if no match, load / parse / compile toolkit, then save compiled | |
code to ~/.nip2-7.x.x./cache | |
walk symbol list building tools and all that stuff | |
how much time will this really save? can we easily get an estimate? | |
steps to follow: | |
1. make load / parse / compile self-contained, with separate pass to | |
build tools etc. | |
this is a useful cleanup whatever else we do | |
2. now we know exactly what the output of load / parse / compile is, we | |
should be able to write to a file | |
make our own binary format, don't use XML ... we want speed | |
3. try loading and benchmarking | |
4. if the benchmarks look promising, harden and polish | |
- numbering of group of group save seems to skip one at end of line? | |
- Math / Cluster is a bit useless, will it work for complex numbers? vectors? | |
colours? groups? | |
what would we have to do to get it to work for these other types? | |
- segv in test_toolkits on laptop (inside fftw3) ???!? valgrinds cleanly on | |
work machine | |
- try | |
last [1..] | |
then CTRL-W ... we can quit the app, but it's still evaling and the prompt | |
never comes back | |
- configure no longers sets GMSGFMT, is this OK? test on OS X | |
- for rows made by typing stuff, always show the formula as well as the value | |
by default anyway? | |
we'd need to always show the up/down arrows, not just for classes | |
- drag from an image thumbnail to the ws background and you get a new column | |
with "A2" or whgatever in | |
does not work for plot thumbnails! how annoying | |
- right-click on image background to get a context menu with | |
save/replace/header? same as row thumbnail context? | |
- look at using goffice instead of gtkplot for graphs | |
http://ftp.gnome.org/pub/gnome/sources/goffice/ | |
also in synaptic | |
WONTFIX for 7.14 | |
================ | |
- quit while a thumbnail is painting: IMAGEs are leaked? seems esp. bad with | |
greyc, perhaps just because it's so slow | |
- do we enforce no-args-to-LHS-pattern anywhere? try | |
[a,b] a b = 12; | |
- use destroy_if_destroyed() in more places? | |
grep destroy_ *.h | |
- after pressing "Process" in the edit window, we always select last_sym, | |
which is often not what we want | |
make it jump less after a process ... eg. try editing something in the | |
middle of Image/Transform, very annoying | |
- use compile->last_sym to spot chains of defs | |
multiple definitions of the same function are allowed, provided they all | |
multiple definitions of the same function are allowed, provided they all | |
have the same number of arguments, and provided only one of them has no | |
argument pattern matching | |
example: | |
fred [a, b, 1] = a * b; | |
fred (Image x) = rot90 x; | |
fred z = error "what"; | |
any of these can have locals, those locals just apply to that one | |
definition | |
this compiles to: | |
fred $$a4 | |
= $$fred1, is_list $$a4 && len $$a4 == 2 && $$a4?2 == 1 | |
= $$fred2, is_instance_of "Image" $$a4 | |
= $$fred3 | |
{ | |
$$fred1 | |
= a * b | |
{ | |
a = $$a4?0; | |
b = $$a4?1; | |
} | |
$$fred2 | |
= rot90 x | |
{ | |
x = $$a4; | |
} | |
$$fred3 | |
= error "what"; | |
{ | |
z = $$a4; | |
} | |
} | |
so each pattern-matching definition generates a condition and an action | |
constants in patterns become part of the condition test | |
the action goes into a private function, the conditions are joined together | |
in the function wrapper | |
the no-pattern case (if present) becomes the action for the "otherwise" | |
clause in the wrapper | |
if not present, we generate (error "pattern match failed") or somesuch for | |
the default case | |
we will need to regenerate the wrapper function every time a definition of | |
fred is added or removed ... can we do this easily? | |
when are two definitions considered equal? should we warn about this? "fred | |
x" could occur in two files, for example | |
process: | |
* we see a "fred arg-list" incoming | |
* does the arg list contain any patterns? | |
yes: | |
* do we already have a fred in this scope? | |
yes: | |
* the existing fred must be the wrapper, this must be | |
a new possible RHS | |
* check that the number of args matches | |
no: | |
* generate a fred to act as the wrapper | |
* add args called $$arg1 etc. to the main fred | |
* add this new fred as a $$fredn local to the current | |
fred | |
* expand the patterns as local references to the main | |
fred's arguments | |
* parse the rest of the def in that context | |
* keep the pattern list around, we'll need it to generate the | |
ifs for the wrapper later | |
no: | |
* do we have a fred in this scope? | |
yes: | |
* check the previous fred was a pattern matcher | |
* check the number of args matches | |
* check there isn't already a default case | |
* add as above | |
no: | |
* add as a regular non-pattern definition | |
issues: | |
* where do we store the pattern lists? we can't expand them at | |
parse-time, since we need them to make the wrapper (which we can't | |
make until we've seen all the candidate RHS) | |
* when one of the RHS is changed, we need to regenerate the wrapper, | |
how do we do this? (could nuke the generated code in the compile | |
when we see a new RHS, then rebuild the wrapper in compile on the | |
next heap_copy?) | |
* our current condition generator won't work ... we need to test | |
consts as well, and it'll be rather inefficient as we'll repeatedly | |
test the trunk as we loop over the leaves --- instead, walk the | |
pattern recursively top-down testing each node | |
process: | |
* see "fred" (as opposed to simple_pattern) | |
* is there already a fred in scope? | |
yes: | |
* was current_compile->last_sym also a "fred"? | |
yes: | |
* another definition | |
yes: | |
* this must be an alternative definition | |
- we put the 2nd fred in as a local of the first, but then the 2nd can see all | |
the stuff the first has as locals | |
z = 42; | |
fred 1 = 12 { z = 99; } | |
fred 2 = z; | |
"fred 2" will return 99 :( | |
we need to make "fred 2 = z" into another fred at the same level, eg | |
$$alternate42$fred 2 = z; | |
Nope, then how do we link the freds together for remove etc.? | |
Better: | |
see a new sym (fred), create it | |
parse args with simple names becoming params, patterns becoming | |
$$arg42 plus a local $$patt42 holding the pattern source | |
expand the pattern to an access def as well, so our children can bind | |
to it | |
at the = sign, test for any pattern args present .. if there are none, | |
carry on as before | |
otherwise, make a new local called $$alternate42 or whatever and parse | |
the RHS into that | |
at the end of parse, need to resolve outwards twice, since we nest in | |
twice | |
now if we see another fred, check that the number of args matches and | |
then parse in as $$alternate99 | |
what abut | |
fred 2 a = 12; | |
fred 1 b = 32; | |
the first fred will make a top-level with | |
fred $$arg12 a | |
= | |
{ | |
$$alernate42 = 12; | |
$$patt12 = 2; | |
} | |
then when we parse the 2nd fred the name of the 2nd param is wrong :( | |
Even betterer: | |
use GLR to split off the four cases for us | |
ident = | |
pattern = | |
ident ident_list = | |
ident pattern_list = | |
change pattern syntax so that ident is not part of simple_pattern | |
need to change lcomp as well | |
so we need to check why PARSE_PARAMS gets used: can we do without the | |
params part? yes, it's used so we can edit functions, but we no longer | |
do this | |
these days all we need is expr I think, but we'd need a small action | |
wrapper around it to wipe out any existing tree and locals | |
Find_item = class | |
Menuaction "_Find" | |
("find a transform which will map sample image onto " ++ | |
"reference") { | |
action reference sample = class | |
Transform b reference.width reference.height { | |
_vislevel = 3; | |
// controls | |
order = rubber_order; | |
interp = rubber_interp; | |
wrap = rubber_wrap; | |
max_err = Expression "Maximum error" 0.3; | |
max_iter = Expression "Maximum iterations" 10; | |
// transform | |
[a,b,c] = transform_search max_err max_iter order interp wrap | |
sample reference; | |
transformed_image = Image a; | |
final_error = c; | |
} | |
} | |
fails with | |
Bad superclass. | |
Superclass constructor | |
"Image_transform_item.Image_rubber_item.Transform" | |
should have no secret arguments. | |
but this: | |
Find_item = class | |
Menuaction "_Find" | |
("find a transform which will map sample image onto " ++ | |
"reference") { | |
action reference sample = class | |
_t { | |
_vislevel = 3; | |
// controls | |
order = rubber_order; | |
interp = rubber_interp; | |
wrap = rubber_wrap; | |
max_err = Expression "Maximum error" 0.3; | |
max_iter = Expression "Maximum iterations" 10; | |
// transform | |
[a,b,c] = transform_search max_err max_iter order interp wrap | |
sample reference; | |
transformed_image = Image a; | |
_t = Transform b reference.width reference.height; | |
final_error = c; | |
} | |
} | |
(ie. make the superclass constructor into a member) works fine | |
- try using bison's location system | |
http://www.gnu.org/software/bison/manual/html_mono/bison.html#Locations | |
- add something to Symbol: | |
Symbol *access_for; | |
links generated access def to the $$thing4 which holds the RHS | |
handy for the program window, also maybe for lcomp code gen? | |
also for row edits | |
- don't offer to clear temps if there's been a crash | |
need to be able to test for process-still-running by PID | |
try | |
http://msdn2.microsoft.com/en-us/library/ms886766.aspx | |
gboolean | |
process_running( int pid ) | |
{ | |
HANDLE handle; | |
if( (handle = OpenProcess( 0, FALSE, pid )) ) { | |
CloseHandle( handle ); | |
return( TRUE ); | |
} | |
return( FALSE ); | |
} | |
- autoarrange after every column resize or move | |
animate movement, so columns slither out of the way and in to place when | |
you drop | |
duplicate column placement would be odd: maybe place duplicate below? also | |
new column? what about dropping an image on to the ws background? | |
- there's some left-recursion in the parser, eg. comma_list, is this easily | |
fixable? | |
- add (*) (operator sections) ... need a binup / uop production? can't | |
do this without losing precedence stuff, it'll need a separate production | |
for sections | |
- magic definition maker could make a workspace-local def, rather cool | |
- test classmodel_dict_new() ... part of classmodel member automation | |
need to implement member edit for OPTION groups | |
classmodel_done_member() ... read widget set -> model | |
classmodel_buildedit_member( ... model -> build widget set | |
part of the [["key",value]] arg type | |
- can we get VIPS errors reported in Error too? | |
we'd need to add logging to vips I think | |
- toolkits / find doesn't find builtins on their name ... eg. search for | |
"im_add" | |
too hard to fix with the way searching is done now | |
- turn on update regions during drag, fix the x pos, try dragging, horrible | |
flickering as we update twice, once after the drag motion and once after the | |
recomp | |
if you comment out the explicit vobject_refresh() in | |
regionview_model_update() the flickering goes, but region dragging is then | |
very unresponsive | |
fix this when we get fast recomp back again | |
- have a test_types.ws ... test arithmetic on all combinations of _types? | |
- panner would be cool | |
- tooltips on Expression rows always show unedited formula | |
could special-case formula for things with expression RHS? | |
- what about iimage, iregion, iarrow ... can we member automate these? why are | |
they different? | |
- can't see error indications in noedit mode | |
should set a red background for display area as well as for rowview button? | |
- need to be able to override cons to be able to make a List class :-( | |
see reduce.c:1710 | |
this will change the strictness of cons ... how much breakage will this | |
cause? very unclear | |
try this as a quick hack | |
need to do this before we can finish List | |
need List to make gamma easy | |
- unselected column headers are too like the bg colour on windows? | |
- python uses z.real and z.imag to extract real/image, should we add this too? | |
we don't really have complex as a true class, so it would be rather odd | |
need to add "[a].head" etc as well | |
- python blocks complex->real with casts ... insists you use .imag/.real or | |
abs() | |
- if nip sees a IM_RW_IMAGE argument, it could automatically do this: | |
int | |
im_flood_blob_copy( IMAGE *in, IMAGE *out, int x, int y, PEL *ink ) | |
{ | |
IMAGE *t; | |
if( !(t = im_open_local( out, "im_flood_blob_copy", "t" )) || | |
im_copy( in, t ) || | |
im_flood_blob( t, x, y, ink, NULL ) || | |
im_copy( t, out ) ) | |
return( -1 ); | |
return( 0 ); | |
} | |
so it would turn a single IM_RW_IMAGE arg into a paired input and output | |
arg | |
could make im_lineset() into a regular inplace func and rely on nip to wrap | |
and unwrap | |
junk flood_blob_copy | |
nip could do this lazilly ... if we see the user doing | |
im_line (im_line ...) ... | |
then we could make one memory image and call im_line twice on it | |
destructively ... cool! we'd need to check refcounts to make sure the | |
intermediate wasn't being used anywhere else | |
hmm! might actually be very hard, we don't have true refcounts for things in | |
the heap | |
need to do it on read instead: | |
- for image i | |
- use as an IM_RW_IMAGE arg ... copy to a memory area and pass in memory | |
handle | |
- return memory area IMAGE j, and set a flag saying "can operate on | |
destructively" | |
- if we use j as an IM_RW_IMAGE arg, skip the copy and just pass memory | |
area in destructively ... we now have two ImageInfo sharing a single | |
IMAGE | |
- !!!! | |
- does ImageInfo allow IMAGE sharing? not sure it does | |
- maybe this needs to be a vips8 feature when we'll have refcounts on | |
IMAGE | |
- tooltip on column says which other columns items in this column refer to, | |
and which columns refer to items in this column | |
- how about a nip start folder common to all versions | |
so nip2-7.11.14 tries | |
.nip2-7.11.14/start | |
.nip2-7.11/start | |
.nip2-7/start | |
.nip2/start | |
or maybe | |
.nip2/7.11.14/start | |
.nip2/7.11/start | |
.nip2/7/start | |
.nip2/start | |
bit less cluttered | |
also, we could have | |
.nip2/tmp | |
and not have multiple nip2 tmp areas | |
workspace recover after crash could break though ... maybe keep ws saves in | |
.nip2/7.11.4/tmp? | |
- think again about class arg checks | |
is there some way we can avoid the _check overhead? or at least check less | |
often | |
- plotpresent/imagepresent could have a common base class with the focus stuff | |
in? also kb nav, zoom, drag-scroll | |
a bit difficult, because we want two different policies on window resize: | |
plot should change the object to match the window | |
- photographic negative should also be in image/levels ? | |
no, it does ->sRGB, (255-) etc., so it's better as a filter | |
- gtk+ 2.12 has a treeview widget with rectangular select and grid lines | |
use instead of gtksheet? | |
- stop image flickering on clock recomp? | |
want background pattern to be a property of the image display widget, not | |
the image? | |
so we fade in tiles when that section of the image has never been displayed | |
before (eg. on scroll or zoom) | |
we don't fade when that section has been painted and we are just changing | |
the image (eg. on recalc) | |
if fadesteps == 1, only paint the sections of the tile for which mask == 255 | |
this way we will never paint the bg pattern | |
need some hack for scroll/zoom ; test for mask == 255 would be slow :( | |