Hi Ed,
re:
> 1) Save it on a transparent background?
Sorry no the viewport renderer that uses the GPU doesn't work with a transparent background, the way it currently works it is expecting to blend against a non-transparent background.
There is another renderer that is CPU based and used to generate the shaded background image for .ai and .pdf format exports though. For .ai export there will be a .png companion file for the shaded background and it will have a transparent background so you could try harvesting it out of an .ai format export.
> 2) Save it to the clipboard rather than to a file?
This one you can do by using view.renderToClipboard() instead of view.render(), something like this (warning, untested):
script: var prev_background = moi.view.viewportBackgroundColor; moi.view.viewportBackgroundColor = 0xFFFFFF; moi.view.lineWidth = 4; moi.grid.display = false; moi.grid.showXYAxes = false; moi.view.showAxisIcon = false; moi.view.showViewTitles = false; try { moi.ui.getActiveViewport().renderToClipboard( 4000, 2500 ); } catch(e){} moi.view.lineWidth = 1; moi.grid.display = true; moi.grid.showXYAxes = true; moi.view.showAxisIcon = true; moi.view.showViewTitles = true; moi.view.viewportBackgroundColor = prev_background;
- Michael
|