org.kde.koala
public class KIconEffect extends Object implements QtSupport
See Also: KIcon
UNKNOWN: Applies effects to icons.
Field Summary | |
---|---|
static int | Colorize |
static int | DeSaturate |
static int | LastEffect |
static int | NoEffect
This is the enumeration of all possible icon effects.
|
static int | ToGamma |
static int | ToGray |
static int | ToMonochrome |
Constructor Summary | |
---|---|
protected | KIconEffect(Class dummy) |
KIconEffect()
Create a new KIconEffect. |
Method Summary | |
---|---|
QImage | apply(QImage src, int group, int state)
Applies an effect to an image. |
QImage | apply(QImage src, int effect, float value, QColor rgb, boolean trans)
Applies an effect to an image. |
QImage | apply(QImage src, int effect, float value, QColor rgb, QColor rgb2, boolean trans) |
QPixmap | apply(QPixmap src, int group, int state)
Applies an effect to a pixmap. |
QPixmap | apply(QPixmap src, int effect, float value, QColor rgb, boolean trans)
Applies an effect to a pixmap. |
QPixmap | apply(QPixmap src, int effect, float value, QColor rgb, QColor rgb2, boolean trans) |
static void | colorize(QImage image, QColor col, float value)
Colorizes an image with a specific color. |
static void | deSaturate(QImage image, float value)
Desaturates an image. |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
QImage | doublePixels(QImage src)
Returns an image twice as large, consisting of 2x2 pixels. |
protected void | finalize() Deletes the wrapped C++ instance |
String | fingerprint(int group, int state)
Returns a fingerprint for the effect by encoding
the given group and state into a String. |
boolean | hasEffect(int group, int state)
Tests whether an effect has been configured for the given icon group. |
void | init()
Rereads configuration. |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
static void | overlay(QImage src, QImage overlay)
Overlays an image with an other image. |
static void | semiTransparent(QImage image)
Renders an image semi-transparent. |
static void | semiTransparent(QPixmap pixmap)
Renders a pixmap semi-transparent. |
static void | toGamma(QImage image, float value)
Changes the gamma value of an image. |
static void | toGray(QImage image, float value)
Tints an image gray. |
static void | toMonochrome(QImage image, QColor black, QColor white, float value)
Produces a monochrome icon with a given foreground and background color |
static void | visualActivate(QWidget widget, QRect rect)
Provides visual feedback to show activation of an icon on a widget.
|
UNKNOWN: Create a new KIconEffect.
group
and state
parameters, and is configured by the user.Parameters: src The image. group The group for the icon, see KIcon.Group state The icon's state, see KIcon.States
Returns: An image with the effect applied.
UNKNOWN: Applies an effect to an image.
Parameters: src The image. effect The effect to apply, one of KIconEffect.Effects. value Strength of the effect. 0 <= value
<= 1. rgb Color parameter for effects that need one. trans Add Transparency if trans = true.
Returns: An image with the effect applied.
UNKNOWN: Applies an effect to an image.
UNKNOWN:
Parameters: src The pixmap. group The group for the icon, see KIcon.Group state The icon's state, see KIcon.States
Returns: A pixmap with the effect applied.
UNKNOWN: Applies an effect to a pixmap.
Parameters: src The pixmap. effect The effect to apply, one of KIconEffect.Effects. value Strength of the effect. 0 <= value
<= 1. rgb Color parameter for effects that need one. trans Add Transparency if trans = true.
Returns: A pixmap with the effect applied.
UNKNOWN: Applies an effect to a pixmap.
UNKNOWN:
Parameters: image The image col The color with which the image
is tinted value Strength of the effect. 0 <= value
<= 1
UNKNOWN: Colorizes an image with a specific color.
Parameters: image The image value Strength of the effect. 0 <= value
<= 1
UNKNOWN: Desaturates an image.
Parameters: src the image.
Returns: the scaled image.
UNKNOWN: Returns an image twice as large, consisting of 2x2 pixels.
group
and state
into a String. This
is useful for caching.Parameters: group the group, see KIcon.Group state the state, see KIcon.States
Returns: the fingerprint of the given group
+state
UNKNOWN: Returns a fingerprint for the effect by encoding the given group
and state
into a String.
Parameters: group the group to check, see KIcon.Group state the state to check, see KIcon.States
Returns: true if an effect is configured for the given group
in state
, otherwise false.
See Also: KIcon#Group KIcon#States
UNKNOWN: Tests whether an effect has been configured for the given icon group.
UNKNOWN: Rereads configuration.
Parameters: src The image overlay The image to overlay src
with
UNKNOWN: Overlays an image with an other image.
Parameters: image The image
UNKNOWN: Renders an image semi-transparent.
Parameters: pixmap The pixmap
UNKNOWN: Renders a pixmap semi-transparent.
Parameters: image The image value Strength of the effect. 0 <= value
<= 1
UNKNOWN: Changes the gamma value of an image.
Parameters: image The image value Strength of the effect. 0 <= value
<= 1
UNKNOWN: Tints an image gray.
Parameters: image The image white The color with which the white parts of image
are painted black The color with which the black parts of image
are painted value Strength of the effect. 0 <= value
<= 1
UNKNOWN: Produces a monochrome icon with a given foreground and background color
Parameters: widget The widget on which the effect should be painted rect This rectangle defines the effect's borders
UNKNOWN: Provides visual feedback to show activation of an icon on a widget.