• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp5907
r3wp58701
total:64608

results window for this page: [start: 41301 end: 41400]

world-name: r3wp

Group: View ... discuss view related issues [web-public]
Maxim:
2-Sep-2010
so there are a few options.


I'd build a transparent image to start and graph stuff over it using 
draw.

ex:

x: make image! 512x512
x/alpha: 255
draw x [fill-pen red circle  256x256 200]
Maxim:
2-Sep-2010
one thing to consider is how transparency relates to color. in the 
above, you will probably get a dark edge around the circle.


that is because the color around the circle actually is darker, so 
even if its partly transparent, it will add transparent dark red 
instead of red.
JoshF:
2-Sep-2010
That is the missing link! Thank you very much, Maxim!

For what it's worth, it seems that it's possible to skip a step in 
your example by saying:

    x: make image! [512x512 0.0.0.255]


Since, I'm compositing over stuff, the pre-multiplied alpha problem 
you describe shouldn't be a difficulty.
Nicolas:
5-Sep-2010
In rebol, the only thing that stops a left mouse drag is left mouse 
up.
Graham:
5-Sep-2010
I think it's been asked for a few times in the past ...
ICarii:
5-Sep-2010
There is a hotkit file that can be modified to add ALT support but 
then you need to create pass-thru scenarios for general window meta 
commands if you want the application to behave normally - eg ALT-F4 
etc.
Graham:
12-Sep-2010
If you had a requirement to log a user out of an application after 
a period of inactivity... what's the best way to do this?
Gregg:
12-Sep-2010
I don't know of a single best way. One of the key elements, though, 
is determining what constitues "activity". If you have a central 
command dispatch loop of some kind, and every command that indicates 
activity goes through that makes it easier. Then you probably have 
some kind of default state that is used when the app starts up, and 
you revert to that. Of course, if you have useful state that you 
throw away the user won't be happy.
Anton:
13-Sep-2010
You could have the remote client app monitor its own View events, 
and when there are some within 5 minutes, send a "I'm still here" 
message to the server. If the server doesn't receive any of those 
for an hour, then logout that client.
Graham:
13-Sep-2010
thanks .. so I can use insert-event-func to monitor global events 
and just pass them on.  If I don't get any user events I can lock 
the screen until the user types in a password
Henrik:
13-Sep-2010
perhaps you can set a rate on the window face.
Graham:
13-Sep-2010
I already have one that sends a heart beat to the server
Maxim:
15-Sep-2010
it will depend on what you mean by "chroma keying".   most people 
in the PC world interpret it as a single color value becomes 100% 
transparent (like a .bmp).


in the VFX world chroma keying is a range using an alpha channel 
mask (like a .png, for example).  so yes it is possible.  


IIRC, windows supports an alpha plane to manage the transparency, 
but I have not played with this myself yet.
Maxim:
15-Sep-2010
R2's chroma key effect  uses a single color as the transparency. 
 so you'd need to build an alpha image using a range based on luma 
or some other more complex algorithm... which you can easily find 
on the net.
Maxim:
15-Sep-2010
usually, you pick a center point, and decide on a range.  you can 
filter out the transparency with additional parameters like luma, 
saturation and things like that.  

basically adding or removing from each previous step, until you get 
the alpha channel mask you want.
amacleod:
15-Sep-2010
I wanted to create a near transparent window onto another windows 
app so I could draw/sketch over it like they do on tv during a football 
game.


playing with Cyphre's script the transparency works on the whole 
window including title bars and borders.
 

Perhaps I could use a chrome key to get full transparency on the 
area I want to see throught to and lay over that a draw based semi-transparent 
object to draw on....I'll do some experimenting.


Else I will need to make the whole project Rebol and not use this 
"cheat"
amacleod:
15-Sep-2010
Anyone play around with particle/plasma generators on rebol...I think 
I remember a script that had like a plasma effect.


