r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[View] discuss view related issues

Maxim
21-Oct-2010
[10398]
another thing I've seen which causes immediate close is the use of 
"some" AGG constructs which crash the interpreter silently.


chief among them is to use line-patterns which more than 2 colors. 
 it doesn't always crash, but *it will* suddenly, without warning, 
IIRC.
Pekr
21-Oct-2010
[10399]
maybe it just travelled to Steeve Jobs for approval :-)
Henrik
21-Oct-2010
[10400]
Maxim, I guessed, because we had a few stack size problems a couple 
of days ago with R3 builds.
james_nak
21-Oct-2010
[10401x2]
Yes, what I mean by disappears is that the program closes without 
any errors. I will check the OS's, that's one I didn't ask. It's 
intermitent  so that hasn't helped either.
And what I mean by no errors, is that none are displayed which of 
course, doesn't mean there weren't any errors. Thanks for your thoughts.
amacleod
27-Oct-2010
[10403x2]
I was playing with Cyphre's "Transparency window under View" script 
trying to get a transparent overlay that I could use to draw over 
other programs like they use to doodle over plays in football. I 
was able to get it to work in vista but not xp. Anyone know what 
might be going on there?
different user32.dll but I can not find any info on what the diffs 
might be.
Maxim
27-Oct-2010
[10405x2]
I remember it working on my xp
is this an old system?
amacleod
27-Oct-2010
[10407]
the script works but the abilitiy to paint over the color-keyed area 
does not work in xp...
Maxim
28-Oct-2010
[10408]
yI'd look it up on MSDN there might be extra steps to update the 
transparency in real-time  but it is definitely doable, I've seen 
an animated opengl demo rendering directly over all windows without 
a window of its own.
Oldes
30-Oct-2010
[10409]
How to clear the image cache? I always forget that:/
Sunanda
30-Oct-2010
[10410]
load-image/clear
Oldes
31-Oct-2010
[10411x2]
Yes, but what if you don't want to load image yourself.. for example 
in this simplifed example:

write/binary %tmp.jpg read/binary http://www.rebol.com/graphics/carl1208-120.jpg
view layout [ image %tmp.jpg button "close" [unview/all]]

write/binary %tmp.jpg read/binary http://www.rebol.net/photos/carl3.jpg
;now there should be new image used, but it's not:
view layout [ image %tmp.jpg button "close" [unview/all]]
delete %tmp.jpg


I think that the solution is to clear the image cache on unview/all. 
What do you think?
The only way how to clear the cache without loading new image is 
using:

write/binary %tmp.jpg read/binary http://www.rebol.com/graphics/carl1208-120.jpg
view layout [ image %tmp.jpg button "close" [unview/all]]
clear second second :load-image

write/binary %tmp.jpg read/binary http://www.rebol.net/photos/carl3.jpg
view layout [ image %tmp.jpg button "close" [unview/all]]
delete %tmp.jpg
Anton
31-Oct-2010
[10413]
Oldes shows that you can't just "load-image/clear", you must "load-image/clear 
imgfile", which loads a new image after clearing the cache. It offers 
no way to separate the two functionalities. Annoying, isn't it?


O  Use  clear second second :load-image , as you are, but I suggest 
doing this straight after the loading, eg.

 layout [ image %tmp.jpg  do [clear second second :load-image] ... 
 ]

O  Patch or replace LOAD-IMAGE  eg. so its IMAGE-FILE argument can 
also be NONE!

O  Patch the IMAGE style by changing the FILE function in the MULTI 
object:
	print mold get in svv/vid-styles/image/multi 'file
    so it doesn't use LOAD-IMAGE.
[ ]  Submit this deficiency to curecode.

Or  
>> view layout [image (load %bay.jpg)]
>> mold second second :load-image
== "[]"
Brock
31-Oct-2010
[10414x2]
am I stating something obvious when I say check the source for load-image?
>> source load-image
load-image: func [
    "Load an image through an in-memory image cache."
    image-file [file! url!] "Local file or remote URL"
    /update "Force update from source site"
    /clear "Purge the entire cache"
    /local image image-cache
][
    image-cache: []
    if clear [system/words/clear image-cache recycle]
    if any [update not image: select image-cache image-file] [

        if all [update image] [remove/part find image-cache image-file 2]
        repend image-cache [
            image-file
            image: either file? image-file [load image-file] [

                either update [load-thru/binary/update image-file] [load-thru/binary 
                image-file]
            ]
        ]
    ]
    image
]
Oldes
1-Nov-2010
[10416]
I was checking the source of course, without it I would not come 
with code like:
	clear second second :load-image


