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

World: r4wp

[Rebol School] REBOL School

Endo
11-Dec-2012
[1569]
It's not written in any where in the REBOL documents. Even in Core 
PDF.
GrahamC
11-Dec-2012
[1570x3]
from my page "NB: Rebol2's existing prot-http currently supports 
this undocumented method using a 'header keyword"  :)
I think Gabriele mentioned this many years ago on the mailing list
That's why it is so frustrating having static documents .. that only 
one person can change. Wiki is better.
Endo
11-Dec-2012
[1573]
That's right. I read your page now. Thanks a lot, it will save my 
day.
Maxim
11-Dec-2012
[1574]
Endo,  a lot of stuff in rebol is learned by scanning the source 
code... and probing or using help on system and its members.


you can probe all the port handlers to see how they work, I still 
do this all the time... most of the very skilled Rebolers know , 
above all else, how to browse the rebol source included in the interpreter 
itself.
Endo
12-Dec-2012
[1575]
Finally I got it work with Salesforce, when I complete my work, I'll 
write a document for it, so I can save someone's hours.
Maxim
12-Dec-2012
[1576]
thanks, I might need to connect to salesforce myself in a few weeks. 
 :-)
GrahamC
12-Dec-2012
[1577]
Good idea .. share the knowledge
Geomol
20-Dec-2012
[1578x8]
I was asked for examples of the DRAW, I used to create the graphi
graphi
graphics in GCam.

The start of a button is:
img: make image! 88x88
img/alpha: 255

draw img [
	pen none
	fill-pen linear 0x0 0.0 88.0 90.0 1.0 1.0
		0.0.0 16.16.16 32.32.32
	box 0x0 88x88 14.0

	fill-pen linear 5x5 0.0 78.0 90.0 1.0 1.0
		102.102.102 10.10.10 10.10.10 10.10.10 0.0.0
	box 5x5 83x83 14.0
]

view layout [
	image img
]
The exposure symbol can be added with:
exposure: [
	translate -0.5 -0.5
	pen none
	fill-pen radial 44x44 0.0 44.0 0.0 1.0 1.0
		255.255.255
		249.249.249
		224.224.224 224.224.224
]
loop 8 [
	append exposure [
		shape [
			move 37x25
			curv 52x22 62x25
			curv 57x16 48x17
		]
		translate 44.5 44.5
		rotate 45.0
		translate -44.5 -44.5
	]
]
draw img exposure
It's the small detail, that makes it look prof. Next would be adding 
some blur maybe.
I'm not a graphical artist, and I have never used applications like 
Adobe Illustrator or similar. But I found, I can create ok graphics 
by programming it in e.g. DRAW and be very careful with the details. 
I do use GIMP for some tasks.
Kaj
20-Dec-2012
[1586]
Cool, an eye opener that it can be so short
Cyphre
20-Dec-2012
[1587]
Nice stuff Geomol...Most people doesn't even know what could be done 
with DRAW. DRAW has most of the capabilities advanced  vector(SVG) 
editors have under the hood. For R3 DRAW we need to make sure converting 
any complex SVG art is possible to render.
Henrik
20-Dec-2012
[1588]
There are still a few last bits in DRAW that are missing. I wonder 
if these are possible to add now? Something like making a gradient 
on a line would be very useful.
Gregg
20-Dec-2012
[1589]
That's wonderful John.
Endo
20-Dec-2012
[1590]
That is great Geomol, thank you for sharing it.
Cyphre
20-Dec-2012
[1591]
Henrik, I don't know how hard is to add gradient on line but you 
can 'emulate' it using textures. See this R2 example:


g: draw 100x10 [pen none fill-pen linear 0x0 0 100 0 1 1 red green 
blue yellow box 0x0 100x10]

view layout [origin 0 box 300x300 black effect [draw [pen g spline 
0x0 100x100 200x30 300x300 16]]]
Henrik
20-Dec-2012
[1592]
Cyphre, aha, thanks.
Kaj
20-Dec-2012
[1593]
The g: draw line segfaults on 2.7.7
Cyphre
20-Dec-2012
[1594]
works fine on 2.7.8 ( IIRC that was fixed)
Kaj
20-Dec-2012
[1595]
Hm, so does John's example
Cyphre
20-Dec-2012
[1596]
Hmm, I tried here on  REBOL/View 2.7.7.3.1 28-Feb-2010 and it works 
without any crash as well.
Kaj
20-Dec-2012
[1597]
I'm using the Linux version, 4.2
Bo
20-Dec-2012
[1598]
Geomol, thanks for the tutorial.  That was great.

Here's a logo I produced entirely using Rebol draw:

http://respectech.com/respectech.jpg
Henrik
20-Dec-2012
[1599]
That's pretty good, Bo.
Bo
20-Dec-2012
[1600x2]
Now that I think of it, I used VID with some parts done in Draw.
But it was all done in a 'layout block. :-)
Geomol
21-Dec-2012
[1602]
Looks good! DRAW is a strong tool.
Gabriele
21-Dec-2012
[1603]
Kaj, I think I remember the draw crash being a linux bug (or at least 
a non-windows one).
MaxV
21-Dec-2012
[1604]
No, it's false. DRAW works well, the only problem are fonts dispalyed 
on Linux, but there aret ricks to skip them.
Geomol
21-Dec-2012
[1605x2]
Another example is the home button on iPhone 5:
sz: 200x400
img: make image! sz
img/alpha: 255

draw img compose [
	pen none
	fill-pen linear (as-pair 0 sz/y / 2) -50.5 70.5 90.0 1.0 1.0
			45.45.47 9.9.11 108.113.117
	circle (as-pair sz/x - 115 sz/y / 2) 70.5
	fill-pen 1.0.5
	circle (as-pair sz/x - 115 sz/y / 2) 68.5

	reset-matrix

 fill-pen linear (as-pair sz/x - 115 sz/y / 2) -60.5 30.5 45.0 1.0 
 1.0
			161.164.169 161.164.169 89.94.100

 box (as-pair sz/x - 115 - 26 sz/y / 2 - 26) (as-pair sz/x - 115 + 
 26 sz/y / 2 + 26) 10.0
	fill-pen 1.0.5

 box (as-pair sz/x - 115 - 22 sz/y / 2 - 22) (as-pair sz/x - 115 + 
 22 sz/y / 2 + 22) 6.0

	reset-matrix

 fill-pen linear (as-pair 0 sz/y / 2 - 26) -50.5 100.5 90.0 1.0 1.0
			1.0.5.255 200.214.226.224 200.214.226.128
	shape [
		move 154x200
		arc 16x200 68.0 68.0
		arc 154x200 -149.0 68.0
	]
]

view layout [
	backdrop 1.0.5
	image img
]
Pekr
21-Dec-2012
[1607x2]
that's cool!
MaxV could post those examples on the blog :-)
Steeve
21-Dec-2012
[1609]
I don't rememeber who did the neon effect, but here it is.

font-C: make face/font [style: [ bold ] size: 64]
neon: "REBOL BAR"
coord: 30x15
inc: 0.25.25
draw-block: compose [
	line-join round font font-c

 pen (inc * 1 + 255.0.0.230) line-width 11 text vectorial coord neon

 pen (inc * 2 + 255.0.0.205) line-width 9 text vectorial coord neon

 pen (inc * 3 + 255.0.0.180) line-width 8 text vectorial coord neon

 pen (inc * 4 + 255.0.0.155) line-width 7 text vectorial coord neon

 pen (inc * 5 + 255.0.0.130) line-width 6 text vectorial coord neon

 pen (inc * 6 + 255.0.0.105) line-width 5 text vectorial coord neon

 pen (inc * 7 + 255.0.0.80) line-width 4 text vectorial coord neon

 pen (inc * 8 + 255.0.0.55) line-width 3 text vectorial coord neon

 pen (inc * 9 + 255.0.0.30) line-width 2 text vectorial coord neon

 pen (inc * 10 + 255.0.0.5) line-width 1 text vectorial coord neon
]

view/title layout [ box black 450x200 effect [ draw draw-block ] 
] "NEON"
Endo
21-Dec-2012
[1610]
Thank's Geomol, Steeve, these are very good examples of DRAW.
Bo
21-Dec-2012
[1611]
Great examples!
Arnold
21-Dec-2012
[1612]
Steeve, I copied and pasted this on the Mac, but I only see a black 
box in a grey window with title "NEON"
Steeve
21-Dec-2012
[1613]
Vectorial texts only works on Windows IIRC
Arnold
21-Dec-2012
[1614]
ok that explains!
Gabriele
22-Dec-2012
[1615]
MaxV, it works well in the current version.
MaxV
24-Dec-2012
[1616x2]
Done with linux, see: http://rebol2.blogspot.it/2012/12/rebol-draw-on-linux.html
both examples!
Kaj
24-Dec-2012
[1618]
Which REBOL version?