Package org.mt4j.components.visibleComponents

Examples of org.mt4j.components.visibleComponents.AbstractVisibleComponent


  public void postDrawChildren(PGraphics g) {
    this.clip.disableClip(g);
   
    //Draw clipshape outline over all children to get an
    //antialiased border
    AbstractVisibleComponent clipShape = this.getChildClip().getClipShape();
//    if (!clipShape.isNoStroke()){
    if (this.drawInnerBorder){
      clipShape.setNoFill(true);
      clipShape.setNoStroke(false);
        clipShape.drawComponent(g);
      clipShape.setNoStroke(true);
      clipShape.setNoFill(false);
    }
   
    if (!savedNoStrokeSetting){
      boolean noFillSetting = this.isNoFill();
      this.setNoFill(true);
View Full Code Here


      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;
View Full Code Here

TOP

Related Classes of org.mt4j.components.visibleComponents.AbstractVisibleComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.