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

World: r3wp

[View] discuss view related issues

Anton
3-Oct-2008
[8141x2]
Minor update to ARROW360 style:

- Now it's smoother (more is calculated with decimal! instead of 
pair!)
(also updated the demo file).
load-thru/update http://anton.wildit.net.au/rebol/gui/arrow360.r

do-thru/update http://anton.wildit.net.au/rebol/gui/demo-arrow360.r
Pekr
3-Oct-2008
[8143]
there is one small "bug". When you move arrow close enough to the 
top or to the left window border, underlying content moves some 1-2 
pixels?
Izkata
3-Oct-2008
[8144]
Bleh, I used to know this...  I can't seem to get 'draw to work with 
text - is there something wrong with this?

view layout [box 200x100 effect [draw [pen black text 10x10 {Testing}]]]
Graham
3-Oct-2008
[8145x4]
Linux?
and 10x10 is very small
works on windows for me
http://www.compkarori.com/vanilla/display/AGG
Izkata
3-Oct-2008
[8149x3]
yeah, on linux..  /view version 2.7.5
10x10 should be the offset
Ah, thanks - that font thing makes it work
Anton
4-Oct-2008
[8152x5]
Pekr, yes. That is a View rendering bug, not a bug of arrow360 in 
particular.
Two pixels:
It can be seen with just:
view layout [text "Will be moved up 2 pixels" pad 28x-50 box effect 
[merge luma -20]]
A quite old bug, if I remember correctly.
Henrik
4-Oct-2008
[8157x2]
Text is only moved up one pixel here.
Is it in RAMBO?
Anton
4-Oct-2008
[8159x2]
Probably the same root as this bug report.
http://www.rebol.net/cgi-bin/rambo.r?id=4269&
Henrik
12-Oct-2008
[8161]
I'm toying around with a VID dialect for postscript. I've done that 
by copying the VID source for LAYOUT, STYLIZE and all related functions 
in the SYSTEM/VIEW/VID. So far so good, but now I want to implement 
styles, so I can write some layouts and am wondering what the formal 
way would be to add the very first style in what is equivalent to 
SYSTEM/VIEW/VID/VID-STYLES ?
Anton
13-Oct-2008
[8162x2]
Hmm.. interesting. Do you have a base object (eg. similar to svv/vid-face 
?)
Not familiar with postscript, I am wondering why you couldn't just 
make a function "to-postscript" that accepts a face argument (similar 
to to-image), instead of reimplementing all of VID.
Henrik
13-Oct-2008
[8164x3]
yes, I have a base face similar to vid-face. I even added it to the 
style list manually to see if that would work, but it doesn't.
Anton, good idea.
Anton, thanks. Now it's moving forward. Got some primitive face renderings 
in postscript now.
Anton
13-Oct-2008
[8167]
I suppose you would be cloning face/color, face/text, face/edge rendering 
(whatever you need first) at a simple level, and gradually improving 
it towards perfection afterwards.
Henrik
13-Oct-2008
[8168x3]
My biggest problem right now is the coordinate system, vertical positioning 
of text and text wrapping. The rest is almost in place.
http://rebol.hmkdesign.dk/files/vid-postscript.png<--- so far so 
good :-)
(I wish I had thought of this sooner!)
Anton
13-Oct-2008
[8171]
That looks like fun, Henrik.
Henrik
13-Oct-2008
[8172]
I've already fixed top/middle/bottom alignment. Text is placed a 
couple of mm too far to the right.
Anton
13-Oct-2008
[8173]
I suppose you don't know how to do the equivalent of SIZE-TEXT in 
postscript yet.
Henrik
13-Oct-2008
[8174]
Actually I rely fully on VID's coordinate system. SIZE-TEXT in PS 
is apparently only possible on the width of the text, not the height, 
which is why just I use VID instead. It seems to work fine, if we 
can live with integer positioning.
Anton
13-Oct-2008
[8175]
Mmm. The font rendering looks nicer.
Henrik
13-Oct-2008
[8176]
text wrapping is a different problem...
Anton
13-Oct-2008
[8177]
Ah yes, I see.
Henrik
13-Oct-2008
[8178]
Remembering from amacleod's multi-highlight problem, detecting where 
wraps are in a text box might be buried in some natives that we can't 
get to.
Anton
13-Oct-2008
[8179x2]
I solved that in caret-to-offset-patch.r

It behaves very very close to native (except efficiency), so should 
be usable for this situation.
http://anton.wildit.net.au/rebol/patch/caret-to-offset-patch.r
Henrik
13-Oct-2008
[8181]
thanks, I'll have a look
Anton
13-Oct-2008
[8182x2]
and the test file to do is test-caret-to-offset-patch.r
If you want to save yourself literally days of reverse engineering...
Henrik
13-Oct-2008
[8184]
so you essentially rebuild caret-to-offset as a mezzanine?
Anton
13-Oct-2008
[8185]
Yep, and offset-to-caret, too.
Henrik
13-Oct-2008
[8186]
Too deep for me to solve that tonight. However I've come this far:

http://rebol.hmkdesign.dk/files/vid-postscript2.png
Graham
13-Oct-2008
[8187]
if you track the font size, then you have the vertical size of the 
text.
Anton
14-Oct-2008
[8188x2]
Improving... How fast can it render the postscript ? Can you make 
it dynamic update ?
Graham, the relationship between font/size and lineheight is not 
so simple, unfortunately.
Graham
14-Oct-2008
[8190]
in postscript ...