Exemple #1
0
 public Viewport(Viewport other)
 {
     this.corner = other.corner;
     this.size = other.size;
     this.minSizeY = other.minSizeY;
 }
Exemple #2
0
 public Vector2 scaleTo(Viewport other)
 {
     return other.size / size;
 }
Exemple #3
0
 /*
  * Maps a vector from this viewport to other.
  */
 public Vector2 mapTo(Vector2 from, Viewport other)
 {
     return other.size * ((from - corner) / size) + other.corner;
 }
Exemple #4
0
 public Vector2 scaleTo(Viewport other)
 {
     return(other.size / size);
 }
Exemple #5
0
 /*
  * Maps a vector from this viewport to other.
  */
 public Vector2 mapTo(Vector2 from, Viewport other)
 {
     return(other.size * ((from - corner) / size) + other.corner);
 }
Exemple #6
0
 public Viewport(Viewport other)
 {
     this.corner   = other.corner;
     this.size     = other.size;
     this.minSizeY = other.minSizeY;
 }