Coverage report

| %line | %branch
--- | --- | ---
tsukuba_bunko.peko.canvas.stage.effect.MofingEffect |
0% |
0% |

1 |  |
     /*
2 |  |
      * "Peko" Visual Novel System
3 |  |
      *
4 |  |
      * All Rights Reserved.
5 |  |
      * Copyright (c) 1999-2003 Tsukuba Bunko.
6 |  |
      *
7 |  |
      * $Id: MofingEffect.java,v 1.1 2005/07/11 12:49:18 ppoi Exp $
8 |  |
      */
9 |  |
     package tsukuba_bunko.peko.canvas.stage.effect;
10 |  |
11 |  |
     import	java.awt.AlphaComposite;
12 |  |
     import	java.awt.Graphics2D;
13 |  |
14 |  |
     import	java.awt.image.BufferedImage;
15 |  |
     import	java.awt.image.ImageObserver;
16 |  |
17 |  |
     import	tsukuba_bunko.peko.canvas.stage.Effect;
18 |  |
19 |  |
20 |  |
     /**
21 |  |
      * "モーフィング" エフェクトです。
22 |  |
      * @author	$Author: ppoi $
23 |  |
      * @version	$Revision: 1.1 $
24 |  |
      */
25 |  |
     public class MofingEffect	extends Effect	{
26 |  |
27 |  |
     	/**
28 |  |
     	 * alpha-composites
29 |  |
     	 */
30 | 0 |
     	private static AlphaComposite[]	_composites = new AlphaComposite[5];
31 |  |
     	static	{
32 | 0 |
     		_composites[4] = AlphaComposite.SrcOver;
33 | 0 |
     		_composites[3] = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.8f );
34 | 0 |
     		_composites[2] = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.4f );
35 | 0 |
     		_composites[1] = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.2f );
36 | 0 |
     		_composites[0] = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.1f );
37 | 0 |
     	}
38 |  |
39 |  |
40 |  |
     	/**
41 |  |
     	 * <code>MofingEffect</code> のインスタンスを作成します。
42 |  |
     	 */
43 |  |
     	public MofingEffect()
44 |  |
     	{
45 | 0 |
     		super();
46 | 0 |
     	}
47 |  |
48 |  |
49 |  |
     	/**
50 |  |
     	 * エフェクト名 "mofing" を取得します。
51 |  |
     	 * @return	エフェクト名
52 |  |
     	 */
53 |  |
     	public String getName()
54 |  |
     	{
55 | 0 |
     		return "mofing";
56 |  |
     	}
57 |  |
58 |  |
59 |  |
     	/**
60 |  |
     	 */
61 |  |
     	protected void perform( BufferedImage screen, BufferedImage next )
62 |  |
     	{
63 | 0 |
     		ImageObserver	observer = getStageCanvas();
64 |  |
65 | 0 |
     		Graphics2D	g2 = screen.createGraphics();
66 | 0 |
     		AlphaComposite[]	composites = _composites;
67 | 0 |
     		int	size = composites.length;
68 | 0 |
     		for( int i = 0; i < size; ++i )	{
69 | 0 |
     			g2.setComposite( composites[i] );
70 | 0 |
     			g2.drawImage( next, 0, 0, observer );
71 | 0 |
     			drawImage( screen );
72 |  |
     		}
73 | 0 |
     	}
74 |  |
     }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.