Strange Bug in CF 2.2 (v18) (graphics library?)
Posted: Thu Jul 30, 2009 10:56 pm
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:
Instead of a black square I get this:
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.
Code: Select all
startshape INIT
size {x -20}
rule INIT {
SQUARE {s 40 x 20}
}
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.