Keep the Shape Size
Signed-off-by: Anthony Debucquoy <debucquoy.anthony@gmail.com>
This commit is contained in:
parent
382af6b541
commit
7b6291bda9
@ -1,22 +1,20 @@
|
||||
package school_project.Utils;
|
||||
|
||||
import javafx.geometry.Rectangle2D;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.scene.paint.Paint;
|
||||
import javafx.scene.shape.Rectangle;
|
||||
import school_project.Controller;
|
||||
import school_project.GameUI;
|
||||
import school_project.Piece;
|
||||
import school_project.Shape;
|
||||
import school_project.*;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
public class MatrixShape extends GridPane {
|
||||
public Shape shape;
|
||||
public Vec2 boundary_size = new Vec2();
|
||||
private Paint color;
|
||||
public MatrixShape(Shape shape) {
|
||||
super();
|
||||
@ -52,6 +50,7 @@ public class MatrixShape extends GridPane {
|
||||
}
|
||||
}
|
||||
}
|
||||
boundary_size = new Vec2((GameUI.SEGMENT_SIZE + GameUI.SPACE_SIZE) * shape.getWidth(), (GameUI.SEGMENT_SIZE + GameUI.SPACE_SIZE) * shape.getHeight());
|
||||
}
|
||||
public void setColor(Paint p) {
|
||||
color = p;
|
||||
|
Loading…
Reference in New Issue
Block a user