⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basicshape.java

📁 java 图形处理
💻 JAVA
字号:
//package paint2d;

import java.awt.*;
import java.awt.geom.*;

/* A BasicShape is a Picture that consists of
   a Shape together with a Paint.
*/

public class BasicShape extends Picture {

   private Shape shape;
   private Paint paint;

   public BasicShape(Shape s, Paint p) {
      shape = s;
      paint = p;
   }

   /** Apply transformation t to the shape and
       paint it with colour c, using graphics g2.
   */
   public void transDisplay
      (AffineTransform t, Graphics2D g2) {
      Shape newShape =
         t.createTransformedShape(shape);
      g2.setPaint(paint);
      g2.fill(newShape);
   }
}

⌨️ 快捷键说明

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