package dev.bytevibe.hyperpoint;

/**
 * 图片对象
 */
public class ImageObject extends DrawableObject {
    private String imagePath; // 图片文件路径

    public ImageObject(double x, double y, double width, double height, String imagePath) {
        super(x, y, width, height);
        this.imagePath = imagePath;
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    @Override
    public boolean contains(double px, double py) {
        return px >= x && px <= x + width && py >= y && py <= y + height;
    }

    @Override
    public String getTypeName() {
        return "Image";
    }
}

