Thanks Julian, I'll test the fix. The way I drew the background properly before was to figure out the dimensions of the board. My previous tool was in Python, and I used a library called NetworkX which figured out networks of line segments. This allowed me to search for the loop polygon that was furthest "out" towards the edges. NetworkX did all of the hard work of putting together the nets and telling me if it was a continuous loop.
I haven't found a library yet that is as easy to use as NetworkX for C. I am looking at iGraph (http://igraph.sourceforge.net/) to see if it might do the same thing. If anyone has any ideas on an easy way to accomplish this, I'm open for suggestions. One other thought I had was to do it the following way, but it would be a ton of search loops and recursion to get the right result... - Search through all nets and look for the net with the smallest x,y start number - Once found, search through all nets looking for the x,y start that matches the x,y end of the previous - Continue until back at the origin With that array of segments, I could then use cairo to draw the background before rendering the layers. I could tell it to "subtract" the soldermask from the background as the first step and then continue placing the other layers. Anyways...open to suggestions! Thanks everyone for being a sounding board. I'm very much enjoying working with libgerbv and looking forward to contributing some code in the future. Curtis On 4/1/2011 11:42 PM, Julian Lamb wrote: > Curtis, >> >> First. Is there any way to set a layer to use as the bounds for >> drawing? I am inverting the SolderMask to get a proper look, but >> there's nothing that tells it to clip at the drawing border. I'd >> like to use the silkscreen layer which has the drawing dimensions on >> it as a clip region. I have attached a png so you can see. > No. The inverted image code simply floods the background with a > color, and then draws in reverse. >> >> Next. This gerber is output from CadSoft Eagle. I have an image on >> the silk screen layer that isn't getting rendered. I have attached >> the gerber for reference too. When I open it in gerbv I see the >> image, so I know its there, but it isn't getting rendered on the png >> output. > This is a bug, which I've fixed in the git tree. I've never seen this > before, but apparently Eagle is now rendering logos/images with very > thin flashed rectangles. If you click on "high quality" rendering in > gerbv it didn't even show in the window. It should be fixed now. > > Cheers-- > > > ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ Gerbv-devel mailing list Gerbv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gerbv-devel