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

World: r3wp

[View] discuss view related issues

shadwolf
12-Jul-2005
[1870x4]
what I would like is a cardinal roze of the wind with a dynamical 
arrow that symbolise the wind direction according to the data comming 
from the weather station in the airports
I need to symbolise 8 directions N, NE , E, SE, S, SO, O, NO,
so up, up-right, right, down-right,  down, down-left, left, left-up
this are the direction where the dynamic arrow can be displayed
Anton
12-Jul-2005
[1874]
So, every 45 degres ?
shadwolf
12-Jul-2005
[1875x2]
My point is O I make 8 images and show the  right one according to 
the datas
yes ,)
Anton
12-Jul-2005
[1877]
What if there is no wind ?
shadwolf
12-Jul-2005
[1878]
or I make one image and I make a dynamic arrow using draw effects
Anton
12-Jul-2005
[1879]
Il ne souffle.
shadwolf
12-Jul-2005
[1880]
there is always wind  ;)
Anton
12-Jul-2005
[1881]
Every 45 degrees can be programmed by setting  rotate-knob-face/divisions: 
45
shadwolf
12-Jul-2005
[1882]
even if the wind speed is not enought significant
Anton
12-Jul-2005
[1883]
:)
shadwolf
12-Jul-2005
[1884]
for example today  on paris we have wind from north  N (360) speed 
12 KT.
Anton
12-Jul-2005
[1885]
OK, wind speed is shown by another widget.
shadwolf
12-Jul-2005
[1886]
in all cases your code is a good example  and a usefull working pass 
for me
Anton
12-Jul-2005
[1887]
Umm, I would need to add the ability to place multiple texts (N, 
NE, E ...) at any position in the face (I will use draw dialect).
shadwolf
12-Jul-2005
[1888]
Actually in the fairebo's dashboard  I only symbolise weather and 
temperature and for complete weather description we have to report 
to the text report (witch translate the METAR/TAF informations)
Anton
12-Jul-2005
[1889]
I am sure this demo will be useful to you.
shadwolf
12-Jul-2005
[1890x3]
What I want to symbolise is the wind speed and direction and the 
humidity
this will brings me 4 dynamic images built according to METAR/TAF 
informations ;)
My idea was to make a images that symbolise the cardinal direction 
(rose of the wind) and using draw effect over draw information like 
arrow or text :)
Anton
12-Jul-2005
[1893x2]
Well, adding the image is simple. Adding the text should be fairly 
quick too.
Kru, yep, definitely like your style Kru. Just skimming your codes, 
nice and clean. Your multiple colours handling looks smart, too. 
Something I haven't implemented so fully and nicely.
Rebolek
12-Jul-2005
[1895x2]
Anton your knobs are nice too, more posibilities than in my design
Anton if you want, use my code - this is probably enough for my purpose 
so I'm going to focus on other elements (now I've got sample window 
in my mind). BTW design of the knobs is inspired by Roland SH1000 
:)
Gregg
12-Jul-2005
[1897]
Kru and Anton. Both excellent demos! Should we add a folder on Viewtop 
for custom styles?
Rebolek
12-Jul-2005
[1898]
Probably yes. There are some good styles around there but it might 
be hard to find them
DideC
12-Jul-2005
[1899x2]
Draw style constest ?
Can I play too ?
:-)
do http://membres.lycos.fr/didec/rebol/stick-style.r
Rebolek
12-Jul-2005
[1901]
DiceC that's really nice! I really like it. Did you tried it with 
non-fixed positions of the stick?
DideC
12-Jul-2005
[1902]
Yep, but :
- Not easy to set value by mouse (as said before).

- Effect (fill-pen) is not "mathematicaly" link to stick angle (don't 
find a formula), so hard to do for any value.
shadwolf
12-Jul-2005
[1903x9]
très joli !! (very nice )
there is a tiny bug in your algo didec
drag the stick at what ever position stay with the mouse button down 
and you will see the pair position text to be increment every seconds
Kru nice job why not to include this kind of mad widgets to rebgui 
?
mad but beauty full and original way to symbolise things like meters 
etc
can be used for example to symbolise network in/outgoing trafic :)
can ease t
some configuration range too instead of having a silder and a progress 
bar
I like the 3 kind of widgets both of you shows ;)
Rebolek
13-Jul-2005
[1912]
shadwolf why not, what's the difference between VID and REBGui widget?
DideC
13-Jul-2005
[1913]
It's not a bug but an intented behavior : it's a pair input style. 
There is for steps, each step can add any value to the pair. The 
repeat speed is also a parameter.
ie:

 stick-style speed 8 steps [1 2 5 10] ==> 8 is the repeat speed (rate) 
 and 1, 2, 5 and 10 are the values added to the pair!, depending how 
 you move the stick.


 stick-style value-mode decimal! ==> value is a block of 2 decimal! 
 values rather than a pair!
Anton
13-Jul-2005
[1914x6]
Nice Dide. :)
I have been looking at  feel/redraw  in more detail for the last 
couple of days.
And feel/redraw is a nice place to detect changes to the face, eg. 
when face/data changes, you can update the visual state of the face.
You can also do face/action when face/data changes. However, I found 
that it is *not* a good place to use TO-IMAGE (which might be in 
the face/action), because the latest image of the face has not been 
rendered yet.  Redraw's 'draw action occurs just *before* the face 
is rendered. So to get a chance to make a snapshot of the face using 
TO-IMAGE, I propose a  new redraw action, 'view, be sent after the 
face has fully rendered, allowing TO-IMAGE to be used at the right 
time.
Here is a demo showing the problem:
view layout [
	pic: image
	b: box 100x100 sky with [data: 1] effect [draw []] feel [
		redraw: func [face action position][
			?? action
			if action = 'draw [
				insert clear face/effect/draw compose [
					fill-pen navy
					box 10x0 (as-pair 30 face/size/y * face/data * 0.01)
				]
				pic/image: to-image face
				;show pic ; causes a stack overflow
			]
		]
	]

 btn "change" [print "change" b/text: form b/data: random 100 show 
 b show pic]
]