Victor Goya
93bb98d440
loadJPEG: fix fread() return value testing
According to the fread() manpage, successful fread() call will return 1 and not len in this case.
12 years ago
pb82
ba3bb3137e
removed unneeded private fields
12 years ago
Seth Fitzsimmons
8dc36f09fa
CanvasRenderingContext2d#filter
Like patternQuality, but applies to transformations effecting more than just
patternsi (i.e. the implicitly created pattern).
See
http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-pattern-set-filter
for more information.
12 years ago
Seth Fitzsimmons
a1fa149551
Add 'nearest' and 'bilinear' to patternQuality
12 years ago
Matthew Borden
92d8e84a6d
Fixed Error that prevented NPM install on mac.
NPM spat out a error that there was only 2 params in DGIFOPEN. I added
the third, an error interger.
12 years ago
TJ Holowaychuk
ef897a2a2c
ocd
12 years ago
Julian Viereck
1d3a99d85a
Add support to load fonts from file.
12 years ago
Nathan Rajlich
8a5349e525
explicitly cast the after work callback function to "uv_after_work_cb"
for node >= v0.9.4 compat
12 years ago
Chris Spencer
cfc6dfd714
Call cairo_surface_finish in ~Canvas when pdf
Fixes an issue where when a pdf surface isn't buffered and then is
garbage collected, the toBuffer can be called and attempt to realloc
the destroyed closure.
12 years ago
Mark Cochran
4a3caeb25f
Adding support for grayscale JPEG.
13 years ago
Luigi Pinca
25234db5df
Fix cases where GIF_LIB_VERSION is not defined
Versions up to 4.1.6 of GIFLIB defined a GIF_LIB_VERSION macro that was string-valued.
Versions after 4.1.6 define integer-valued GIFLIB_MAJOR, GIFLIB_MINOR, and GIFLIB_RELEASE macros for the three components of the version.
Check for GIF_LIB_VERSION, otherwise use the new macros.
13 years ago
Nathan Rajlich
718e868682
init: fix cases where JPEG_LIB_VERSION_MAJOR/MINOR are not defined
First fall back to trying to use JPEG_LIB_VERSION.
Then if that's not available, then set them both to 0.
Fixes #202 .
13 years ago
Luigi Pinca
a7615ceb91
Fixed an issue with jpeg-turbo library
There were compilation errors if the version of the library was less than 1.2.0.
This was happening because the macros JPEG_LIB_VERSION_MAJOR and JPEG_LIB_VERSION_MINOR were not being defined, since the compile-time macro LIBJPEG_TURBO_VERSION was introduced in version 1.2.0.
The problem was fixed by giving those two macros a definition if it was missing.
13 years ago
c-spencer
474635d526
Fix Context2d::SetFont for pango when setting normal weight/style
13 years ago
c-spencer
3388ab5b33
Properly dispose of pango related allocations in ~Context2d()
13 years ago
c-spencer
efadaead73
Add measureText implementation for pango
13 years ago
c-spencer
8e9defcb79
Tidy up build files and util script.
13 years ago
c-spencer
50ab677036
Use strndup for duplicating fontFamily strings.
13 years ago
TJ Holowaychuk
f5985af0f1
fix closure_destroy() with cast for AdjustAmountOfExternalAllocatedMemory()
13 years ago
TJ Holowaychuk
1cae3db2d0
Revert "Fixes #182"
This reverts commit 02041571ce
.
13 years ago
c-spencer
35d491a284
Add pango drawing support, and silence some warnings.
13 years ago
c-spencer
d3f3a94835
Add simple support for using jpeg-turbo library.
13 years ago
Luigi Pinca
02041571ce
Fixes #182
13 years ago
Nathan Rajlich
7cf35c8396
export the "gifVersion" when compiled with gif support
13 years ago
Nathan Rajlich
ba234eaae1
export the "jpegVersion" when compiled with jpeg support
13 years ago
Nathan Rajlich
0e4fa461de
src: add newline at end of file to fix compiler warning
13 years ago
Nathan Rajlich
cdb2421812
build: begin making gyp file work on unix
13 years ago
TJ Holowaychuk
f5be948340
fix jpeg malloc Image issue. Closes #160 [c-spencer]
13 years ago
Andreas Botsikas
3738179d76
Added instructions, binding.gyp and added the NODE_MODULE macro to specify the entry point.
13 years ago
TJ Holowaychuk
f47422fd06
fixed Image bit flags
13 years ago
TJ Holowaychuk
69d4eb3987
slight refactor
13 years ago
c-spencer
03584c3307
Improve Image mode API
13 years ago
c-spencer
4c5962b90e
Add clearData method to handle reassignment of src, and clean up mime data memory handling.
13 years ago
c-spencer
cc994d2d8d
Improve how _data_len is managed and use to adjust memory, hide more of mime API behind cairo version conditional.
13 years ago
c-spencer
8b8ee7f017
Add optional mime-data tracking to Image.
13 years ago
c-spencer
d5838bc4aa
Refactor JPEG decoding into decodeJPEGIntoSurface
13 years ago
c-spencer
307fa29396
Switch draw mode state to an enum.
13 years ago
c-spencer
d5d9c59e56
Improve bottom and middle baseline calculation.
13 years ago
c-spencer
e06ed99dec
Partial TextMetrics support.
13 years ago
c-spencer
18e3edfc28
Add textDrawingMode context property.
13 years ago
TJ Holowaychuk
56d49559de
clean up free()s
13 years ago
TJ Holowaychuk
ba94a33d74
live_data -> _data
13 years ago
David Björklund
c9f991b8de
Fixes the Image memory leak ( #150 ). It is basically the fix from @AllYearbooks fork without the mime-stuff.
13 years ago
TJ Holowaychuk
eb04ff63d6
Fixed Context2d::hasShadow()
13 years ago
TJ Holowaychuk
3ebc55a5e6
Fixed: free closure and surface in ~Canvas
13 years ago
TJ Holowaychuk
eb0edf2ce4
Changed: renamed .nextPage() to .addPage()
13 years ago
TJ Holowaychuk
03d1cacf9c
Added `Canvas#type` getter
13 years ago
TJ Holowaychuk
a063907832
Added quick PDF support
need to clean things up, add async support, test images etc. I believe
some guys forked node-canvas to add some kind of image caching
for when an image appears several times within a PDF document, though
that may be out of scope
13 years ago
TJ Holowaychuk
7a28ab4773
Fixed quadratic curve lameness. Closes #155
13 years ago
Philippe Plantier
550011e25e
Use libuv instead of EIO so that it builds on node.js >= 0.7.0
13 years ago