1. NodeBox 1
    1. Homepage
    2. NodeBox 3Node-based app for generative design and data visualization
    3. NodeBox OpenGLHardware-accelerated cross-platform graphics library
    4. NodeBox 1Generate 2D visuals using Python code (Mac OS X only)
  2. Gallery
  3. Documentation
  4. Forum
  5. Blog

bug in core image lib / linear gradients

Posted by Giorgio O. on Jan 28, 2009

Hello again,

while trying to draw linear gradients on a core image layer I found this bug:

layer(clr1, clr2, type="linear", spread=0.5)

will return a radial gradient instead of a linear one because passing the 'spread' keyword to the function.

I guess that the problem lies in the 'if' check at line 306 of __init__.py

ciao!
g


 
Posted by Giorgio O. on Jan 29, 2009

also.... if I export as pdf a canvas layer with a gradient applied... it does show as as an empty box in the exported pdf (while using PNG everything goes fine)



Posted by Tom De Smedt on Jan 30, 2009

The gradient is fixed in the latest version (spread parameter will simply be ignored if type="linear").

Export: actually, whatever you put in a canvas won't export as PDF.
However, when you do:

canvas.save("test.pdf")
instead of exporting from the file menu, it DOES export. So there seems to be a difference between the two that we need to look at.



Posted by Giorgio O. on Jan 30, 2009

>instead of exporting from the file menu, it DOES export.

wow!! very cool, I didn't notice that there was a difference between the methods. thanks!