1 package com.hammurapi.jcapture;
2 
3 import java.awt.Point;
4 
5 import com.hammurapi.jcapture.VideoEncoder.Fragment.Frame.Shape;
6 
7 class ShapeImpl implements Shape {
8 
9 	static class ImageImpl implements Image {
10 
11 		MappedImage image;
12 		private boolean coversEverything;
13 
ImageImpl(MappedImage image, boolean coversEverything)14 		ImageImpl(MappedImage image, boolean coversEverything) {
15 			super();
16 			this.image = image;
17 			this.coversEverything = coversEverything;
18 		}
19 
20 		@Override
coversEverything()21 		public boolean coversEverything() {
22 			return coversEverything;
23 		}
24 
25 		@Override
getImage()26 		public MappedImage getImage() {
27 			return image;
28 		}
29 
30 	}
31 
32 	static class ImageReferenceImpl implements ImageReference {
33 
34 		private Image image;
35 
ImageReferenceImpl(Image image)36 		ImageReferenceImpl(Image image) {
37 			super();
38 			if (image==null) {
39 				throw new NullPointerException();
40 			}
41 			this.image = image;
42 		}
43 
44 		@Override
coversEverything()45 		public boolean coversEverything() {
46 			return image.coversEverything();
47 		}
48 
49 		@Override
getImage()50 		public Image getImage() {
51 			return image;
52 		}
53 
54 	}
55 
56 	private Point location;
57 	private ShapeContent content;
58 
ShapeImpl(Point location, ShapeContent content)59 	ShapeImpl(Point location, ShapeContent content) {
60 		super();
61 		this.location = location;
62 		this.content = content;
63 	}
64 
65 	@Override
getLocation()66 	public Point getLocation() {
67 		return location;
68 	}
69 
70 	@Override
getContent()71 	public ShapeContent getContent() {
72 		return content;
73 	}
74 
75 }
76