コード例 #1
0
 /**
  * This function is used to poll the screen to see if the window size has been changed so it can
  * resize the background
  *
  * @param width The current width of the window
  * @param height The current height of the window
  * @param sysTime Current time of the system in milliseconds
  * @param mouseScroll Tells you when the scroll wheel was altered
  */
 public void update(int width, int height, int sysTime, int mouseScroll) {
   if (cursx != width || cursy != height) {
     cursx = width;
     cursy = height;
     imgSort.setImageSize(cursx, cursy);
     imgSort.addImage(1, imgSort.getImage(0));
     if (animImg != null) animImg.resizeImg(cursx, cursy);
   }
 }
コード例 #2
0
 /**
  * Draws the background image to the Java2D Frame and Applet windows
  *
  * @param g Graphics object for Java2D
  * @param dthis Component object for Java2D used for rendering
  */
 public void render(Graphics2D g, Component dthis) {
   g.drawImage(imgSort.getImage(1), 0, 0, dthis);
   if (animImg != null) g.drawImage(animImg.getImage(), 0, 0, dthis);
 }