Skip to content

Package: PaintOp

PaintOp

nameinstructionbranchcomplexitylinemethod
PaintOp(Graphics2D, Point)
M: 8 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
PaintOp(Graphics2D, Point, PreviewSettings)
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
PaintOp(Graphics2D, int, int)
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
PaintOp(Graphics2D, int, int, PreviewSettings)
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
PaintOp(Graphics2D, int, int, PreviewSettings, ImageObserver)
M: 0 C: 10
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
PaintOp(Graphics2D, int, int, int, int, PreviewSettings, ImageObserver)
M: 0 C: 11
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
PaintOp(Graphics2D, int, int, int, int, Quality, PreviewSettings, ImageObserver)
M: 0 C: 27
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 10
100%
M: 0 C: 1
100%
getGraphics2D()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getH()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getImageObserver()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPreviewSettings()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getQuality()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getW()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getX()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getY()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
toString()
M: 0 C: 12
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /*
2: * *********************************************************************************************************************
3: *
4: * Mistral: open source imaging engine
5: * http://tidalwave.it/projects/mistral
6: *
7: * Copyright (C) 2003 - 2023 by Tidalwave s.a.s. (http://tidalwave.it)
8: *
9: * *********************************************************************************************************************
10: *
11: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
12: * the License. You may obtain a copy of the License at
13: *
14: * http://www.apache.org/licenses/LICENSE-2.0
15: *
16: * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
17: * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations under the License.
19: *
20: * *********************************************************************************************************************
21: *
22: * git clone https://bitbucket.org/tidalwave/mistral-src
23: * git clone https://github.com/tidalwave-it/mistral-src
24: *
25: * *********************************************************************************************************************
26: */
27: package it.tidalwave.image.op;
28:
29: import java.awt.Graphics2D;
30: import java.awt.Point;
31: import java.awt.image.ImageObserver;
32: import it.tidalwave.image.Quality;
33: import it.tidalwave.image.render.PreviewSettings;
34:
35: /***********************************************************************************************************************
36: *
37: * @author Fabrizio Giudici
38: *
39: **********************************************************************************************************************/
40: public class PaintOp extends Operation
41: {
42: private final int x;
43: private final int y;
44: private final int w;
45: private final int h;
46: private final Graphics2D g2;
47: private final Quality quality;
48: private final PreviewSettings previewSettings;
49: private final ImageObserver imageObserver;
50:
51: /*******************************************************************************************************************
52: *
53: *
54: ******************************************************************************************************************/
55: public PaintOp (final Graphics2D g2, final int x, final int y, final int w, final int h, final Quality quality,
56: final PreviewSettings previewSettings, final ImageObserver imageObserver)
57: {
58: this.x = x;
59: this.y = y;
60: this.w = w;
61: this.h = h;
62: this.g2 = g2;
63: this.quality = quality;
64: this.previewSettings = previewSettings;
65: this.imageObserver = imageObserver;
66: }
67:
68: /*******************************************************************************************************************
69: *
70: *
71: ******************************************************************************************************************/
72: public PaintOp (final Graphics2D g2, final int x, final int y, final int w, final int h,
73: final PreviewSettings previewSettings, final ImageObserver imageObserver)
74: {
75: this(g2, x, y, w, h, Quality.FASTEST, previewSettings, imageObserver);
76: }
77:
78: /*******************************************************************************************************************
79: *
80: *
81: ******************************************************************************************************************/
82: public PaintOp (final Graphics2D g2, final int x, final int y, final PreviewSettings previewSettings,
83: final ImageObserver imageObserver)
84: {
85: this(g2, x, y, 0, 0, previewSettings, imageObserver);
86: }
87:
88: /*******************************************************************************************************************
89: *
90: *
91: ******************************************************************************************************************/
92: public PaintOp (final Graphics2D g2, final int x, final int y, final PreviewSettings previewSettings)
93: {
94: this(g2, x, y, 0, 0, previewSettings, null);
95: }
96:
97: /*******************************************************************************************************************
98: *
99: *
100: ******************************************************************************************************************/
101: public PaintOp (final Graphics2D g2, final Point position, final PreviewSettings previewSettings)
102: {
103: this(g2, position.x, position.y, previewSettings);
104: }
105:
106: /*******************************************************************************************************************
107: *
108: *
109: ******************************************************************************************************************/
110: public PaintOp (final Graphics2D g2, final int x, final int y)
111: {
112: this(g2, x, y, 0, 0, null, null);
113: }
114:
115: /*******************************************************************************************************************
116: *
117: *
118: ******************************************************************************************************************/
119: public PaintOp (final Graphics2D g2, final Point position)
120: {
121: this(g2, position.x, position.y);
122: }
123:
124: /*******************************************************************************************************************
125: *
126: *
127: ******************************************************************************************************************/
128: public int getX()
129: {
130: return x;
131: }
132:
133: /*******************************************************************************************************************
134: *
135: *
136: ******************************************************************************************************************/
137: public int getY()
138: {
139: return y;
140: }
141:
142: /*******************************************************************************************************************
143: *
144: *
145: ******************************************************************************************************************/
146: public int getW()
147: {
148: return w;
149: }
150:
151: /*******************************************************************************************************************
152: *
153: *
154: ******************************************************************************************************************/
155: public int getH()
156: {
157: return h;
158: }
159:
160: /*******************************************************************************************************************
161: *
162: *
163: ******************************************************************************************************************/
164: public Graphics2D getGraphics2D()
165: {
166: return g2;
167: }
168:
169: /*******************************************************************************************************************
170: *
171: *
172: ******************************************************************************************************************/
173: public Quality getQuality()
174: {
175: return quality;
176: }
177:
178: /*******************************************************************************************************************
179: *
180: *
181: ******************************************************************************************************************/
182: public PreviewSettings getPreviewSettings()
183: {
184: return previewSettings;
185: }
186:
187: /*******************************************************************************************************************
188: *
189: *
190: ******************************************************************************************************************/
191: public ImageObserver getImageObserver()
192: {
193: return imageObserver;
194: }
195:
196: /*******************************************************************************************************************
197: *
198: * {@inheritDoc}
199: *
200: ******************************************************************************************************************/
201: @Override
202: public String toString()
203: {
204: return "PaintOp(x:" + x + ", y:" + y + ", w:" + w + ", h:" + h + ", " + quality + ")";
205: }
206: }