#include <kglimageviewer.h>
Public Member Functions | |
KGLImage () | |
int | width () const |
int | height () const |
int | basicWidth () const |
int | basicHeight () const |
float | alpha () const |
bool | hasAlpha () const |
void | setInternalColor (const QColor color) |
QColor | color () const |
float | brightness () const |
float | position (Axis a) const |
float | rotation (Axis a) const |
float | scaleFactor (Axis a) const |
GLuint | glObject () const |
uint | id () const |
KGLImageViewer * | parent () const |
bool | isShown () const |
void | show (bool update=true) |
void | hide (bool update=true) |
void | rotate (Axis a, float degrees, int msecs=0) |
void | rotate (float xDegrees, float yDegrees, float zDegrees, bool update=true) |
void | rotateTo (Axis a, float degrees, int msecs=0) |
void | rotateTo (float xDegrees, float yDegrees, float zDegrees, bool update=true) |
float | scale (Axis a, float percent, int msecs=0) |
void | scale (float xPercent, float yPercent, bool update=true) |
float | scaleTo (Axis a, float percent, int msecs=0, bool viewRelative=false, float assumedViewScale=-1.0) |
void | scaleTo (float xPercent, float yPercent, bool update=true, bool viewRelative=false, float assumedViewScaleX=-1.0, float assumedViewScaleY=-1.0) |
void | move (Axis a, float percent, int msecs=0) |
void | move (float xPercent, float yPercent, float zPercent, bool update=true) |
void | moveTo (Axis a, float percent, int msecs=0) |
void | moveTo (float xPercent, float yPercent, float zPercent, bool update=true) |
void | setAlpha (float percent, int msecs=0) |
void | tint (const QColor &color, int msecs=0) |
void | setBrightness (float percent, int msecs=0) |
void | boxBlur (float factor, int msecs=0) |
void | tunnel (float factor, int msecs=0) |
void | blur (float factor, int msecs=0, int type=0) |
float | blurrage () |
void | setClipRect (int x, int y, int w, int h, bool update=true) |
void | setClipRect (QRect &r, bool update=true) |
void | setClipping (bool enabled=true) |
bool | hasClipping () const |
void | invert (bool inverted=true, bool update=true) |
bool | isInverted () |
void | resize (int width, int height, int msecs=0, float assumedViewScaleX=-1.0, float assumedViewScaleY=-1.0) |
void | addShader (GLhandleARB shader, bool linkProgram=true, bool update=true) |
void | addShader (QString file, GLenum shaderType, bool linkProgram=true, bool update=true) |
void | removeShader (GLhandleARB shader, bool relinkProgram=true, bool update=true) |
GLhandleARB | shaderProgram () |
void | setShaderProgram (KGLImage &img) |
ShaderList & | shaders () |
void | setShaderUniform (const int var, const int varSize, const float val1, const float val2=0.0, const float val3=0.0, const float val4=0.0) |
int | setShaderUniform (QString var, const int varSize, const float val1, const float val2=0.0, const float val3=0.0, const float val4=0.0) |
Protected Member Functions | |
void | paint () |
Friends | |
class | KGLImageViewer |
|
An empty constructor to make QValueList happy -- !! DON'T USE IT !! |
|
Convenience function. Calls addShader(KGLImageViewer::loadShader(file, shaderType), relinkProgram, update); |
|
Adds a shader to the images pipeline
|
|
Returns the current alpha level of the image |
|
Returns the original height of the image in pixles |
|
Returns the original width of the image in pixles |
|
|
|
|
|
Blur the image
(Qt4) Blurring is pretty fast (as it's performed spatial), at least for not too big kernels. And accurate "enough" (though it's not like blurring with "The GIMP", but that's not the approach here) (Qt4) if you pass "1" as blur type, a ceter motion blur is performed instead of a boxblur (i.e. the image blurs more to the edges and keeps sharp in the center). This function is O(1/2 * O(glScale) / O(glTranform)) compared to the boxblur (but of course a different effect) Blur functions ARE EXCLUSIVE (i.e. you cannot perform a boxblur on top of the motion blur - at least for the moment) |
|
Returns the current brightness of the image |
|
Returns the current tint color of the image |
|
Returns the OpenGL index of this image |
|
Whether the Image has an alpha channel |
|
|
|
Returns the current onscreen pixelheight |
|
Set the image to be hidden
|
|
|
|
|
|
|
|
Whether the image is shown |
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns the current position of the image on axis a |
|
Removes a shader from the images pipeline
|
|
|
|
Rotate the image around all three axes (accumulating)
|
|
Rotate the image by some degrees (accumulating)
|
|
Rotate the image around all three axes (NOT accumulative)
|
|
Rotate the image to demanded degrees (NOT accumulative)
|
|
Returns the current rotation of the image (degrees, may be negative) |
|
Scale the image along the X and Y axis by some percent (accumulating)
|
|
Scale the image by some percent (accumulating)
|
|
Returns the current scale of the image (percent, allways positive) |
|
|
|
Scale the image along given axis to some percent (NOT accumulating)
|
|
|
|
|
|
|
|
|
|
|
|
Sets the internal color.
|
|
Sets the images shader program to the program of another image WARNING: The two images will then share the same shader program and a modification on one will affect the other as well
|
|
Overloaded for convenience - queries the id for the variable string and sets the variable value |
|
Set a uniform variable you may need in your shader.
|
|
The shader program (collection of shaders) for this image (may be zero if no shader was added) |
|
A QList containig all shaders that are atached to this image |
|
Set the image to be shown
|
|
|
|
See boxBlur() |
|
Returns the current onscreen pixelwidth |
|
|