26#include <QtCore/QDebug>
27#include <QtGui/QImage>
28#include <QtCore/QPoint>
29#include <QtCore/QSize>
186 if( args.size() == 3)
188 QSize
arg0 = KJSEmbed::extractVariant<QSize>(exec,args, 0);
194 else if( args.size() == 4)
225 QImage
arg0 = KJSEmbed::extractVariant<QImage>(exec,args, 0);
251 QPoint
arg0 = KJSEmbed::extractVariant<QPoint>(exec,args, 0);
258 uint
arg2 = KJSEmbed::extractVariant<uint>(exec,args, 2);
282 {
"allGray", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callallGray},
283 {
"alphaChannel", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callalphaChannel},
284 {
"copy", 4, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callcopy},
285 {
"createAlphaMask", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callcreateAlphaMask},
286 {
"createHeuristicMask", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callcreateHeuristicMask},
287 {
"depth", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::calldepth},
288 {
"dotsPerMeterX", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::calldotsPerMeterX},
289 {
"dotsPerMeterY", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::calldotsPerMeterY},
290 {
"fill", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callfill},
291 {
"hasAlphaChannel", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callhasAlphaChannel},
292 {
"height", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callheight},
293 {
"invertPixels", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callinvertPixels},
294 {
"isGrayscale", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callisGrayscale},
295 {
"isNull", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callisNull},
296 {
"load", 1, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callload},
297 {
"mirrored", 1, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callmirrored},
298 {
"numBytes", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callnumBytes},
299 {
"numColors", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callnumColors},
300 {
"offset", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::calloffset},
301 {
"pixel", 1, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callpixel},
302 {
"pixelIndex", 1, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callpixelIndex},
303 {
"rect", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callrect},
304 {
"rgbSwapped", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callrgbSwapped},
305 {
"save", 2, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callsave},
306 {
"scaled", 3, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callscaled},
307 {
"scaledToHeight", 1, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callscaledToHeight},
308 {
"scaledToWidth", 1, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callscaledToWidth},
309 {
"serialNumber", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callserialNumber},
310 {
"setAlphaChannel", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callsetAlphaChannel},
311 {
"setColor", 1, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callsetColor},
312 {
"setDotsPerMeterX", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callsetDotsPerMeterX},
313 {
"setDotsPerMeterY", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callsetDotsPerMeterY},
314 {
"setNumColors", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callsetNumColors},
315 {
"setOffset", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callsetOffset},
316 {
"setPixel", 2, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callsetPixel},
317 {
"size", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callsize},
318 {
"valid", 1, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callvalid},
319 {
"width", 0, KJS::DontDelete|KJS::ReadOnly, &ImageNS::callwidth}
326 if( args.size() == 0 )
330 if( args.size() == 1 )
334 else if( args.size() == 2 )
337 QImage( KJSEmbed::extractVariant<QSize>(exec,args, 0 ),
340 else if( args.size() == 3 )
#define START_METHOD_LUT(TYPE)
#define START_CTOR(TYPE, JSNAME, ARGS)
static const KJS::ClassInfo info
ImageBinding(KJS::ExecState *exec, const QImage &value)
static void publish(KJS::ExecState *exec, KJS::JSObject *object, const Method *methods)
Publishes an array of Methods to an object.
static const KJS::ClassInfo info
static const Method * methods()
END_VARIANT_METHOD result
if(file->open((QIODevice::OpenModeFlag) KJSEmbed::extractInt(exec, args, 0)))
QString KJSEMBED_EXPORT extractQString(KJS::ExecState *exec, const KJS::List &args, int idx, const QString defaultValue=QString())
Extracts a QString from an argument list.
int KJSEMBED_EXPORT extractInt(KJS::ExecState *exec, const KJS::List &args, int idx, int defaultValue=0)
Extracts an integer from an argument list.
bool KJSEMBED_EXPORT extractBool(KJS::ExecState *exec, const KJS::List &args, int idx, bool defaultValue=false)
Extracts a bool from an argument list.
QVariant KJSEMBED_EXPORT extractVariant(KJS::ExecState *exec, KJS::JSValue *value)
Extracts a QVariant from a KJS::JSValue if the conversion fails a QVariant::Null is returned.
KJS::JSValue * createVariant(KJS::ExecState *exec, const KJS::UString &className, const T &value)
Can create any known KJSEmbed::VariantBinding object and set the value.
Implement QString-KJS::UString conversion methods.
END_OBJECT_METHOD QPolygon arg0
END_OBJECT_METHOD QBrush cppValue
#define START_VARIANT_METHOD(METHODNAME, TYPE)
A simple variant syle method.
#define END_VARIANT_METHOD
End a variant method started by START_VARIANT_METHOD.