Graphics problem in 2.7 but not in 2.6
jhurley0305 at sbcglobal.net
Tue Dec 26 10:42:33 EST 2006
James Hurley wrote:
> I have just recently been working with RR 2.7 (on Mac OS 10.4.8) and
> found that certain graphics routines which worked well in 2.6 are
> much slower or fail altogether in 2.7
>Richard Gaskin wrote:
>My hunch is it's the new antialiasing, which is on by default for
>graphic objects in v2.7.
>If you turn the antialias property to false in the templateGraphic
>before running routines which create new graphics, my hunch is you'll
>find speed more on par with earlier non-antialiased versions.
> Richard Gaskin
> Fourth World Media Corporation
Thanks Richard. That was indeed the problem.
I don't know whether this would be considered a problem, but there is
apparently an upper limit on the number of graphics points that
RunRev will tolerate in an antialiased figure.
In the following handler, the graphic disappears about i = 250. The
point limit may be about 500 or so.
put 200 into r
put 300 into x0
put 300 into y0
--Delete existing graphics
repeat with i = the number of graphics down to 1
delete graphic i
set the style of the templateGraphic to "line"
set the antialiased of the templateGraphic to "true"
put x0,y0 into tCenterPoint
put "ray" into tName
if there is no grc tName then create grc tName
--The following loop chokes at i = 250 when the antialiased is on.
--Interesting moire patters when the antialiased is on--gone when off.
repeat with i = 1 to 360
put x0 + round(r * cos(i*pi/180)) into x
put y0 + round(r * sin(i*pi/180)) into y
put x,y into tRadialPoint
put tCenterPoint & cr & tRadialPoint & cr after tPoints
set the points of grc tName to tPoints
--Force a screen refresh
--To see the figure set the antialiased to false
set the antialiased of grc tName to false
More information about the Use-livecode