help with speedy graphics

Alex Tweedly alex at tweedly.net
Wed Jul 21 09:33:30 EDT 2004


At 03:52 21/07/2004 -0700, Geoff Canyon wrote:

>After doing this:
>
>   set the markerPoints of grc 2 to 0,0 & cr & 5,0 & cr & 5,5 & cr & 0,5 & 
> cr & 0,0
>
>This takes about 10 ticks to create 2500 boxes on my machine:
[snip]
>Using ten graphics, it takes about 10 ticks to create 10,000 boxes using 
>10 graphics:

Thank you Geoff.
With the help from Richard, Dar, and Monte I'd pretty much stumbled my way 
to that answer.
Taking positions and colours from an actual data structure (rather than 
generating random points) I still get draw times for (10k points) under 20 
ticks - feels very fast, but not instantaneous.

I'm taking advantage of one further nice feature of "marked polygons" - 
instead of a blank line between vertices, you can have any number of blank 
lines with no discernible impact on performance. So I can build a set of 
point-lists, one for each colour, and then change the colour of any 
rectangle independently, by simply blanking out one line and filling another.

This gives me colour changes of 10-20% of the rectangles in 4-5 ticks (i.e. 
feels immediate), which is what I was hoping for ...

(but beware - the multiple blank lines are NOT preserved within the "points 
of grc n", so you can't "get" them back again. I keep these point-lists 
separately, and "set the point of grc n" each time).

-- Alex.
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.719 / Virus Database: 475 - Release Date: 12/07/2004


More information about the use-livecode mailing list