/***************************************************************************
                            KPixmapEffect.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_KPixmapEffect.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KPixmapEffect.h>
#include <kdeobjc/KPixmap.h>
#include <qtobjc/QColor.h>
#include <qtobjc/QSize.h>


@implementation  KPixmapEffect

- (void *) qt
{
	return _qt;
}

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

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

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


+ (KPixmap*) gradient: (KPixmap*)pixmap ca: (QColor *)ca cb: (QColor *)cb type: (int)type ncols: (int)ncols
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_gradient((kde_KPixmap*) [pixmap qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)type, (int)ncols) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) gradient: (KPixmap*)pixmap ca: (QColor *)ca cb: (QColor *)cb type: (int)type 
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_gradient((kde_KPixmap*) [pixmap qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)type, 3) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) unbalancedGradient: (KPixmap*)pixmap ca: (QColor *)ca cb: (QColor *)cb type: (int)type xfactor: (int)xfactor yfactor: (int)yfactor ncols: (int)ncols
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_unbalancedGradient((kde_KPixmap*) [pixmap qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)type, (int)xfactor, (int)yfactor, (int)ncols) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) unbalancedGradient: (KPixmap*)pixmap ca: (QColor *)ca cb: (QColor *)cb type: (int)type 
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_unbalancedGradient((kde_KPixmap*) [pixmap qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)type, 100, 100, 3) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) createTiled: (KPixmap*)pixmap size: (QSize *)size
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_createTiled((kde_KPixmap*) [pixmap qt], (qt_QSize *) [size qt]) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) intensity: (KPixmap*)pixmap ratio: (float)ratio
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_intensity((kde_KPixmap*) [pixmap qt], (float)ratio) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) channelIntensity: (KPixmap*)pixmap ratio: (float)ratio channel: (int)channel
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_channelIntensity((kde_KPixmap*) [pixmap qt], (float)ratio, (int)channel) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) blend: (KPixmap*)pixmap initial_intensity: (float)initial_intensity bgnd: (QColor *)bgnd eff: (int)eff anti_dir: (BOOL)anti_dir ncols: (int)ncols
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_blend((kde_KPixmap*) [pixmap qt], (float)initial_intensity, (qt_QColor *) [bgnd qt], (int)eff, (int)anti_dir, (int)ncols) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) blend: (KPixmap*)pixmap initial_intensity: (float)initial_intensity bgnd: (QColor *)bgnd eff: (int)eff 
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_blend((kde_KPixmap*) [pixmap qt], (float)initial_intensity, (qt_QColor *) [bgnd qt], (int)eff, 0, 3) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) hash: (KPixmap*)pixmap lite: (int)lite spacing: (unsigned int)spacing ncols: (int)ncols
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_hash((kde_KPixmap*) [pixmap qt], (int)lite, (unsigned int)spacing, (int)ncols) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) hash: (KPixmap*)pixmap 
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_hash((kde_KPixmap*) [pixmap qt], [KPixmapEffect NorthLite], 0, 3) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) pattern: (KPixmap*)pixmap size: (QSize *)size ca: (QColor *)ca cb: (QColor *)cb ncols: (int)ncols
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_pattern((kde_KPixmap*) [pixmap qt], (qt_QSize *) [size qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], (int)ncols) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) pattern: (KPixmap*)pixmap size: (QSize *)size ca: (QColor *)ca cb: (QColor *)cb 
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_pattern((kde_KPixmap*) [pixmap qt], (qt_QSize *) [size qt], (qt_QColor *) [ca qt], (qt_QColor *) [cb qt], 8) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) fade: (KPixmap*)pixmap val: (double)val color: (QColor *)color
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_fade((kde_KPixmap*) [pixmap qt], (double)val, (qt_QColor *) [color qt]) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) toGray: (KPixmap*)pixmap fast: (BOOL)fast
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_toGray((kde_KPixmap*) [pixmap qt], (int)fast) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) toGray: (KPixmap*)pixmap 
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_toGray((kde_KPixmap*) [pixmap qt], 0) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) desaturate: (KPixmap*)pixmap desat: (float)desat
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_desaturate((kde_KPixmap*) [pixmap qt], (float)desat) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) desaturate: (KPixmap*)pixmap 
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_desaturate((kde_KPixmap*) [pixmap qt], 0.3) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) contrast: (KPixmap*)pixmap c: (int)c
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_contrast((kde_KPixmap*) [pixmap qt], (int)c) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) dither: (KPixmap*)pixmap palette: (QColor*)palette size: (int)size
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_dither((kde_KPixmap*) [pixmap qt], (qt_QColor*) [palette qt], (int)size) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

+ (KPixmap*) selectedPixmap: (KPixmap*)pixmap col: (QColor *)col
{
	return (KPixmap*) [QtSupport objectForQtKey: kde_KPixmapEffect_selectedPixmap((kde_KPixmap*) [pixmap qt], (qt_QColor *) [col qt]) withClass: [KPixmap class] allocatedInObjcWorld: YES];
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@end
