From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../hjp5/examples/Clipping.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Master/Reference Architectures and Patterns/hjp5/examples/Clipping.inc (limited to 'Master/Reference Architectures and Patterns/hjp5/examples/Clipping.inc') diff --git a/Master/Reference Architectures and Patterns/hjp5/examples/Clipping.inc b/Master/Reference Architectures and Patterns/hjp5/examples/Clipping.inc new file mode 100644 index 0000000..85e6f36 --- /dev/null +++ b/Master/Reference Architectures and Patterns/hjp5/examples/Clipping.inc @@ -0,0 +1,20 @@ +/* Clipping.inc */ + +public void paint(Graphics g) +{ + int[] arx = {150,175,200,150}; + int[] ary = {100,150,100,100}; + + g.setClip(50,50,150,80); + //---J + g.fillRect(70,40,20,80); + g.fillArc(30,90,60,60,225,180); + //---a + g.fillOval(100,100,40,50); + g.fillRect(120,100,20,50); + //---v + g.fillPolygon(arx,ary,arx.length); + //---a + g.fillOval(210,100,40,50); + g.fillRect(230,100,20,50); +} \ No newline at end of file -- cgit v1.2.3