lundi 25 mai 2015

javafx translation

Hallo.

import javax.microedition.lcdui.Graphics;
public void translate(int x,int y)

Translates the origin of the graphics context to the point (x, y) in the current coordinate system.
All coordinates used in subsequent rendering operations on this graphics context will be relative to this new origin.

Gibt es eigentlich sowas auch bei javafx? Der translation Befehl etc. koennen das jendenfalls nicht.

import javax.microedition.lcdui.Graphics;

Java Code:

  1. public static void play(Graphics g){
  2.  
  3. actor.move(g);
  4. actor.scrollMap(g);
  5. Level.drawTiles(g);
  6. SpriteTool.drawSprites(g);
  7. actor.draw(g);
  8.  
  9. g.translate(-Actor.xt,-Actor.yt);


javafx translation

0 commentaires:

Enregistrer un commentaire