eraser.java

来自「自己课程设计做的 用JAVA的画板程序」· Java 代码 · 共 33 行

JAVA
33
字号
/* 软件作者: 熊锡君,时守刚 软件版权归作者所有,其他人可以对软件进行修改,可以使用软件代码,(按类使用请保留作者信息)*/package Painter;import java.awt.*;import main.MyCanvas;public class Eraser extends Shape {	private int x;	private int y;	public Eraser(Color colorPen, Color colorBrush, int lineWide, int x,int y) {		super(colorPen, colorBrush, lineWide);		this.x = x;		this.y = y;		}		public boolean IsPoint(int x,int y,float j1)	{		return false;	}	public void draw(Graphics g,int m_DrawMode,Color bgColor) {		g.setColor(bgColor);		int wide = MyCanvas.ERASER_STROKES[super.m_LineWide];		g.fillRect(this.x,this.y,wide,wide);		}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?