// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __gnu_java_awt_print_PostScriptGraphics2D__
#define __gnu_java_awt_print_PostScriptGraphics2D__

#pragma interface

#include <java/awt/Graphics2D.h>
#include <gcj/array.h>

extern "Java"
{
  namespace gnu
  {
    namespace java
    {
      namespace awt
      {
        namespace print
        {
          class PostScriptGraphics2D;
          class SpooledDocument;
        }
      }
    }
  }
  namespace java
  {
    namespace text
    {
      class AttributedCharacterIterator;
    }
    namespace awt
    {
      class RenderingHints$Key;
      class GraphicsConfiguration;
      class Composite;
      namespace font
      {
        class FontRenderContext;
        class GlyphVector;
      }
      class FontMetrics;
      class Rectangle;
      namespace image
      {
        class RenderedImage;
        namespace renderable
        {
          class RenderableImage;
        }
        class BufferedImageOp;
        class BufferedImage;
        class ImageObserver;
      }
      class Image;
      class Graphics;
      class Stroke;
      class Color;
      class Font;
      class Shape;
      class Paint;
      class RenderingHints;
      namespace geom
      {
        class AffineTransform;
      }
      namespace print
      {
        class Pageable;
        class PageFormat;
        class Printable;
        class PrinterJob;
      }
    }
  }
}

