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

Why is a canvas path filled?

Posted by Peter N Lewis on Mar 05, 2009



size(100,100)
fill(0,0,1)
rect(0,0,WIDTH,HEIGHT)
 
coreimage = ximport("coreimage")
 
canvas = coreimage.canvas(100, 100)
l = canvas.append(color(1.0, 0.0, 0.5))
 
p = oval( 0, 0, HEIGHT, WIDTH, draw=False )
l = canvas.append( p, background=None, fill=None, stroke= color(0, 1, 0), strokewidth=1 )
 
canvas.draw(0, 0)
Why does this produce a picture with a black filled circle? The path is set to fill=None so I expect the circle contents to be transparent (hence the center should be pink like the background).

Changing to fill=color(0,0,0,0) resolves the issue, but shouldn't fill=None work?

You already know that Export as Image... PDF does not produce the right results.


 
Posted by Tom De Smedt on Mar 09, 2009

Hi Peter,
This should be fixed in the latest version.