// Path: src/java/org/getopt/pcl5/IPrinterState.java
// public interface IPrinterState {
//   /**
//    * Returns current font used by printer. <b>Do not cache this value.<b>
//    * 
//    * @return current Font class
//    */
//   Font getFont();
// 
//   /**
//    * Returns current font attributes
//    * 
//    * @return current font attribute
//    */
//   Map getFontAttributes();
// 
//   /**
//    * Return current color used by printer <b>Do not cache this value.<b>
//    * 
//    * @return Current color
//    */
//   Color getCurrentColor();
// 
//   /**
//    * Return true is printer has selected condensed font
//    * 
//    * @return condensed printer state
//    */
//   boolean isCondensed();
// 
//   int getUnderliningMode();
// }


import org.getopt.pcl5.IPrinterState;
import java.awt.image.BufferedImage;

/*
 * Created on 2004-09-12
 *
 */
package org.getopt.pcl5.PCL5Interpreter;



/**
 * Callback interface, called when something to print happens Should be
 * implemented by rasterizer
 * 
 * Every parameter is scaled in 72 DPI
 * 
 */
public interface IPrint {
  /**
   * Called when new page
   * 
   */
  void newPage();

  /**
   * Called when page size changed
   * 
   * @param w
   *          New width of page, in 72 DPI
   * @param h
   *          New height of page, in 72 DPI
   */
  void pageSize(float w, float h);

  /**
   * Called after every margins change and after each new page
   * 
   * @param top
   *          top margin, in 72 DPI
   * @param bottom
   *          bottom margin, in 72 DPI
   * @param left
   *          left margin, in 72 DPI
   * @param right
   *          right margin, in 72 DPI
   */
  void newMargins(float top, float bottom, float left, float right);

  /**
   * Called on beginning of processing, before any other method from this
   * interface is called
   * 
   */
  void processingStart();

  /**
   * Called on end of processing, after last method from this interface was
   * called
   * 
   */
  void processingEnd();

  /**
   * Called when text should be printed, text is limited to end of line (CR) or
   * to change in pronter state (ie font)
   * 
   * @param x
   *          Print location X in 72 DPI
   * @param y
   *          Print location Y in 72 DPI
   * @param w
   *          Width of text (bound box) in 72 DPI
   * @param h
   *          Height of text in (bound box) 72 DPI
   * @param text
   *          Text to print
   * @param state
   *          Interface to query state of printer
   */
  void printText(float x, float y, float w, float h, String text,

// Path: src/java/org/getopt/pcl5/IPrinterState.java
// public interface IPrinterState {
//   /**
//    * Returns current font used by printer. <b>Do not cache this value.<b>
//    * 
//    * @return current Font class
//    */
//   Font getFont();
// 
//   /**
//    * Returns current font attributes
//    * 
//    * @return current font attribute
//    */
//   Map getFontAttributes();
// 
//   /**
//    * Return current color used by printer <b>Do not cache this value.<b>
//    * 
//    * @return Current color
//    */
//   Color getCurrentColor();
// 
//   /**
//    * Return true is printer has selected condensed font
//    * 
//    * @return condensed printer state
//    */
//   boolean isCondensed();
// 
//   int getUnderliningMode();
// }


// Path: src/java/org/getopt/pcl5/PCL5Interpreter/IPrint.java
import org.getopt.pcl5.IPrinterState;
import java.awt.image.BufferedImage;

/*
 * Created on 2004-09-12
 *
 */
package org.getopt.pcl5.PCL5Interpreter;



/**
 * Callback interface, called when something to print happens Should be
 * implemented by rasterizer
 * 
 * Every parameter is scaled in 72 DPI
 * 
 */
public interface IPrint {
  /**
   * Called when new page
   * 
   */
  void newPage();

  /**
   * Called when page size changed
   * 
   * @param w
   *          New width of page, in 72 DPI
   * @param h
   *          New height of page, in 72 DPI
   */
  void pageSize(float w, float h);

  /**
   * Called after every margins change and after each new page
   * 
   * @param top
   *          top margin, in 72 DPI
   * @param bottom
   *          bottom margin, in 72 DPI
   * @param left
   *          left margin, in 72 DPI
   * @param right
   *          right margin, in 72 DPI
   */
  void newMargins(float top, float bottom, float left, float right);

  /**
   * Called on beginning of processing, before any other method from this
   * interface is called
   * 
   */
  void processingStart();

  /**
   * Called on end of processing, after last method from this interface was
   * called
   * 
   */
  void processingEnd();

  /**
   * Called when text should be printed, text is limited to end of line (CR) or
   * to change in pronter state (ie font)
   * 
   * @param x
   *          Print location X in 72 DPI
   * @param y
   *          Print location Y in 72 DPI
   * @param w
   *          Width of text (bound box) in 72 DPI
   * @param h
   *          Height of text in (bound box) 72 DPI
   * @param text
   *          Text to print
   * @param state
   *          Interface to query state of printer
   */
  void printText(float x, float y, float w, float h, String text,

          IPrinterState state);