But it was not for the first time when I had the situation with the 
unexpected image. Of course, to use :
	layout compose [image (load %image.jpg)]

is a solution as well. I just have to remember it not be confused 
again with code:
	layout [image %image.jpg]


The problem is, that normal user who want's to just display simple 
view layout does not know that there is the function load-image.
Cyphre
1-Nov-2010
[10417]
another rokaround is:
load-image/clear http://
or load-image/clear to-url none
etc.
Maxim
2-Nov-2010
[10418x2]
anyone started work (maybe even finished) some Draw ->  SVG converter 
?


actually, even the other way round would be usefull if the above 
isn't already tackled.
if you've started one, I'd be willing to either finish it or use 
it as a reference to build a mostly complete one and give it back 
to the community on rebol.org.
Steeve
2-Nov-2010
[10420x3]
SVG -> DRAW in R3 
but not finished...
but not working anymore with the host-kit
Input: 
http://sites.google.com/site/rebolish/test-1/lizard.svg
output:
http://sites.google.com/site/rebolish/test-1/lizard-rebol.png
code:
http://sites.google.com/site/rebolish/test-1/svg.r
Maxim
2-Nov-2010
[10423]
thanks!  I'll look into it, its possible that I need it, possible 
that I don't ... I just want to know what's out there so I can take 
educated decisisons :-)
Steeve
2-Nov-2010
[10424]
I probably made a wrong choice, trying to parse the source on the 
fly instead of converting the xml source into nested blocks.
Maxim
2-Nov-2010
[10425]
I'll have to build the convertion on both sides, so converting your 
code into using rebol blocks is going to be my choice.


I already have the xml part very well covered, so I'll dive into 
this in a few days.  thanks again.
GrahamC
2-Nov-2010
[10426x2]
Max, a task for you :) http://www.the8pen.com/index.html
Saw this on Gab's facebook comments
Maxim
2-Nov-2010
[10428]
wow that's real research... seems extremely usable!
GrahamC
2-Nov-2010
[10429x2]
yeah .. I do my research on facebook
Looks doable in View and R2
Maxim
2-Nov-2010
[10431]
yes, but with patent pending, it means we can't actually do it unless 
we get a license from them.
GrahamC
2-Nov-2010
[10432]
eh??
Maxim
2-Nov-2010
[10433]
yep.
GrahamC
2-Nov-2010
[10434x2]
I don't think this sort of thing is copyrightable
otherwise we would also still be using visicalc
BrianH
2-Nov-2010
[10436]
But patentable, yes. They didn't have software patents in the visicalc 
days.
Maxim
2-Nov-2010
[10437]
of course it is. if some can patent double clicking on a portable 
device icon.. this most assuredly yes.
GrahamC
2-Nov-2010
[10438]
some countries software patents are not enforceable
Maxim
2-Nov-2010
[10439]
and in fact, this is one of the cases where a patent is used in its 
rightfull way.. this is truely an invention, original and even fully 
developped.
GrahamC
2-Nov-2010
[10440]
I doubt it .. gestures for letters have been around for a long time
Maxim
2-Nov-2010
[10441]
though the result seems easy to reproduce, the research and the original 
idea of how this is being approached is very nice.
GrahamC
2-Nov-2010
[10442]
it's evolution ... not revolution
Maxim
2-Nov-2010
[10443]
since its not really gestures in the way I'm used to understand them.
GrahamC
2-Nov-2010
[10444]
builds on prior art
Maxim
2-Nov-2010
[10445]
not really.. the only prior art it shares is in the fact that you 
scrub your fingers.. its not actually using shapes, but a very simple 
clockwise counting algorythm.
GrahamC
2-Nov-2010
[10446x2]
if you draw a semblance of a g and it turns it into a g .. what's 
new about that?
the only new thing is some lines on the screen :)