|
@ -5,6 +5,7 @@ |
|
|
// Copyright (c) 2010 LearnBoost <tj@learnboost.com>
|
|
|
// Copyright (c) 2010 LearnBoost <tj@learnboost.com>
|
|
|
//
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
#include "Canvas.h" |
|
|
#include "Canvas.h" |
|
|
#include "Image.h" |
|
|
#include "Image.h" |
|
|
#include "ImageData.h" |
|
|
#include "ImageData.h" |
|
@ -24,6 +25,11 @@ init (Handle<Object> target) { |
|
|
Gradient::Initialize(target); |
|
|
Gradient::Initialize(target); |
|
|
Pattern::Initialize(target); |
|
|
Pattern::Initialize(target); |
|
|
target->Set(String::New("cairoVersion"), String::New(cairo_version_string())); |
|
|
target->Set(String::New("cairoVersion"), String::New(cairo_version_string())); |
|
|
|
|
|
#ifdef HAVE_JPEG |
|
|
|
|
|
char jpeg_version[10]; |
|
|
|
|
|
snprintf(jpeg_version, 10, "%d%c", JPEG_LIB_VERSION_MAJOR, JPEG_LIB_VERSION_MINOR + 'a' - 1); |
|
|
|
|
|
target->Set(String::New("jpegVersion"), String::New(jpeg_version)); |
|
|
|
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
NODE_MODULE(canvas,init); |
|
|
NODE_MODULE(canvas,init); |
|
|