Package net.alteiar.beans.map

Examples of net.alteiar.beans.map.UnzoomGraphics


  }

  protected abstract void drawElement(Graphics2D g);

  protected void drawSelection(Graphics2D g) {
    UnzoomGraphics t = new UnzoomGraphics(g);

    double zoomFactor = t.getZoomFactor();
    Graphics2D g2 = t.generateGraphics();

    int width = Long.valueOf(Math.round(getWidthPixels() * zoomFactor))
        .intValue();
    int height = Long.valueOf(Math.round(getHeightPixels() * zoomFactor))
        .intValue();

    g2.translate(position.getX() * zoomFactor, position.getY() * zoomFactor);
    g2.setColor(CampaignClient.getInstance().getCurrentPlayer()
        .getRealColor());
    g2.setStroke(new BasicStroke(5.0f));
    g2.drawRect(0, 0, width, height);

    t.disposeGraphics();
  }
View Full Code Here

TOP

Related Classes of net.alteiar.beans.map.UnzoomGraphics

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.