File: TransparencyInformation.java

package info (click to toggle)
java-imaging-utilities 0.14.2%2B3-4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 2,304 kB
  • ctags: 3,737
  • sloc: java: 31,190; sh: 238; xml: 30; makefile: 19
file content (55 lines) | stat: -rw-r--r-- 1,693 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * TransparencyInformation
 *
 * Copyright (c) 2001, 2002, 2003 Marco Schmidt.
 * All rights reserved.
 */

package net.sourceforge.jiu.data;

import net.sourceforge.jiu.data.IntegerImage;

/**
 * An interface that represents transparency information which may be
 * available for a pixel image.
 * Transparency information describes how an image is supposed to be 
 * drawn on a pixel background (e.g. another image).
 * That way, irregularly shaped images can easily be handled by excluding
 * those pixels of a rectangular image that are not part of the image.
 * @author Marco Schmidt
 */
public interface TransparencyInformation
{
	/**
	 * Returns an image object that contains an alpha channel.
	 * The first channel of that image is supposed to be the alpha channel.
	 * @return the alpha channel image object
	 * @see #setAlphaChannelImage
	 */
	IntegerImage getAlphaChannelImage();

	/**
	 * If there is a transparency index, this method returns it.
	 * Otherwise, the return value is undefined.
	 * @return transparency index
	 * @see #setTransparencyIndex
	 */
	Integer getTransparencyIndex();

	/**
	 * Set a new alpha channel image object.
	 * @see #getAlphaChannelImage
	 */
	void setAlphaChannelImage(IntegerImage newImage);

	/**
	 * Set a new transparency value.
	 * Can be <code>null</code>.
	 * However, if the value is non-null, it must encapsulate an
	 * integer number which is 0 or larger.
	 * @param newValue new transparency index
	 * @see #getAlphaChannelImage
	 * @throws IllegalArgumentException if the argument is non-null and contains a negative value
	 */
	void setTransparencyIndex(Integer newValue);
}