PIbd-21_Potapov_N.S._Stormt.../ProjectStormtrooper/DrawingEnginesEllipse.java

32 lines
852 B
Java

package ProjectStormtrooper;
import java.awt.*;
public class DrawingEnginesEllipse implements IDrawingEngines {
private EnumEnginesCount _enumEnginesCount;
@Override
public void SetEnumEnginesCount(int enginesCount) {
for (EnumEnginesCount val : EnumEnginesCount.values()) {
if (val.count == enginesCount) {
this._enumEnginesCount = val;
return;
}
}
this._enumEnginesCount = EnumEnginesCount.Two;
}
@Override
public EnumEnginesCount GetEnumEnginesCount() {
return _enumEnginesCount;
}
@Override
public void DrawEngine(Graphics2D g2d, Color color, int x, int y, int w, int h) {
g2d.setColor(Color.WHITE);
g2d.fillOval(x, y, w, h);
g2d.setColor(Color.BLACK);
g2d.drawOval(x, y, w, h);
}
}