summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Kreise.inc
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Reference Architectures and Patterns/hjp5/examples/Kreise.inc
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Reference Architectures and Patterns/hjp5/examples/Kreise.inc')
-rw-r--r--Master/Reference Architectures and Patterns/hjp5/examples/Kreise.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/Master/Reference Architectures and Patterns/hjp5/examples/Kreise.inc b/Master/Reference Architectures and Patterns/hjp5/examples/Kreise.inc
new file mode 100644
index 0000000..2a413bf
--- /dev/null
+++ b/Master/Reference Architectures and Patterns/hjp5/examples/Kreise.inc
@@ -0,0 +1,17 @@
+/* Kreise.inc */
+
+public void paint(Graphics g)
+{
+ int r = 8;
+ int i, j;
+ int x, y;
+
+ for (i=1; i<=10; ++i) {
+ x = 150 - r * i;
+ y = (int) (40 + (i - 1) * 1.7321 * r);
+ for (j=1; j<=i; ++j) {
+ g.drawOval(x,y,2*r,2*r);
+ x += 2 * r;
+ }
+ }
+} \ No newline at end of file