class gnu::java::awt::print::PostScriptGraphics2D : public ::java::awt::Graphics2D
{
public:
  PostScriptGraphics2D (::java::awt::print::PrinterJob *);
  virtual ::gnu::java::awt::print::SpooledDocument *spoolPostScript (::java::awt::print::Printable *, ::java::awt::print::PageFormat *, ::java::awt::print::Pageable *);
private:
  void writePSHeader ();
  void setupFonts ();
public:
  virtual jint spoolPage (::java::io::PrintWriter *, ::java::awt::print::Printable *, ::java::awt::print::PageFormat *, jint);
private:
  void pushCTM ();
  void popCTM ();
public:
  virtual ::java::awt::Graphics *create () { return 0; }
  virtual void drawOval (jint, jint, jint, jint);
  virtual void drawPolyline (jintArray, jintArray, jint);
  virtual void drawRoundRect (jint, jint, jint, jint, jint, jint);
  virtual void fillRoundRect (jint, jint, jint, jint, jint, jint);
  virtual void drawArc (jint, jint, jint, jint, jint, jint);
  virtual void fillArc (jint, jint, jint, jint, jint, jint);
  virtual void fillOval (jint, jint, jint, jint);
  virtual void fillPolygon (jintArray, jintArray, jint);
  virtual void drawLine (jint, jint, jint, jint);
  virtual jboolean drawImage (::java::awt::Image *, jint, jint, ::java::awt::Color *, ::java::awt::image::ImageObserver *);
  virtual jboolean drawImage (::java::awt::Image *, jint, jint, jint, jint, jint, jint, jint, jint, ::java::awt::Color *, ::java::awt::image::ImageObserver *);
  virtual jboolean drawImage (::java::awt::Image *, jint, jint, jint, jint, jint, jint, jint, jint, ::java::awt::image::ImageObserver *);
  virtual jboolean drawImage (::java::awt::Image *, jint, jint, ::java::awt::image::ImageObserver *);
  virtual jboolean drawImage (::java::awt::Image *, jint, jint, jint, jint, ::java::awt::Color *, ::java::awt::image::ImageObserver *);
  virtual jboolean drawImage (::java::awt::Image *, jint, jint, jint, jint, ::java::awt::image::ImageObserver *);
  virtual void drawImage (::java::awt::image::BufferedImage *, ::java::awt::image::BufferedImageOp *, jint, jint);
  virtual jboolean drawImage (::java::awt::Image *, ::java::awt::geom::AffineTransform *, ::java::awt::image::ImageObserver *);
  virtual void drawRenderableImage (::java::awt::image::renderable::RenderableImage *, ::java::awt::geom::AffineTransform *) { }
  virtual void drawRenderedImage (::java::awt::image::RenderedImage *, ::java::awt::geom::AffineTransform *) { }
  virtual void drawPolygon (jintArray, jintArray, jint);
  virtual void drawString (::java::lang::String *, jint, jint);
  virtual void drawString (::java::lang::String *, jfloat, jfloat);
private:
  void drawStringPSFont (::java::lang::String *, jfloat, jfloat);
  void saveAndInvertAxis ();
  void restoreAxis ();
  void drawStringShape (::java::awt::Shape *);
public:
  virtual void setColor (::java::awt::Color *);
  virtual void clearRect (jint, jint, jint, jint);
  virtual void clipRect (jint, jint, jint, jint);
  virtual void copyArea (jint, jint, jint, jint, jint, jint) { }
  virtual void fillRect (jint, jint, jint, jint);
  virtual void dispose () { }
  virtual void setClip (jint, jint, jint, jint);
  virtual void setClip (::java::awt::Shape *);
  virtual ::java::awt::Shape *getClip () { return clipShape; }
  virtual ::java::awt::Rectangle *getClipBounds ();
  virtual ::java::awt::Color *getColor () { return currentColor; }
  virtual ::java::awt::Font *getFont () { return currentFont; }
  virtual ::java::awt::FontMetrics *getFontMetrics ();
  virtual ::java::awt::FontMetrics *getFontMetrics (::java::awt::Font *) { return 0; }
  virtual void setFont (::java::awt::Font *);
private:
  void setPSFont ();
public:
  virtual void setPaintMode () { }
  virtual void setXORMode (::java::awt::Color *) { }
  virtual void close ();
  virtual void addRenderingHints (::java::util::Map *) { }
private:
  void writeShape (::java::awt::Shape *);
public:
  virtual void clip (::java::awt::Shape *);
  virtual void draw (::java::awt::Shape *);
  virtual void drawGlyphVector (::java::awt::font::GlyphVector *, jfloat, jfloat);
  virtual void drawString (::java::text::AttributedCharacterIterator *, jfloat, jfloat);
  virtual void drawString (::java::text::AttributedCharacterIterator *, jint, jint);
  virtual void fill (::java::awt::Shape *);
  virtual ::java::awt::Color *getBackground () { return backgroundColor; }
  virtual ::java::awt::Composite *getComposite () { return 0; }
  virtual ::java::awt::GraphicsConfiguration *getDeviceConfiguration ();
  virtual ::java::awt::font::FontRenderContext *getFontRenderContext ();
  virtual ::java::awt::Paint *getPaint () { return currentPaint; }
  virtual ::java::lang::Object *getRenderingHint (::java::awt::RenderingHints$Key *);
  virtual ::java::awt::RenderingHints *getRenderingHints () { return renderingHints; }
  virtual ::java::awt::Stroke *getStroke () { return currentStroke; }
  virtual ::java::awt::geom::AffineTransform *getTransform () { return currentTransform; }
  virtual jboolean hit (::java::awt::Rectangle *, ::java::awt::Shape *, jboolean);
  virtual void setBackground (::java::awt::Color *);
  virtual void setComposite (::java::awt::Composite *) { }
  virtual void setPaint (::java::awt::Paint *);
private:
  ::java::lang::String *colorTriple (::java::awt::Color *);
  ::java::lang::String *colorTripleHex (::java::awt::Color *);
  void writeGradient ();
public:
  virtual void setRenderingHint (::java::awt::RenderingHints$Key *, ::java::lang::Object *) { }
  virtual void setRenderingHints (::java::util::Map *) { }
  virtual void setStroke (::java::awt::Stroke *);
private:
  void concatCTM (::java::awt::geom::AffineTransform *);
public:
  virtual void setTransform (::java::awt::geom::AffineTransform *);
  virtual void transform (::java::awt::geom::AffineTransform *);
  virtual void shear (jdouble, jdouble);
  virtual void translate (jint, jint);
  virtual void translate (jdouble, jdouble);
  virtual void rotate (jdouble);
  virtual void rotate (jdouble, jdouble, jdouble);
  virtual void scale (jdouble, jdouble);
private:
  ::java::awt::print::PrinterJob * __attribute__((aligned(__alignof__( ::java::awt::Graphics2D )))) printerJob;
  ::java::io::PrintWriter *out;
  ::java::awt::geom::AffineTransform *currentTransform;
  ::java::awt::geom::AffineTransform *pageTransform;
  ::java::awt::RenderingHints *renderingHints;
  ::java::awt::Paint *currentPaint;
  ::java::awt::Shape *clipShape;
  ::java::awt::Font *currentFont;
  ::java::awt::Color *currentColor;
  ::java::awt::Color *backgroundColor;
  ::java::awt::Stroke *currentStroke;
  static ::java::awt::Stroke *ordinaryStroke;
  jfloat cx;
  jfloat cy;
  jboolean currentFontIsPS;
  jdouble pageX;
  jdouble pageY;
  jdouble Y;
  jboolean gradientOn;
public:

  static ::java::lang::Class class$;
};

#endif /* __gnu_java_awt_print_PostScriptGraphics2D__ */
