/***************************************************************************
                            KImageEffect.m -  description
                             -------------------
    begin                : Fri Mar  8 13:55:08 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar  8 13:55:08 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <kdec/kde_KImageEffect.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KImageEffect.h>
#include <qtobjc/QColor.h>
#include <qtobjc/QImage.h>
#include <qtobjc/QSize.h>


@implementation  KImageEffect

- (void *) qt
{
	return _qt;
}

- setQt: (void *) qt
{
	_qt = qt;
	return self;
}

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

- setAllocatedInObjcWorld: (BOOL) yn
{
	_allocatedInObjcWorld = yn;
	return self;
}


+ (QImage*) gradient: (QSize *)size ca: (QColor *)ca cb: (QColor *)cb type: (int)type ncols: (int)ncols
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_gradient((qt_QSize *) [size qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)type, (int)ncols) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) gradient: (QSize *)size ca: (QColor *)ca cb: (QColor *)cb type: (int)type 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_gradient((qt_QSize *) [size qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)type, 3) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) unbalancedGradient: (QSize *)size ca: (QColor *)ca cb: (QColor *)cb type: (int)type xfactor: (int)xfactor yfactor: (int)yfactor ncols: (int)ncols
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_unbalancedGradient((qt_QSize *) [size qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)type, (int)xfactor, (int)yfactor, (int)ncols) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) unbalancedGradient: (QSize *)size ca: (QColor *)ca cb: (QColor *)cb type: (int)type 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_unbalancedGradient((qt_QSize *) [size qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)type, 100, 100, 3) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) blendColor: (QColor *)clr dst: (QImage *)dst opacity: (float)opacity
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_blend((qt_QColor *) [clr qt], (qt_QImage *) [dst qt], (float)opacity) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) blend: (QImage *)src dst: (QImage *)dst opacity: (float)opacity
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_blend1((qt_QImage *) [src qt], (qt_QImage *) [dst qt], (float)opacity) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) blend: (QImage *)image initial_intensity: (float)initial_intensity bgnd: (QColor *)bgnd eff: (int)eff anti_dir: (BOOL)anti_dir
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_blend2((qt_QImage *) [image qt], (float)initial_intensity, (qt_QColor *) [bgnd qt], (int)eff, (int)anti_dir) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) blend: (QImage *)image initial_intensity: (float)initial_intensity bgnd: (QColor *)bgnd eff: (int)eff 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_blend2((qt_QImage *) [image qt], (float)initial_intensity, (qt_QColor *) [bgnd qt], (int)eff, 0) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) blend: (QImage *)image1 image2: (QImage *)image2 gt: (int)gt xf: (int)xf yf: (int)yf
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_blend3((qt_QImage *) [image1 qt], (qt_QImage *) [image2 qt], (int)gt, (int)xf, (int)yf) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) blend: (QImage *)image1 image2: (QImage *)image2 gt: (int)gt 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_blend3((qt_QImage *) [image1 qt], (qt_QImage *) [image2 qt], (int)gt, 100, 100) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) blend: (QImage *)image1 image2: (QImage *)image2 blendImage: (QImage *)blendImage channel: (int)channel
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_blend4((qt_QImage *) [image1 qt], (qt_QImage *) [image2 qt], (qt_QImage *) [blendImage qt], (int)channel) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (BOOL) blend: (QImage *)upper lower: (QImage *)lower output: (QImage *)output
{
	return (BOOL) kde_KImageEffect_blend5((qt_QImage *) [upper qt], (qt_QImage *) [lower qt], (qt_QImage *) [output qt]);
}

+ (BOOL) blend: (int)x y: (int)y upper: (QImage *)upper lower: (QImage *)lower output: (QImage *)output
{
	return (BOOL) kde_KImageEffect_blend6((int)x, (int)y, (qt_QImage *) [upper qt], (qt_QImage *) [lower qt], (qt_QImage *) [output qt]);
}

+ (BOOL) blendOnLower: (int)x y: (int)y upper: (QImage *)upper lower: (QImage *)lower
{
	return (BOOL) kde_KImageEffect_blendOnLower((int)x, (int)y, (qt_QImage *) [upper qt], (qt_QImage *) [lower qt]);
}

+ (QImage*) channelIntensity: (QImage *)image percent: (float)percent channel: (int)channel
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_channelIntensity((qt_QImage *) [image qt], (float)percent, (int)channel) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) fade: (QImage *)img val: (float)val color: (QColor *)color
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_fade((qt_QImage *) [img qt], (float)val, (qt_QColor *) [color qt]) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) flatten: (QImage *)image ca: (QColor *)ca cb: (QColor *)cb ncols: (int)ncols
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_flatten((qt_QImage *) [image qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)ncols) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) flatten: (QImage *)image ca: (QColor *)ca cb: (QColor *)cb 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_flatten((qt_QImage *) [image qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], 0) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) hash: (QImage *)image lite: (int)lite spacing: (unsigned int)spacing
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_hash((qt_QImage *) [image qt], (int)lite, (unsigned int)spacing) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) hash: (QImage *)image 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_hash((qt_QImage *) [image qt], [KImageEffect NorthLite], 0) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) intensity: (QImage *)image percent: (float)percent
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_intensity((qt_QImage *) [image qt], (float)percent) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) modulate: (QImage *)image modImage: (QImage *)modImage reverse: (BOOL)reverse type: (int)type factor: (int)factor channel: (int)channel
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_modulate((qt_QImage *) [image qt], (qt_QImage *) [modImage qt], (int)reverse, (int)type, (int)factor, (int)channel) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) toGray: (QImage *)image fast: (BOOL)fast
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_toGray((qt_QImage *) [image qt], (int)fast) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) toGray: (QImage *)image 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_toGray((qt_QImage *) [image qt], 0) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) desaturate: (QImage *)image desat: (float)desat
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_desaturate((qt_QImage *) [image qt], (float)desat) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) desaturate: (QImage *)image 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_desaturate((qt_QImage *) [image qt], 0.3) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) contrast: (QImage *)image c: (int)c
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_contrast((qt_QImage *) [image qt], (int)c) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) dither: (QImage *)img palette: (QColor*)palette size: (int)size
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_dither((qt_QImage *) [img qt], (qt_QColor*) [palette qt], (int)size) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) selectedImage: (QImage *)img col: (QColor *)col
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_selectedImage((qt_QImage *) [img qt], (qt_QColor *) [col qt]) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ contrastHSV: (QImage *)img sharpen: (BOOL)sharpen
{
	kde_KImageEffect_contrastHSV((qt_QImage *) [img qt], (int)sharpen);
	return self;
}

+ contrastHSV: (QImage *)img 
{
	kde_KImageEffect_contrastHSV((qt_QImage *) [img qt], 1);
	return self;
}

+ normalize: (QImage *)img
{
	kde_KImageEffect_normalize((qt_QImage *) [img qt]);
	return self;
}

+ equalize: (QImage *)img
{
	kde_KImageEffect_equalize((qt_QImage *) [img qt]);
	return self;
}

+ threshold: (QImage *)img value: (unsigned int)value
{
	kde_KImageEffect_threshold((qt_QImage *) [img qt], (unsigned int)value);
	return self;
}

+ threshold: (QImage *)img 
{
	kde_KImageEffect_threshold((qt_QImage *) [img qt], 128);
	return self;
}

+ solarize: (QImage *)img factor: (double)factor
{
	kde_KImageEffect_solarize((qt_QImage *) [img qt], (double)factor);
	return self;
}

+ solarize: (QImage *)img 
{
	kde_KImageEffect_solarize((qt_QImage *) [img qt], 50.0);
	return self;
}

+ (QImage*) emboss: (QImage *)src
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_emboss((qt_QImage *) [src qt]) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) despeckle: (QImage *)src
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_despeckle((qt_QImage *) [src qt]) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) charcoal: (QImage *)src factor: (double)factor
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_charcoal((qt_QImage *) [src qt], (double)factor) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) charcoal: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_charcoal((qt_QImage *) [src qt], 50.0) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) rotate: (QImage *)src r: (int)r
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_rotate((qt_QImage *) [src qt], (int)r) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) sample: (QImage *)src w: (int)w h: (int)h
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_sample((qt_QImage *) [src qt], (int)w, (int)h) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) addNoise: (QImage *)src type: (int)type
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_addNoise((qt_QImage *) [src qt], (int)type) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) addNoise: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_addNoise((qt_QImage *) [src qt], [KImageEffect GaussianNoise]) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) blur: (QImage *)src factor: (double)factor
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_blur((qt_QImage *) [src qt], (double)factor) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) blur: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_blur((qt_QImage *) [src qt], 50.0) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) edge: (QImage *)src factor: (double)factor
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_edge((qt_QImage *) [src qt], (double)factor) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) edge: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_edge((qt_QImage *) [src qt], 50.0) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) implode: (QImage *)src factor: (double)factor background: (unsigned int)background
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_implode((qt_QImage *) [src qt], (double)factor, (unsigned int)background) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) implode: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_implode((qt_QImage *) [src qt], 30.0, 0xFFFFFFFF) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) oilPaint: (QImage *)src radius: (int)radius
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_oilPaint((qt_QImage *) [src qt], (int)radius) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) oilPaint: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_oilPaint((qt_QImage *) [src qt], 3) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) sharpen: (QImage *)src factor: (double)factor
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_sharpen((qt_QImage *) [src qt], (double)factor) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) sharpen: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_sharpen((qt_QImage *) [src qt], 30.0) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) spread: (QImage *)src amount: (unsigned int)amount
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_spread((qt_QImage *) [src qt], (unsigned int)amount) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) spread: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_spread((qt_QImage *) [src qt], 3) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) shade: (QImage *)src color_shading: (BOOL)color_shading azimuth: (double)azimuth elevation: (double)elevation
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_shade((qt_QImage *) [src qt], (int)color_shading, (double)azimuth, (double)elevation) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) shade: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_shade((qt_QImage *) [src qt], 1, 30.0, 30.0) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) swirl: (QImage *)src degrees: (double)degrees background: (unsigned int)background
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_swirl((qt_QImage *) [src qt], (double)degrees, (unsigned int)background) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) swirl: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_swirl((qt_QImage *) [src qt], 50.0, 0xFFFFFFFF) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) wave: (QImage *)src amplitude: (double)amplitude frequency: (double)frequency background: (unsigned int)background
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_wave((qt_QImage *) [src qt], (double)amplitude, (double)frequency, (unsigned int)background) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (QImage*) wave: (QImage *)src 
{
	return (QImage*) [QtSupport objectForQtKey: kde_KImageEffect_wave((qt_QImage *) [src qt], 25.0, 150.0, 0xFFFFFFFF) withClass: [QImage class] allocatedInObjcWorld: YES];
}

+ (int) VerticalGradient
{
	return (int) KIMAGEEFFECT_VerticalGradient;
}

+ (int) HorizontalGradient
{
	return (int) KIMAGEEFFECT_HorizontalGradient;
}

+ (int) DiagonalGradient
{
	return (int) KIMAGEEFFECT_DiagonalGradient;
}

+ (int) CrossDiagonalGradient
{
	return (int) KIMAGEEFFECT_CrossDiagonalGradient;
}

+ (int) PyramidGradient
{
	return (int) KIMAGEEFFECT_PyramidGradient;
}

+ (int) RectangleGradient
{
	return (int) KIMAGEEFFECT_RectangleGradient;
}

+ (int) PipeCrossGradient
{
	return (int) KIMAGEEFFECT_PipeCrossGradient;
}

+ (int) EllipticGradient
{
	return (int) KIMAGEEFFECT_EllipticGradient;
}

+ (int) Red
{
	return (int) KIMAGEEFFECT_Red;
}

+ (int) Green
{
	return (int) KIMAGEEFFECT_Green;
}

+ (int) Blue
{
	return (int) KIMAGEEFFECT_Blue;
}

+ (int) Gray
{
	return (int) KIMAGEEFFECT_Gray;
}

+ (int) All
{
	return (int) KIMAGEEFFECT_All;
}

+ (int) NorthLite
{
	return (int) KIMAGEEFFECT_NorthLite;
}

+ (int) NWLite
{
	return (int) KIMAGEEFFECT_NWLite;
}

+ (int) WestLite
{
	return (int) KIMAGEEFFECT_WestLite;
}

+ (int) SWLite
{
	return (int) KIMAGEEFFECT_SWLite;
}

+ (int) SouthLite
{
	return (int) KIMAGEEFFECT_SouthLite;
}

+ (int) SELite
{
	return (int) KIMAGEEFFECT_SELite;
}

+ (int) EastLite
{
	return (int) KIMAGEEFFECT_EastLite;
}

+ (int) NELite
{
	return (int) KIMAGEEFFECT_NELite;
}

+ (int) Intensity
{
	return (int) KIMAGEEFFECT_Intensity;
}

+ (int) Saturation
{
	return (int) KIMAGEEFFECT_Saturation;
}

+ (int) HueShift
{
	return (int) KIMAGEEFFECT_HueShift;
}

+ (int) Contrast
{
	return (int) KIMAGEEFFECT_Contrast;
}

+ (int) UniformNoise
{
	return (int) KIMAGEEFFECT_UniformNoise;
}

+ (int) GaussianNoise
{
	return (int) KIMAGEEFFECT_GaussianNoise;
}

+ (int) MultiplicativeGaussianNoise
{
	return (int) KIMAGEEFFECT_MultiplicativeGaussianNoise;
}

+ (int) ImpulseNoise
{
	return (int) KIMAGEEFFECT_ImpulseNoise;
}

+ (int) LaplacianNoise
{
	return (int) KIMAGEEFFECT_LaplacianNoise;
}

+ (int) PoissonNoise
{
	return (int) KIMAGEEFFECT_PoissonNoise;
}

+ (int) Rotate90
{
	return (int) KIMAGEEFFECT_Rotate90;
}

+ (int) Rotate180
{
	return (int) KIMAGEEFFECT_Rotate180;
}

+ (int) Rotate270
{
	return (int) KIMAGEEFFECT_Rotate270;
}

@end
