Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: write a text in vertical way ?

From: oliva:david:seznam:cz at: 10-Apr-2002 21:03

Hello Stéphane, Wednesday, April 10, 2002, 10:43:37 AM, you wrote: SD> Hello, SD> I would like to know if it's possible to write a text SD> in vertical way. SD> What I want to do is to write a text for each value of SD> a table, but the text is too large. See the example of SD> what I want to do below. SD> I also don't understant why I can't change the SD> font-size option of the text in this draw fonction. SD> Thanks in advance for your help. SD> Stéphane SD> REBOL [] SD> statistiques: layout/size [ SD> tableau: box 550x500 coal effect [ draw [] ] SD> appel: button "Appel" [ SD> clear tableau/effect/draw SD> for i 1 40 1 [ SD> j: i * 10 SD> k: i * 10 + 10 SD> emp1: to-pair reduce [j random 470] SD> emp2: to-pair reduce [k 470] SD> append tableau/effect/draw reduce [ SD> 'fill-pen 'blue SD> 'box emp1 emp2 'white SD> 'text emp2 "text" SD> ;This don't work -> SD> 'text emp2 'font-size 5 "text" SD> ] SD> ] SD> show tableau SD> ] SD> ] 600x600 SD> inform statistiques This is not solution for your problem (i'm not a draw guru), but you should rather use 'compose instead of 'reduce: compose [ fill-pen blue box (emp1) (emp2) white text (emp2) "text" text (emp2) font-size 5 "text" ] It's a little bit faster bacause it evaluates only parens...
>> t1: now/time/precise loop 5000000 [reduce ['number random 100]] t2: now/time/precise t2 - t1
== 0:00:12.959
>> t1: now/time/precise loop 5000000 [compose [number (random 100)]] t2: now/time/precise t2 - t1
== 0:00:12.067