/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package Vista;

/**
 *
 * @author mario
 */
import javax.swing.*;
import java.awt.*;

class ZonaPlatino extends JPanel {
    private int[] xPoints = {10, 90, 290, 370, 340, 290, 290, 90, 90, 40}; // Nuevas coordenadas X de los puntos
    private int[] yPoints = {70, 10, 10, 70, 145, 125, 70, 70, 125, 145}; // Nuevas coordenadas Y de los puntos

    private Color platinumColor = new Color(229, 228, 226); // Platino

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.setColor(platinumColor);
        g.fillPolygon(scalePolygon(xPoints, 3), scalePolygon(yPoints, 3), xPoints.length);
        g.setColor(Color.black);
        g.drawPolygon(scalePolygon(xPoints, 3), scalePolygon(yPoints, 3), xPoints.length);
    }

    private int[] scalePolygon(int[] points, double scaleFactor) {
        int[] scaledPoints = new int[points.length];
        for (int i = 0; i < points.length; i++) {
            scaledPoints[i] = (int) (points[i] * scaleFactor);
        }
        return scaledPoints;
    }
}

