?? matriximage.java
字號:
/* * To change this template, choose Tools | Templates * and open the template in the editor. *//** * * @author Administrator */// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html// Decompiler options: packimports(3) fieldsfirst ansi // Source File Name: MatrixImageimport javax.microedition.lcdui.Graphics;class MatrixImage{ public int width; public int height; public int matrix[][]; MatrixImage(int i, int j) { width = i; height = j; matrix = new int[i][j]; } public MatrixImage crop(int i, int j, int k, int l) { MatrixImage matriximage = new MatrixImage(k, l); for(int i1 = 0; i1 < k; i1++) { for(int j1 = 0; j1 < l; j1++) matriximage.matrix[i1][j1] = matrix[i + i1][j + j1]; } return matriximage; } public void setColor(int i, int j, int k) { matrix[i][j] = k; } public void paint(Graphics g, int i, int j) { for(int k = 0; k < width; k++) { for(int l = 0; l < height; l++) if(matrix[k][l] != -1) { g.setColor(matrix[k][l]); g.drawRect(i + k, j + l, 1, 1); } } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -