summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Kopieren.inc
blob: d60eb1568d91b053af18c3165dc27b50ab73ce98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* Kopieren.inc */

public void paint(Graphics g)
{
  int xorg = 4;
  int yorg = 28;
  int[] arx = {0,6,6,2,2,4,4,0,0};
  int[] ary = {0,0,6,6,4,4,2,2,8};
  for (int i = 0; i < arx.length; ++i) {
    arx[i] += xorg;
    ary[i] += yorg;
  }
  g.drawPolyline(arx,ary,arx.length);
  for (int x = 0; x <= 300; x += 8) {
    for (int y = 0; y <= 160; y += 8) {
      if (x != 0 || y != 0) {
        g.copyArea(xorg,yorg,8,8,x,y);
      }
    }
  }
}