EMMA Coverage Report (generated Wed Feb 13 07:49:24 ICT 2008)
[all classes][net.sourceforge.hiveboard.drawing]

COVERAGE SUMMARY FOR SOURCE FILE [ImageDrawingAction.java]

nameclass, %method, %block, %line, %
ImageDrawingAction.java100% (1/1)100% (3/3)100% (54/54)100% (11/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ImageDrawingAction100% (1/1)100% (3/3)100% (54/54)100% (11/11)
ImageDrawingAction (int, int, BufferedImage, ImageCompositor): void 100% (1/1)100% (38/38)100% (8/8)
getActionArea (): Rectangle 100% (1/1)100% (3/3)100% (1/1)
perform (BufferedImage): void 100% (1/1)100% (13/13)100% (2/2)

1//  Copyright 2004-2007 Jean-Francois Poilpret
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14 
15package net.sourceforge.hiveboard.drawing;
16 
17import java.awt.Rectangle;
18import java.awt.image.BufferedImage;
19 
20import net.sourceforge.hiveboard.util.ImageHolder;
21import net.sourceforge.hiveboard.util.RGBAImageHolder;
22 
23public class ImageDrawingAction implements DrawingAction
24{
25        public ImageDrawingAction(int x, int y, BufferedImage image, ImageCompositor compositor) 
26        {
27                _x = Math.max(0, x);
28                _y = Math.max(0, y);
29                _image.setImage(image);
30                _area = new Rectangle(_x, _y, image.getWidth(), image.getHeight());
31                _compositor = compositor;
32        }
33 
34        public void        perform(BufferedImage image)
35        {
36                _compositor.compose(_image.getImage(), image, _x, _y);
37        }
38        
39        public Rectangle        getActionArea()
40        {
41                return _area;
42        }
43 
44        final private int                                _x;
45        final private int                                _y;
46        final private ImageHolder                _image = new RGBAImageHolder();
47        final private Rectangle                        _area;
48        final private ImageCompositor        _compositor;
49}

[all classes][net.sourceforge.hiveboard.drawing]
EMMA 2.0.5312 (C) Vladimir Roubtsov