Ejemplo n.º 1
0
  private void drawBack(GraphicsEx g, int top, int width, int height) {
    // Fill background
    g.setThemeColor(CanvasEx.THEME_BACKGROUND);
    g.fillRect(0, top, width, height);

    g.setClip(0, top, width, height);
    if (null != Scheme.backImage) {
      int offset = 0;
      if (0 < getSize()) {
        offset =
            Math.max(0, Scheme.backImage.getHeight() - height) * getTopOffset() / getFullSize();
      }
      g.drawImage(Scheme.backImage, 0, top - offset, Graphics.LEFT | Graphics.TOP);
    }
  }