I want to try and mimick fire and smoke....does not have to be super 
realistic....
Maxim:
15-Sep-2010
game engines use this simple system.


-create very transparent images with a gaussian fall off.  actually 
give the prefered shape to your image... so if you want a triangle-like 
flame, generate a smooth triangle with alpha/color falloff.

-create a block which will store a list of pairs, each one holds 
the position of a single "particle"
Maxim:
15-Sep-2010
decide on a number of particles, lets say   count: 20
Maxim:
15-Sep-2010
decide on a particle life time... lets say  life: 10
Maxim:
15-Sep-2010
if you want smoke, just add the "dying" particles to a second list, 
using the same process, to animate them but with a bigger/softer 
image.  

the dying fire becomes the birth of the smoke.
Maxim:
15-Sep-2010
for more control, you can also store two sets of pairs for your particles... 
one being the position and the second being current velocity... this 
has the advantage of guaranteeing particle movement direction.  in 
your loop, all you do is add a bit of variation to the velocity and 
then add the velocity to the position.
amacleod:
15-Sep-2010
Very cool, Maxim...thanks. 

is this done as an interactive process?

Not sure what you are asking but stage 1 would be to allow these 
fire "objects" to be placed on top of an image via drag and drop 
and allow for some editing such as sizing. (Later versions would 
allow adjusting those other variables you mentioned above). 


Stage 2 would allow for some transitions from one set of settings 
to another so for example the fire can become more intense over time 
or when clicked on or a button is pressed. 


I just had a week of training on a flash based system...its cute 
and does teh job for what we are going to use these "simulations" 
for but I thought it was a little too complicated for your average 
fireman to use if he wanted to create his own sims for drill purposes.


The flash extensions used all those variables you mentioned above 
to allow for a great degree of controll of the effects.
Maxim:
15-Sep-2010
by interactive I mean will this be rendered or running live?


with a rendered system you can crank up the particle count and just 
pregenerate the whole data set as a series of images.  then when 
you need to see it, just cycle the image of a face.


usually, people use a few particles for preview... then generate 
"flipbooks" which are just rendered images and include thousands 
of particles with their alpha channel density reduced to practically 
nothing (like 2% visibility)  this generates very pretty effects, 
but at a cost of rendering time.
Maxim:
15-Sep-2010
If you can get the basic system setup, I'll help you improve it. 
 just give me a link to download  :-)
Maxim:
16-Sep-2010
you could render it as a single plane mask and use it only as transparency 
(alpha) for another image.
Maxim:
16-Sep-2010
I mean a particle system built-in the engine...
Steeve:
16-Sep-2010
If my I'm not doing a wrong guess, your WITH function bind its block 
each time it's called. That may be quite slow.
Steeve:
16-Sep-2010
But maybe, it's just a dialect, not something evaluated by Rebol 
in real time...
Steeve:
16-Sep-2010
instead you could process a cluster of particules with the same path 
(tough, the look an feel may be less impressive)
Oldes:
16-Sep-2010
The problem is, that we have only 40MB for complete game so I cannot 
prerender the smoke effect into sequence of images and I cannot do 
it even during init time as the engine has some problems with premultiplied 
semitransparent images. But I want to do some improvements.. also 
it's possible to make (pregenerate) a classic animation for each 
particle so no AS would be used to traverse the block with positions 
which also slows down a little bit... and no, the engine is not slow 
for that, but you must have the game itself running as well under 
the smoke effect:)
amacleod:
17-Sep-2010
Thanks Oldes. But I did not want to use flash...wanted a pure rebol 
solution.
Maxim:
17-Sep-2010
I'm working on a little particle generator... I coudn't resists.
Maxim:
17-Sep-2010
the particle engine is done, I'm now building a view interface to 
control the various properties like wind/turbulence.   you can even 
ignite your own fires & smoke with a click of the mouse.  

