当前位置: 技术问答>java相关
图片数组的用法??我老是画不出图形来。
来源: 互联网 发布时间:2015-03-28
本文导语: private Image pImg[] = null; pImg[1] = createImage(300, 300); pImg[1] = image; //image是有图的 g.drawImage(pImg[1], 0, 0, this); | import java.awt.*; import java.awt.image.*; public class jwmem extends java.applet.Applet { ...
private Image pImg[] = null;
pImg[1] = createImage(300, 300);
pImg[1] = image; //image是有图的
g.drawImage(pImg[1], 0, 0, this);
pImg[1] = createImage(300, 300);
pImg[1] = image; //image是有图的
g.drawImage(pImg[1], 0, 0, this);
|
import java.awt.*;
import java.awt.image.*;
public class jwmem extends java.applet.Applet
{
Image i;
int width = 200;
int height = 200;
public void init()
{
int[] pixels = new int[width * height];
int c;
double radianConversion = Math.PI / 180.0;
for(int index = 0, y = 0; y
import java.awt.image.*;
public class jwmem extends java.applet.Applet
{
Image i;
int width = 200;
int height = 200;
public void init()
{
int[] pixels = new int[width * height];
int c;
double radianConversion = Math.PI / 180.0;
for(int index = 0, y = 0; y