ClosePathSegment.java :  » Graphic-Library » GLIPS-Graffiti-editor-1.5 » fr » itris » glips » library » geom » path » segment » Java Open Source

Java Open Source » Graphic Library » GLIPS Graffiti editor 1.5 
GLIPS Graffiti editor 1.5 » fr » itris » glips » library » geom » path » segment » ClosePathSegment.java
package fr.itris.glips.library.geom.path.segment;

import java.awt.geom.*;

import org.apache.batik.ext.awt.geom.*;

/**
 * the class that handles close path instructions
 * @author ITRIS, Jordi SUC
 */
public class ClosePathSegment extends Segment{

  /**
   * a constructor of the class
   * @param previousSegment the segment that lies just before this segment
   */
  public ClosePathSegment(Segment previousSegment){
    
    super(previousSegment);
    initialize();
  }
  
  @Override
  public void initialize() {
    
    this.absoluteCmdName="Z";
    this.relativeCmdName="z";
  }
  
  @Override
  public void storeValues() {}
  
  @Override
  public void fillPath(ExtendedGeneralPath path) {
    
    path.closePath();
    super.fillPath(path);
  }
  
  @Override
  public void applyTransform(AffineTransform transform) {}
  
@Override
  public void modifyPoint(Point2D point, int index) {}
  
  @Override
  public String toString() {

    return absoluteCmdName;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.