Page 1 of 1

Strange Bug in CF 2.2 (v18) (graphics library?)

Posted: Thu Jul 30, 2009 10:56 pm
by aihle
There seems to be some rounding error problem in either ContextFree or the used graphics library. Consider this code which should give a solid black square:

Code: Select all

startshape INIT

size {x -20}

rule INIT {
	SQUARE   {s 40 x 20}
}
Instead of a black square I get this:
Image

I tried several values for detail in the Render To Size dialog which creates different patterns. For above image, the value is 0,00499999988824129 (I entered 0,005 but it changed to this obscure value for some odd reason at confirmation)

This problem also only appears when using no scaling in the "size" directive. Using scale values > 1 creates a black square, using values < 1 produces a blank screen (one exception found: s 0.8 )


Not a big problem since I only stumbled upon this problem while debugging my code but I figured you still might want to know.

Posted: Fri Jul 31, 2009 5:29 am
by MtnViewJohn
I can't reproduce this on the Mac version. I'll try it on the Windows version when I get back from vacation.