won't be long, I'll put it on rebol.org.
Maxim:
17-Sep-2010
I'm just about done... the current gui, has a victorian house in 
the backdrop and tree branches in the foreground which add to give 
a sense of depth
Maxim:
17-Sep-2010
all that I need to do know is....

-create a new default setup with all the new options... aligned with 
the house windows... 
-merge the images within the script as binary data.
Maxim:
17-Sep-2010
yep... its going to be a one-script affair.
Maxim:
17-Sep-2010
just to wet your appetite a bit....


http://www.pointillistic.com/open-REBOL/moa/files/burning-house.png
Maxim:
17-Sep-2010
a run-time screen grab while the simulator is running  :-)
Maxim:
17-Sep-2010
well, embedding the images is a no go... it inflates them to about 
half more (including  a compress and 64 base compression)  so I'll 
just use an url which loads the paths.
Graham:
25-Sep-2010
Ashley posted something .. have a search
Gregg:
25-Sep-2010
A looooong time ago, Carl Read and I did something for TTFs on Windows. 
I can dig it up if you want Chris.
Ashley:
26-Sep-2010
get-fonts: make function! [
	"Obtain list of fonts on supported platforms."
	/local s fonts
] [
	fonts: copy []
	either 3 = fourth system/version [

  call/output {reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows 
  NT\CurrentVersion\Fonts"} s: copy ""
		s: skip parse/all s "^-^/" 4
		foreach [fn reg style] s [
			fn: trim first parse/all fn "("
			all [
				not find fonts fn

    not find ["Estrangelo Edessa" "Gautami" "Latha" "Mangal" "Mv Boli" 
    "Raavi" "Shruti" "Tunga"] fn
				not find fn " Bold"
				not find fn " Italic"
				not find fn " Black"
				not find fn "WST_"
				insert tail fonts fn
			]
		]
	] [
		call/output "fc-list" s: copy ""
		s: parse/all s ":^/"
		foreach [fn style] s [
			all [
				not find fonts fn

    (size-text make face [text: "A" font: make font [name: fn size: 10]]) 
    <>

    size-text make face [text: "A" font: make font [name: fn size: 12 
    style: 'bold]]
				insert tail fonts fn
			]
		]
	]
	sort fonts
]
ddharing:
11-Oct-2010
Has anyone been writing much VID or Draw code for Linux? I've tried 
a number of distributions and get the same result -- REBOL/View 2.7.7 
has some serious issues. I can't even open the Demo folder on the 
Viewtop without getting a segmentation fault. Version 2.7.6 does 
not have this problem.
Henrik:
11-Oct-2010
Fonts are usually a problem. I'm not sure what has changed between 
2.7.6 and 2.7.7 in this regard.
Maxim:
11-Oct-2010
clipping had bugs in 2.7.7 with gradient fills.   he released a patch 
on windows, but never compiled it for linux.
Andreas:
11-Oct-2010
(Or something like that. Haven't looked at it for a while.)
ddharing:
11-Oct-2010
Carl seemed interested earlier this year in promoting OpenBSD even 
though FreeBSD seems to have a better web presence. When I was looking 
it over, it appears that OpenBSD does not have binary compatibility 
with FreeBSD or NetBSD. The latter two do seem to have binary compatibility.
Andreas:
12-Oct-2010
Gabriele, do you have a simple test case to reproduce that crash?
Anton:
12-Oct-2010
When Gabriele mentioned it first a while back, I was able to reproduce 
the crashing.
Gabriele:
13-Oct-2010
REBOL/View 2.7.7.4.2 6-Jan-2010
Copyright 2000-2010 REBOL Technologies.  All rights reserved.
REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM


Type desktop to start the Viewtop.
>> view layout [box effect [draw [pen black line 10x10 20x20]]]
Segmentation fault
james_nak:
13-Oct-2010
In my quest to transform an object with nested objects back into 
an xml file I am running into an invalid path issue. Where obj is 
the object with other nested objects and p: person, first obj/:p 
works fine. However though obj/person/name  exists, I can't figure 
out how to store the path /person/name into p.

A couple of years ago Robert and Chris had a discussion about this. 
Anyone know if this can be done or not.? Thanks.
james_nak:
13-Oct-2010
Well, I'm still getting the same error but after all of this I decided 
to go about it a different way. Thanks though.
Maxim:
13-Oct-2010
(you have a root / ... paths do not start with a slash  !)
Steeve:
13-Oct-2010
James, about your object-to-xml need. The best way to express it 
when you speak to other programmers is to give them a concrete use 
case.
1/ mold the input
2/ mold the expected output.

Then, one can figure a solution without the need to decipher your 
patter ;-)
james_nak:
13-Oct-2010
Oldes, originally I was going to build a function that took the output 
of xml-to-object.r and change it back to xml. For that I was creating 
paths to the objects but couldn't get past the path being more than 
one level issue. 

As I mentioned, there was some discussion a few years back and there 
was mention that what worked in Core did not in View so rather than 
start something there, I thought it best to do that here.
I'm good now with my new approach.
james_nak:
21-Oct-2010
I just heard that one of my encapped view apps was "disappearing" 
when the client performed a particular function which used to work 
and which works on other computers at her company. What would you 
suggest is the best way to figure out what is happening?
Maxim:
21-Oct-2010
disappearing is a bit vague...   the only thing that I can think 
of is that in Vista and 7 you need to follow the "program files" 
guidelines.

so ask if they are all using the same OS.
Maxim:
21-Oct-2010
henrik, that is a good guess.
Henrik:
21-Oct-2010
Maxim, I guessed, because we had a few stack size problems a couple 
of days ago with R3 builds.
amacleod:
27-Oct-2010
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?
Maxim:
28-Oct-2010
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.
Anton:
31-Oct-2010
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
== "[]"
Oldes:
1-Nov-2010
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.
Maxim:
2-Nov-2010
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
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
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
Max, a task for you :) http://www.the8pen.com/index.html
Maxim:
2-Nov-2010
yes, but with patent pending, it means we can't actually do it unless 
we get a license from them.
Maxim:
2-Nov-2010
of course it is. if some can patent double clicking on a portable 
device icon.. this most assuredly yes.
Maxim:
2-Nov-2010
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
I doubt it .. gestures for letters have been around for a long time
Maxim:
2-Nov-2010
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
if you draw a semblance of a g and it turns it into a g .. what's 
new about that?
Maxim:
2-Nov-2010
you don't draw a semblence of a G... you start up and turn left or 
right from 90 to 360 degres.
GrahamC:
2-Nov-2010
looks like a shorthand g to me
Maxim:
2-Nov-2010
yep.. but patent reviewers actually do not really research these 
things for more than one hour... so unless someone challenges it, 
and the claims are different than other alternate  character entry 
solutions, then they probably have an almost certainty in getting 
it.  it will be very easy to defend also, because its SO simple and 
doesn't rely on math algorythm just a dirt simple idea which I have 
never seen before.


this being said, its possible that the idea itself isn't new within 
this research field, but I've never seen this in a commercial form 
before.
Henrik:
3-Nov-2010
Did they perform the staircase test? Can it be used while walking 
up and down a flight of stairs?


Looks ok, but they made one mistake in assigning space to letting 
go of the gesture area at the center. That's too specific for a bumbling 
train ride, or where you can only pay partial attention to your device. 
Also, blind-typing and locating the center spot probably won't work. 
It's once again, not just the size of hands that are the problem, 
but the much more varied environment, in which you are operating 
your device.
GrahamC:
3-Nov-2010
You could glue a pimple on the screen
AdrianS:
3-Nov-2010
I watched the video and I'm not too impressed. Something like swype 
seems to work a lot faster. With that you define a whole word in 
one continuous stroke
Izkata:
3-Nov-2010
But I've also had issues with Swype whenever I tried to use a word 
not in its dictionary.  Using SwiftKey for now, but 8pen is something 
I'm considering trying.
Maxim:
3-Nov-2010
henrik, try typing on a (small) touchscreen when shacking, its even 
worse, this device doesn't need to be precise, which is the point.


now one thing they don't mention is that our brain has an internal 
"rest position" hard-wired, and that is where the center dot is very 
well tought.  whenever you move any part of you body, the moment 
you stop thinking about it, it goes back to its rest position by 
itself.  this is very obvious when you swipe you mouse quickly, you 
hand will go back to its original position by reflex.


so using this in a shacky environment, where I can squeeze the device 
in my hand will, IMHO, be much easier to use quickly.  its obvious 
it takes a little bit of time for your brain to associate the letters 
to direction and rotation amount, but since doing the next letter 
is just a question of going back to the rest position, I feel its 
very fast and easy to get used to.
Gabriele:
4-Nov-2010
the real question (which I posted on FB as well, but in italian as 
I was commenting a friend's link), is whether there is any proof 
that this is "better" than swype
Gabriele:
4-Nov-2010
it's a bit like dvorak - as much as i like it, use it, and prefer 
it to qwerty, there is no actual independent study that proves that 
it is "better"
Maxim:
4-Nov-2010
well, swype does require you to "aim" the letters... 8pen could be 
used by a blind person within a short time.
Gabriele:
4-Nov-2010
you're now making it special purpose.


don't forget that a lot of people already know the qwerty layout 
so "aiming" the letters is pretty natural. then there was also that 
other input method where it could figure out what you type even without 
a keyboard on screen (forgot the name)
Cyphre:
4-Nov-2010
Maxim, re SCALE that is a known issue in R2 DRAW. Not sure when(if) 
will be fixed...use R3 ;)
amacleod:
20-Nov-2010
I'm getting some strange giberish characters when I clear a drop-down 
by filing it with "". Is there a better way to do it?
Gregg:
22-Nov-2010
Sometimes, not sure with dropdown data, you need to update the line-list 
facet as well. A few styles force you to work with their internals 
this way, when doing more than simple UIs.
ddharing:
7-Dec-2010
I'm having trouble changing the scroller size (i.e. width) for the 
text-list style. Changing the font size was easy enough. I'm trying 
to make it bigger to accommdate fat fingers on a touch screen display. 
Has anyone done this before? Thanks.
Anton:
7-Dec-2010
It depends on if you need the original text-list style unmodified 
alongside your patched version. If you intend merging in other code, 
then it's better to derive a new style. If not, then it doesn't matter.
GrahamC:
25-Dec-2010
When writing a spreadsheet/grid, is it better to give each cell a 
name, or work out the location based on  a grid reference?
Robert:
26-Dec-2010
Both make sense. We use a name generator on our RebGUI grid implementation, 
the nice thing about this is, that it's position independent. If 
the column order etc. changes, the names stay the same.
Gregg:
27-Dec-2010
If you expect to support large, dense, spreadsheets, you may want 
to minimize storage by having a name mapping interface. If the target 
is small/medium/sparse sheets, having the name explicit for each 
cell may be practical. In any case, having a alias system would be 
nice, for named cells and ranges.
GrahamC:
18-Jan-2011
Is there a way to set focus on a field and then send some characters 
into the keyboard buffer or something to simulate key strokes?
GrahamC:
18-Jan-2011
it's a RebGUi issue
GrahamC:
18-Jan-2011
there's a bug in my widget and i have to stuff one character in it, 
delete it and then insert the characters I want
GrahamC:
18-Jan-2011
I don't think you can insert a del
Maxim:
18-Jan-2011
though you can call a face's feel if you want.
GrahamC:
18-Jan-2011
is there a windows key stroke recorder?
41301 / 6460812345...412413[414] 415416...643644645646647