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

📄 transform.java

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

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

/** A Transform is a Picture that consists of
    another picture with an affine transformation
    applied to it.
*/ 

public class Transform extends Picture {

   private Picture pic;
   private AffineTransform trans;

   /** Create Picture consisting of picture p
       with tramsformation t applied to it.
   */
   public Transform(Picture p, AffineTransform t) {
      pic = p;
      trans = t;
   }

   /** Apply transformation t to this Transform picture,
       and display it using graphics g2.
   */
   public void transDisplay
      (AffineTransform t, Graphics2D g2) {
      AffineTransform combined =  new AffineTransform(t);
      combined.concatenate(trans);
      pic.transDisplay(combined, g2);
   }
}

⌨️ 快捷键说明

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