public void scale(double d1, double d2) {
   m_localGraphicsState.setXScale(d1);
   m_localGraphicsState.setYScale(d2);
   if (DEBUG)
     System.err.println(
         Messages.getInstance().getString("PostscriptGraphics_Scale_Error_Text_First")
             + d1
             + Messages.getInstance().getString("PostscriptGraphics_Scale_Error_Text_Second")
             + d2);
 }
 /**
  * Translates the origin of the graphics context to the point (x, y) in the current coordinate
  * system. Modifies this graphics context so that its new origin corresponds to the point (x, y)
  * in this graphics context's original coordinate system. All coordinates used in subsequent
  * rendering operations on this graphics context will be relative to this new origin.
  *
  * @param x the x coordinate.
  * @param y the y coordinate.
  */
 public void translate(int x, int y) {
   if (DEBUG)
     System.out.println(
         Messages.getInstance().getString("PostscriptGraphics_Translate_Text_First")
             + x
             + Messages.getInstance().getString("PostscriptGraphics_Translate_Text_Second")
             + y);
   m_localGraphicsState.setXOffset(m_localGraphicsState.getXOffset() + xScale(x));
   m_localGraphicsState.setYOffset(m_localGraphicsState.getYOffset() + yScale(y));
   m_psGraphicsState.setXOffset(m_psGraphicsState.getXOffset() + xScale(x));
   m_psGraphicsState.setYOffset(m_psGraphicsState.getYOffset() + yScale(y));
 }
  /** replaces the font (PS name) if necessary and returns the new name */
  private static String replacePSFont(String font) {
    String result;

    result = font;

    // do we have to replace it? -> same style, size
    if (m_PSFontReplacement.containsKey(font)) {
      result = m_PSFontReplacement.get(font).toString();
      if (DEBUG)
        System.out.println(
            Messages.getInstance().getString("PostscriptGraphics_ReplacePSFont_Text_First")
                + font
                + Messages.getInstance().getString("PostscriptGraphics_ReplacePSFont_Text_Second")
                + result
                + Messages.getInstance().getString("PostscriptGraphics_ReplacePSFont_Text_Third"));
    }

    return result;
  }
  /** output if we're in debug mode */
  static {
    if (DEBUG)
      System.err.println(
          PostscriptGraphics.class.getName()
              + Messages.getInstance().getString("PostscriptGraphics_Error_Text"));

    // get font replacements
    m_PSFontReplacement = new Hashtable();
    m_PSFontReplacement.put(
        "SansSerif.plain", "Helvetica.plain"); // SansSerif.plain is displayed as Courier in GV???
    m_PSFontReplacement.put(
        "Dialog.plain",
        "Helvetica.plain"); // dialog is a Sans Serif font, but GV displays it as Courier???
    m_PSFontReplacement.put(
        "Microsoft Sans Serif",
        "Helvetica.plain"); // MS Sans Serif is a Sans Serif font (hence the name!), but GV displays
                            // it as Courier???
    m_PSFontReplacement.put(
        "MicrosoftSansSerif",
        "Helvetica.plain"); // MS Sans Serif is a Sans Serif font (hence the name!), but GV displays
                            // it as Courier???
  }