|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.chart.util.PaintAlpha
public class PaintAlpha
This class contains static methods for the manipulation
of objects of type Paint
The intention is to honour the alpha-channel in the process.
PaintAlpha was originally conceived to improve the
rendering of 3D Shapes with transparent colours and to allow
invisible bars by making them completely transparent.
In, for example
StackedBarRenderer3D,
bars are rendered with 6 faces. The front face is rendered with
the Paint requested. The other 5 faces are rendered
darker to achieve the 3D effect.
Previously Color.darker() was used for this,
which always returns an opaque colour.
Additionally there are methods to control the behaviour and
in particular a cloneImage(..)
method which is needed to darken objects of type TexturePaint.
| Constructor Summary | |
|---|---|
PaintAlpha()
|
|
| Method Summary | |
|---|---|
static BufferedImage |
cloneImage(BufferedImage image)
Clone a BufferedImage. |
static Paint |
darker(Paint paint)
Create a new (if possible, darker) Paint of the same Type. |
static boolean |
setLegacyAlpha(boolean legacyAlpha)
Per default PaintAlpha will try to honour alpha-channel
information. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PaintAlpha()
| Method Detail |
|---|
public static boolean setLegacyAlpha(boolean legacyAlpha)
PaintAlpha will try to honour alpha-channel
information. In the past this was not the case.
If you wish legacy functionality for your application you can request
this here.
legacyAlpha - boolean
public static Paint darker(Paint paint)
Paint of the same Type.
If the Type is not supported, the original Paint is returned.
paint - a Paint implementation
(e.g. Color, GradientPaint, TexturePaint,..)
Paintpublic static BufferedImage cloneImage(BufferedImage image)
BufferedImage.
Note: when constructing the clone, the original Colour Model Object is
reused.
That keeps things simple & should not be a problem, as all
known Colour Models
(IndexColorModel,
DirectColorModel,
ComponentColorModel) are
immutable.
image - original BufferedImage to clone
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||