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

World: r3wp

[!REBOL3-OLD1]

ICarii
27-Mar-2009
[12339x2]
much
you have to use alternative methods like colour testing for non-regular 
shapes
Graham
27-Mar-2009
[12341x2]
well, what can you do with quad core cpus ??
I've watched those multitouch demos ... seem to use irregular shapes
ICarii
27-Mar-2009
[12343x2]
ill dig out my radial menu thingy and update it for r3 and test it 
for speed.. have a old version at http://rebol.mustard.co.nz/readial.tar.gz
http://rebol.mustard.co.nz/radial.tar.gz.. oops
Graham
27-Mar-2009
[12345]
Ok, that is cute
ICarii
27-Mar-2009
[12346]
meh - ive done it in assembly before - its rather sad in rebol :(
Graham
27-Mar-2009
[12347]
though I suspect it's not working ... I only see shapes and no text
ICarii
27-Mar-2009
[12348]
its 2003 - back before the text in agg changed
Graham
27-Mar-2009
[12349x2]
ahh...
I'm surprised you were able to find it so quickly!
ICarii
27-Mar-2009
[12351]
i downloaded my website today to look for some old sudoku code :P
Graham
27-Mar-2009
[12352]
Silverlight is starting to use radial menus too
Chris
27-Mar-2009
[12353]
My Daylight Map used color to detect irregularly shaped hit spots...
ICarii
27-Mar-2009
[12354]
yeah colour testing is fast and maps nicely to functions
Graham
27-Mar-2009
[12355]
Are you still working on your own graphics system for R3?
Chris
27-Mar-2009
[12356]
http://ross-gill.com/r/daylight/map.jpg
http://ross-gill.com/r/daylight/map-zones.png
ICarii
27-Mar-2009
[12357]
im waiting for Carl/Cypher to fix some of the view holes.. and also 
for modules and timers and threads :P
Graham
27-Mar-2009
[12358]
:(
ICarii
27-Mar-2009
[12359]
view is currently swiss cheese and the underlying Core has some large 
gaps that really need addressing before GUI sees the light of day.. 
IMHO..
Graham
27-Mar-2009
[12360]
the presence of holes suggests some underlying substance
ICarii
27-Mar-2009
[12361x2]
the thing that gets frustrating is when something works fine in earlier 
builds then mysteriously dies in later builds :P
thats a great colour example CHris :)
Chris
27-Mar-2009
[12363]
Pretty, is it not?  : )
ICarii
27-Mar-2009
[12364]
its one example where the benefits of colour testing over poly testing 
are clear to see.
Chris
27-Mar-2009
[12365]
Doesn't scale well though...
ICarii
27-Mar-2009
[12366]
of course.. zooming and SVG night be another method :)
Chris
27-Mar-2009
[12367]
With AA turned off...
ICarii
27-Mar-2009
[12368]
with AA on you can do approximation mapping with tolerances
Chris
27-Mar-2009
[12369]
Sounds like it could get complex - it certainly is a useful pattern 
for many situations, especially when you can use graphics programs 
to develop the maps.
Pekr
27-Mar-2009
[12370x3]
Hmm, isn't jus alpha transparency enough? Why to do any shape detection? 
We just need the ability to define level, which will let events to 
go to underlying faces, just like Amiga DE did it. And if you look 
at Cyphre's irregular window shape, you will see, that it simply 
is not rectangular, or is it?

do http://www.rebol.cz/~cyphre/trans-gui.r
Graham - there are no holes in R3. Most of the stuff is just non 
finalised design. Look at latest changes - absolutly necessary Core 
changes to get load, transcode, modules working. Last two days we 
saw two releases - A38, A39 with bunch of fixes. We are slowly getting 
there.
Cyphre can't do nothing yet, as Carl did some changes to the code, 
and Cyphre's version of R3/View is not compatible anymore. Of course, 
rebin isolation should help, and in month or two, we get there - 
modules are bing worked on right now, plug-ins and rebin are next 
one. Then some source-codes get released finally. In the meantime, 
Carl also updates docs - very important ...
BrianH
27-Mar-2009
[12373]
Three releases - we're up to A40 now :)
shadwolf
27-Mar-2009
[12374x2]
Do we have a deeper text compositing support in AGG ? (woops...)
by deeper and since the number of font is limited the basic thing 
i need would be to get a something like "get-char-size char font-name 
font-size"
Steeve
27-Mar-2009
[12376x2]
this what in text-draw.r (VID3 sources)
font-char-size?: funct [fstyle] [
	gob: make gob! [offset: 0x0 size: 300x100]
	gob/text: reduce [
		'font fstyle/font

  'para make fstyle/para [wrap?: off] ; avoid infinite loop font bug
		'anti-alias fstyle/anti-alias
		"M"
	]
	size-text gob
]
But i don't use this. Useless memory overhead (by creating a new 
gob) each time.
ICarii
28-Mar-2009
[12378]
the gob size is important in the wrapping calculations
Steeve
28-Mar-2009
[12379]
So what ?
ICarii
28-Mar-2009
[12380x2]
scan-fontset: func [fname fsize /style fstyle /local tmpfnt font-metrics 
charlist n][
	font-metrics: copy []

 tmpfnt: make system/standard/font compose [name: fname size: fsize 
 style: (either style [fstyle][none])]
	charlist: copy ""
	for n 32 126 1 [append charlist to-char n]
	forall charlist [
		append font-metrics size-text make gob! compose [
			offset: 0x0
			size: (as-pair fsize * 2 fsize * 2)
			text: [font tmpfnt size fsize (to-string first charlist)]
		]
	]
	append font-metrics charlist
	return font-metrics
]

probe scan-fontset "Lucida Sans" 24
that will get a basic 32-126 charset of requested font, size and 
style and return the metrics for you under R3.
Pekr
28-Mar-2009
[12382x2]
I really like, how this page is starting to look - that is what I 
call good realease-early, release often strategy - http://www.rebol.net/wiki/R3_Releases
One question towards linux and os-x builds - is it only a Core build, 
or View is included too?
Henrik
28-Mar-2009
[12384]
OSX is core only, and I think Linux too.
Steeve
28-Mar-2009
[12385]
Icarii, i don't see the interest to do such a mess.

Basically, when i have to get the size of a text , i just do a size-text 
on it.
ICarii
28-Mar-2009
[12386x2]
Steeve - just a simple way to get font-metrics for layout planning 
where you cannot rely on richtext in AGG working (eg it doesnt wrap, 
doesnt do bounds in Draw mode)
personally I doubt i'd go to the trouble to get it precise either.
Maxim
28-Mar-2009
[12388]
does size-text in R3 also only return size, or does it now also return 
offset of that size