Win95 screen and printed output differ for java.awt.Canvas.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 1.1
    • Affects Version/s: 1.1
    • Component/s: client-libs
    • None
    • 1.1fcs
    • x86
    • windows_95
    • Not verified



      Name: el35337 Date: 01/03/97

      Win95 print output differs from screen (HP DeskJet 820Cse printer,
      V8.2 driver)
      The screen shows crossed lines and centered transparent rectangle. On the
      printed
      output the rectangle is opaque (i.e. the intersection of the lines is covered
      completely by the rectangle).
      *** example code ***
      import java.awt.*;
      import java.util.*;

      public class Bug3 extends Frame
      {
              public static void main(String [] args)
          {
              Bug3 bug3 = new Bug3();
              bug3.resize(300, 300);
                      MyCanvas mycanvas = new MyCanvas();
                      bug3.add(mycanvas);
                      bug3.show();
                      bug3.print();
          }

          public void print()
          {
              PrintJob pjob = getToolkit().getPrintJob(this,
                                 "Printing Test", (Properties)null);
              if (pjob != null)
              {
                  Graphics pg = pjob.getGraphics();
                  if (pg != null)
                  {
                      printAll(pg);
                      pg.dispose(); // flush page
                          }
              pjob.end();
              }
          }
      }

      class MyCanvas extends Canvas
      {
              public void paint(Graphics g)
              {
                      g.drawLine(0, 150, 300, 150);
                      g.drawLine(150, 0, 150, 300);
              g.drawRect(75, 75, 150, 150);
              }

      }
      ======================================================================

            Assignee:
            Tom Ball (Inactive)
            Reporter:
            Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: