private Visualization embedOrThumbnail ( final int thumbsize , PlotItem it , VisualizationTask task , Element parent ) { final Visualization vis ; if ( ! single ) { vis = task . getFactory ( ) . makeVisualizationOrThumbnail ( context , task , plot , it . w , it . h , it . proj , thumbsize ) ; } else { vis = task . getFactory ( ) . makeVisualization ( context , task , plot , it . w , it . h , it . proj ) ; } if ( vis == null || vis . getLayer ( ) == null ) { LOG . warning ( "Visualization returned empty layer: " + vis ) ; return vis ; } if ( task . has ( RenderFlag . NO_EXPORT ) ) { vis . getLayer ( ) . setAttribute ( SVGPlot . NO_EXPORT_ATTRIBUTE , SVGPlot . NO_EXPORT_ATTRIBUTE ) ; } parent . appendChild ( vis . getLayer ( ) ) ; return vis ; }
Produce thumbnail for a visualizer .