|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KPixmapEffect
public class KPixmapEffect
This class includes various pixmap-based graphical effects. Everything is static, so there is no need to create an instance of this class. You can just call the static methods. They are encapsulated here merely to provide a common namespace.
Field Summary | |
---|---|
static int |
Blue
|
static int |
CrossDiagonalGradient
|
static int |
DiagonalGradient
|
static int |
EastLite
|
static int |
EllipticGradient
|
static int |
Green
|
static int |
HorizontalGradient
|
static int |
NELite
|
static int |
NorthLite
|
static int |
NWLite
|
static int |
PipeCrossGradient
|
static int |
PyramidGradient
|
static int |
RectangleGradient
|
static int |
Red
|
static int |
SELite
|
static int |
SouthLite
|
static int |
SWLite
|
static int |
VerticalGradient
|
static int |
WestLite
|
Constructor Summary | |
---|---|
|
KPixmapEffect()
|
protected |
KPixmapEffect(java.lang.Class dummy)
|
Method Summary | |
---|---|
static KPixmap |
blend(KPixmap pixmap,
float initial_intensity,
org.kde.qt.QColor bgnd,
int eff)
|
static KPixmap |
blend(KPixmap pixmap,
float initial_intensity,
org.kde.qt.QColor bgnd,
int eff,
boolean anti_dir)
|
static KPixmap |
blend(KPixmap pixmap,
float initial_intensity,
org.kde.qt.QColor bgnd,
int eff,
boolean anti_dir,
int ncols)
Blends the provided pixmap into a background of the indicated color. |
static KPixmap |
channelIntensity(KPixmap pixmap,
float ratio,
int channel)
Modifies the intensity of a pixmap's RGB channel component. |
static KPixmap |
contrast(KPixmap pixmap,
int c)
Modifies the contrast of a pixmap. |
static KPixmap |
createTiled(KPixmap pixmap,
org.kde.qt.QSize size)
Creates a pixmap of a given size with the given pixmap. |
static KPixmap |
desaturate(KPixmap pixmap)
|
static KPixmap |
desaturate(KPixmap pixmap,
float desat)
Desaturates a pixmap. |
void |
dispose()
Delete the wrapped C++ instance ahead of finalize() |
static KPixmap |
dither(KPixmap pixmap,
org.kde.qt.QColor palette,
int size)
Dithers a pixmap using Floyd-Steinberg dithering for low-color situations. |
static KPixmap |
fade(KPixmap pixmap,
double val,
org.kde.qt.QColor color)
Fades a pixmap to a certain color. |
protected void |
finalize()
Deletes the wrapped C++ instance |
static KPixmap |
gradient(KPixmap pixmap,
org.kde.qt.QColor ca,
org.kde.qt.QColor cb,
int type)
|
static KPixmap |
gradient(KPixmap pixmap,
org.kde.qt.QColor ca,
org.kde.qt.QColor cb,
int type,
int ncols)
Creates a gradient from color a to color b of the specified type. |
static KPixmap |
hash(KPixmap pixmap)
|
static KPixmap |
hash(KPixmap pixmap,
int lite)
|
static KPixmap |
hash(KPixmap pixmap,
int lite,
int spacing)
|
static KPixmap |
hash(KPixmap pixmap,
int lite,
int spacing,
int ncols)
Builds a hash on any given pixmap. |
static KPixmap |
intensity(KPixmap pixmap,
float ratio)
Either brightens or dims a pixmap by a specified ratio. |
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
static KPixmap |
pattern(KPixmap pixmap,
org.kde.qt.QSize size,
org.kde.qt.QColor ca,
org.kde.qt.QColor cb)
|
static KPixmap |
pattern(KPixmap pixmap,
org.kde.qt.QSize size,
org.kde.qt.QColor ca,
org.kde.qt.QColor cb,
int ncols)
Creates a pattern from a pixmap. |
static KPixmap |
selectedPixmap(KPixmap pixmap,
org.kde.qt.QColor col)
Calculate a 'selected' pixmap, for instance a selected icon on the desktop. |
static KPixmap |
toGray(KPixmap pixmap)
|
static KPixmap |
toGray(KPixmap pixmap,
boolean fast)
Converts a pixmap to grayscale. |
static KPixmap |
unbalancedGradient(KPixmap pixmap,
org.kde.qt.QColor ca,
org.kde.qt.QColor cb,
int type)
|
static KPixmap |
unbalancedGradient(KPixmap pixmap,
org.kde.qt.QColor ca,
org.kde.qt.QColor cb,
int type,
int xfactor)
|
static KPixmap |
unbalancedGradient(KPixmap pixmap,
org.kde.qt.QColor ca,
org.kde.qt.QColor cb,
int type,
int xfactor,
int yfactor)
|
static KPixmap |
unbalancedGradient(KPixmap pixmap,
org.kde.qt.QColor ca,
org.kde.qt.QColor cb,
int type,
int xfactor,
int yfactor,
int ncols)
Creates an unbalanced gradient. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int VerticalGradient
public static final int HorizontalGradient
public static final int DiagonalGradient
public static final int CrossDiagonalGradient
public static final int PyramidGradient
public static final int RectangleGradient
public static final int PipeCrossGradient
public static final int EllipticGradient
public static final int Red
public static final int Green
public static final int Blue
public static final int NorthLite
public static final int NWLite
public static final int WestLite
public static final int SWLite
public static final int SouthLite
public static final int SELite
public static final int EastLite
public static final int NELite
Constructor Detail |
---|
protected KPixmapEffect(java.lang.Class dummy)
public KPixmapEffect()
Method Detail |
---|
public static KPixmap gradient(KPixmap pixmap, org.kde.qt.QColor ca, org.kde.qt.QColor cb, int type, int ncols)
pixmap
- The pixmap to process.ca
- Color a.cb
- Color b.type
- The type of gradient.ncols
- The number of colors to use when not running on a
truecolor display. The gradient will be dithered to this number of
colors. Pass 0 to prevent dithering.
public static KPixmap gradient(KPixmap pixmap, org.kde.qt.QColor ca, org.kde.qt.QColor cb, int type)
public static KPixmap unbalancedGradient(KPixmap pixmap, org.kde.qt.QColor ca, org.kde.qt.QColor cb, int type, int xfactor, int yfactor, int ncols)
pixmap
- The pixmap that should be written.ca
- Color a.cb
- Color b.type
- The type of gradient.xfactor
- The x decay length. Use a value between -200 and 200.yfactor
- The y decay length.ncols
- The number of colors. See #gradient.
public static KPixmap unbalancedGradient(KPixmap pixmap, org.kde.qt.QColor ca, org.kde.qt.QColor cb, int type, int xfactor, int yfactor)
public static KPixmap unbalancedGradient(KPixmap pixmap, org.kde.qt.QColor ca, org.kde.qt.QColor cb, int type, int xfactor)
public static KPixmap unbalancedGradient(KPixmap pixmap, org.kde.qt.QColor ca, org.kde.qt.QColor cb, int type)
public static KPixmap createTiled(KPixmap pixmap, org.kde.qt.QSize size)
pixmap
- This is the source pixmapsize
- The size the new pixmap should have.
public static KPixmap intensity(KPixmap pixmap, float ratio)
pixmap
- The pixmap to process.ratio
- The ratio to use. Use negative value to dim.
public static KPixmap channelIntensity(KPixmap pixmap, float ratio, int channel)
pixmap
- The pixmap to process.ratio
- value. Use negative value to dim.channel
- Which channel(s) should be modified
public static KPixmap blend(KPixmap pixmap, float initial_intensity, org.kde.qt.QColor bgnd, int eff, boolean anti_dir, int ncols)
pixmap
- The pixmap to process.initial_intensity
- this parameter takes values from -1 to 1:
bgnd
- Indicates the color of the background to blend in.eff
- Lets you choose what kind of blending you like.anti_dir
- Blend in the opposite direction (makes no much sense
with concentric blending effects).ncols
- The number of colors to dither the pixmap to. Only
used for 8 bpp pixmaps.
public static KPixmap blend(KPixmap pixmap, float initial_intensity, org.kde.qt.QColor bgnd, int eff, boolean anti_dir)
public static KPixmap blend(KPixmap pixmap, float initial_intensity, org.kde.qt.QColor bgnd, int eff)
public static KPixmap hash(KPixmap pixmap, int lite, int spacing, int ncols)
pixmap
- The pixmap to process.lite
- The hash faces the indicated lighting (cardinal poles)spacing
- How many unmodified pixels inbetween hashes.ncols
- The number of colors to dither the pixmap to.
Only used for 8 bpp pixmaps.
public static KPixmap hash(KPixmap pixmap, int lite, int spacing)
public static KPixmap hash(KPixmap pixmap, int lite)
public static KPixmap hash(KPixmap pixmap)
public static KPixmap pattern(KPixmap pixmap, org.kde.qt.QSize size, org.kde.qt.QColor ca, org.kde.qt.QColor cb, int ncols)
pixmap
- The pixmap to process.size
- The size of the returned pixmap. If size
is larger than
the original, the resulting pixmap will be tiled.ca
- Color a.cb
- Color b.ncols
- The number of colors to use. The image will be
dithered to this depth. Pass zero to prevent dithering.
public static KPixmap pattern(KPixmap pixmap, org.kde.qt.QSize size, org.kde.qt.QColor ca, org.kde.qt.QColor cb)
public static KPixmap fade(KPixmap pixmap, double val, org.kde.qt.QColor color)
pixmap
- The pixmap to process.val
- The strength of the effect. 0 <= val <= 1.color
- The color to blend to.
public static KPixmap toGray(KPixmap pixmap, boolean fast)
pixmap
- The pixmap to process.fast
- Set to true
in order to use a faster but non-photographic
quality algorithm. Appropriate for things such as toolbar icons.
public static KPixmap toGray(KPixmap pixmap)
public static KPixmap desaturate(KPixmap pixmap, float desat)
pixmap
- The pixmap to process.desat
- A value between 0 and 1 setting the degree of desaturation
public static KPixmap desaturate(KPixmap pixmap)
public static KPixmap contrast(KPixmap pixmap, int c)
pixmap
- The pixmap to process.c
- A contrast value between -255 and 255.
public static KPixmap dither(KPixmap pixmap, org.kde.qt.QColor palette, int size)
pixmap
- The pixmap to process.palette
- The color palette to use.size
- The size of the palette.
public static KPixmap selectedPixmap(KPixmap pixmap, org.kde.qt.QColor col)
pixmap
- the pixmap to selectcol
- the selected color, usually from QColorGroup.highlight().protected void finalize() throws java.lang.InternalError
finalize
in class java.lang.Object
java.lang.InternalError
public void dispose()
public boolean isDisposed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |