World: r3wp
[View] discuss view related issues
older newer | first last |
Henrik 14-Oct-2008 [8234] | yes, you can create 10000x10000 layouts if you want to, they just won't fit on the paper without scaling them down. I did something similar once in a different system, but it proved to be unusably slow on smaller PCs and it eats memory. |
Graham 14-Oct-2008 [8235] | yes |
Henrik 14-Oct-2008 [8236] | I may add scaling, if it makes sense |
Graham 14-Oct-2008 [8237] | So, will this work images etc? |
Henrik 14-Oct-2008 [8238x3] | image support depends on if postscript.r will get support for image!. currently it seems only to support direct loading of jpg, gif and bmp images. |
image! support is necessary if we want to output the face/image and face/effect parts of a face | |
scaling now added. use to-postscript/scale my-layout 0.1 to increase precision by 10 times. this means you must create your layout 10 times bigger. | |
Graham 14-Oct-2008 [8241x2] | so what elements can you support now? |
text and ? | |
Henrik 14-Oct-2008 [8243] | text and boxes |
Graham 14-Oct-2008 [8244] | ok |
Henrik 14-Oct-2008 [8245x2] | DRAW is probably too hard to get in. I don't personally need it. |
perhaps we should move this to the postscript group | |
Anton 14-Oct-2008 [8247x2] | Can you put bitmaps in a postscript file ? |
(moved to Postscript group) | |
PeterWood 30-Oct-2008 [8249] | I've come across what seems to be an oddity with View on the Mac.Iit seems that the Rebol/View console is using UTF-8 encoding but that View is using MacRoman. |
Gabriele 31-Oct-2008 [8250] | the "console" on Mac and Linux is just a terminal (OS provided), and they are usually UTF-8. That has nothing to do with View. |
Robert 1-Nov-2008 [8251] | How can I return something when using DISPLAY/DIALOG when the dialog is closed? Something like: result: display/dialog [...] Or is this only possible via a wrapper function? |
Graham 1-Nov-2008 [8252x2] | Sounds like Rebgui |
display returns the layout ... | |
btiffin 1-Nov-2008 [8254] | Or maybe catch [display/dialog "test" [button "button" [hide-popup]] throw "result"] which is equivalent to a wrapper function I guess |
Gabriele 2-Nov-2008 [8255] | btiffin, why would you need the catch and throw there? |
Robert 2-Nov-2008 [8256] | I solved it now by writing a function that collects and returns the result. And this function contains the DIALOG stuff. |
btiffin 2-Nov-2008 [8257] | Sorry, this was an attempt to get round the none returned when the sysclose is used ... did I go overboard? could be |
Gabriele 3-Nov-2008 [8258] | what i meant was, why not just do [ display ... "result"] ? |
btiffin 3-Nov-2008 [8259] | Yep. Pull head out; breathe. ;) |
Henrik 4-Nov-2008 [8260] | Does anyone know how to adjust the saturation of a single RGB value? |
Gregg 4-Nov-2008 [8261] | Chris Ross-Gill might know. He's done a number of color adjustment bits. |
Henrik 4-Nov-2008 [8262] | It's interesting that I can find tens of places with getting the saturation of an RGB value, but not the other way around. I must be asking the wrong question. |
Pekr 4-Nov-2008 [8263] | Henrik - the only thing I do remember from View 1.3 dev times is addition of rgb-to-hsv and hasv-to-rgb functions..... |
Henrik 4-Nov-2008 [8264x2] | yes. They appear not to be present in R3. |
(which is kind of fortunate, because I spent the whole day building them :-)) | |
Pekr 4-Nov-2008 [8266] | IIRC, there was first a source version from Chris, then it was added as a native ... |
Chris 4-Nov-2008 [8267x3] | http://www.ross-gill.com/r/hsv-lab.r |
It's not exactly equivalent, rgb-hsv returns a block. It's also a little slower... [hue [integer!] saturation [decimal!] brightness [decimal!] alpha [decimal!]] | |
Hmm, also in the library: http://www.rebol.org/view-script.r?script=hsv-lab.r | |
amacleod 4-Nov-2008 [8270x4] | Is there a way to get an index # from a text list selection? |
text-list | |
face/text gives the string but can I get its position i the list? | |
actually its face/picked gives teh string.. | |
Chris 5-Nov-2008 [8274] | index? find face/data face/picked |
DideC 5-Nov-2008 [8275] | text-list in R2 has this problem cause it works on text value, not index. So it can't handle the same text value several times. VID 3.4 actually return the index AFAIK. |
amacleod 5-Nov-2008 [8276] | Thaks Chris, I thought there might be an internal method but as DIdC suggests there is not/ |
Geomol 5-Nov-2008 [8277] | Henrik, the hsv2rgb function, I made for Canvas RPaint. It takes H S V values as decimals in the area 0.0 - 1.0 as input: hsv2rgb: func [ H S V /local RGB var_h var_i var_1 var_2 var_3 var_r var_g var_b ][ RGB: 0.0.0 either S = 0 ;HSV values: 0 Ö 1 [ RGB/1: to-integer V * 255 RGB/2: to-integer V * 255 RGB/3: to-integer V * 255 ][ var_h: H * 6 if var_h >= 6 [var_h: 0] ;H must be < 1 var_i: to-integer var_h var_1: V * (1 - S) var_2: V * (1 - (S * (var_h - var_i))) var_3: V * (1 - (S * (1 - (var_h - var_i)))) switch var_i [ 0 [var_r: V var_g: var_3 var_b: var_1] 1 [var_r: var_2 var_g: V var_b: var_1] 2 [var_r: var_1 var_g: V var_b: var_3] 3 [var_r: var_1 var_g: var_2 var_b: V ] 4 [var_r: var_3 var_g: var_1 var_b: V ] 5 [var_r: V var_g: var_1 var_b: var_2] ] RGB/1: to-integer var_r * 255 ;RGB results: 0 Ö 255 RGB/2: to-integer var_g * 255 RGB/3: to-integer var_b * 255 ] RGB ] |
Henrik 5-Nov-2008 [8278] | Geomol, thanks |
Geomol 5-Nov-2008 [8279] | Let me know, if you need the rgb2hsv as well. |
Henrik 5-Nov-2008 [8280x2] | I'll be ok, I think. Right now I'm trying to find a bug in an hsl-to-rgb function. |
and now fixed :-) | |
amacleod 10-Nov-2008 [8282x2] | Is there a way to have an area style that auto adjusts the height given a specific width so an entire paragraph will fit in the area. I know text style does this but I need to retain formatting. |
I played with the sizing- 100x-1 etc. but it does not seem to work like 'btn style does. | |
older newer | first last |