goAdobeIllustrator
Class GoAdobeIllustrator

java.lang.Object
  |
  +--goAdobeIllustrator.GoAdobeIllustrator

public class GoAdobeIllustrator
extends java.lang.Object


Field Summary
static int VERSION_3
          Acceptable argument value for compatibility in the constructor GoAdobeIllustrator(go, name, compatibility).
static int VERSION_8
          Acceptable argument value for compatibility in the constructor GoAdobeIllustrator(go, name, compatibility).
 
Constructor Summary
GoAdobeIllustrator(Go go, java.lang.String name, int compatibility)
          Adobe Illustrator file constructor.
 
Method Summary
 void close()
          Close the file.
 void writeFeedback()
          This is the main method where Go's feedback buffer is written out to the Adobe Illustrator file that was opened via the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION_3

public static final int VERSION_3
Acceptable argument value for compatibility in the constructor GoAdobeIllustrator(go, name, compatibility).

This value indicates file compatibility with Adobe Illustrator version 3.0 and up.

NOTE: Adobe Illustrator 3.0 can only do flat shading, and will automatically convert any smooth shaded triangles and lines to appear as flat shaded.


VERSION_8

public static final int VERSION_8
Acceptable argument value for compatibility in the constructor GoAdobeIllustrator(go, name, compatibility).

This value indicates file compatibility with Adobe Illustrator version 8.0 and up.

Constructor Detail

GoAdobeIllustrator

public GoAdobeIllustrator(Go go,
                          java.lang.String name,
                          int compatibility)
Adobe Illustrator file constructor.

This constructor will create a new Adobe Illustrator file based on the context go. The file name is specified via name. The format of the file is indicated with compatibility and can take on one of the following values:

Method Detail

close

public void close()
Close the file.

After writing out the content of the feedback buffer, the file must be closed. The file may not be completely available on disk until this method has been called.


writeFeedback

public void writeFeedback()
This is the main method where Go's feedback buffer is written out to the Adobe Illustrator file that was opened via the constructor. The Go context used is the one that was passed to the constructor. Here is an example of how writeFeedback() could be called.
// Save the current render mode.
go.push(Go.RENDER_MODE);

// Set the render mode to Go.FEEDBACK
go.renderMode(Go.FEEDBACK);

// Render something.
go.render(myData);

// Restore the render mode.
go.pop(Go.RENDER_MODE);

// Create the Adobe Illustrator file.
GoAdobeIllustrator file = new GoAdobeIllustrator(go, "myArt.ai", GoAdobeIllustrator.VERSION_8);

// Write out the content of Go's feedback buffer.
file.writeFeedback();

// Flush and close the file.
file.close();

// Remember to clear the feedback buffer.
go.clear(Go.FEEDBACK);