if (returnComp != null){
returnComp.setName(gfxElem.getTagName());
//Set style infos
if (returnComp instanceof AbstractVisibleComponent){
AbstractVisibleComponent comp = (AbstractVisibleComponent)returnComp;
//Set Fill
comp.setFillColor(new MTColor(fillR, fillG, fillB, fillOpacity));
comp.setNoFill(noFill);
//Set Stroke
comp.setStrokeColor(new MTColor(strokeR, strokeG, strokeB, strokeOpacity));
//Opengl cant handle big lines well
//So cap at width 3
if (strokeWidth > 2.0f)
strokeWidth = 2.0f;
comp.setStrokeWeight(strokeWidth);
comp.setNoStroke(noStroke);
//Other
comp.setDrawSmooth(true);
comp.setPickable(false);
//Hack for smoothing non stroked components with a stroke same as fillcolor
if (comp.isNoStroke()
&& linearGradient == null
){
comp.setStrokeColor(new MTColor(fillR, fillG, fillB, fillOpacity)); //fillOpacity
comp.setStrokeWeight(0.6f);
//Ellipse doesent smooth right with 0.1f strokeweight
if (comp instanceof MTEllipse){
comp.setStrokeWeight(1.0f);
}
comp.setNoStroke(false);
}
//Some settings for Geometric shapes (actually should all be)
if (comp instanceof AbstractShape ){
AbstractShape shape = (AbstractShape)comp;