spotlight.java
来自「oraily的Swing hacks code」· Java 代码 · 共 24 行
JAVA
24 行
import java.awt.*;import java.awt.geom.*;import java.awt.image.*;public class Spotlight{ protected Ellipse2D.Double spot; protected Rectangle2D.Double bounds; public Spotlight(int x, int y, int w, int h) { this.spot = new Ellipse2D.Double(x, y, w, h); } public Ellipse2D getSpot() { return spot; } public double getArea() { return Math.PI * spot.getWidth() * spot.getHeight() / 4.0; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?