Andy Wood
822d822066
Refactor setSourceRGBA to allow the context to be supplied.
10 years ago
Andy Wood
39766d1fd6
Simple image shadow (no blurring or handling current transforms) based on image's alpha channel.
10 years ago
Andy Wood
2b366c684e
The +1 on the offset seems to match the browser's output better, but I can't work out why it would be needed (unless it's pixel alignment related).
10 years ago
Andy Wood
617aabc6ae
Make the shadow radius more accurately match the browser's, making use of sigma scale as used in SKIA: https://github.com/google/skia/blob/master/src/effects/SkBlurMask.cpp#L26 .
10 years ago
Andy Wood
0dcc70b2b3
Create a new image surface to render blurred shadows to, this means that vector formats like PDF will now render blurs.
10 years ago
Andy Wood
5d9582b81e
Add recommended calls to flush and dirty buffer, as per http://www.cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-get-data .
10 years ago
Andy Wood
95e342d259
Fix to ensure shadowOffset is unaffected by the current transform.
10 years ago
Jake Gordon
36bd6498b5
float rather than int for drawImage arguments
10 years ago
King Koopa
9ffde8ebb3
Add algorithm include to CanvasRenderingContext2d.cc for std::min
11 years ago
King Koopa
c18d777f57
Updated NAN to 1.2.0
11 years ago
Vincent Weevers
f42a018a8d
Add shims so Windows Visual C++ can use C99's isnan() and isinf().
11 years ago
David Caldwell
87abe5a85e
Use std::vector instead of C99 variable length arrays because of Visual C++.
Addresses Issue #420
11 years ago
David Caldwell
31dd7d6d21
Add support for the lineDash API.
Described here:
http://www.w3.org/TR/2dcontext/#dom-context-2d-setlinedash
The test images match on Chrome, but not on Firefox. It looks like
Firefox resets the lineDash to [] when given invalid parameters. My
reading of the spec agrees with Chrome.
11 years ago
Rod Vagg
9b62e5f64e
beginning nan@1.0.0 conversion
11 years ago
nulltask
844294efd1
change operator lighter to lighten
11 years ago
King Koopa
8dbdd009b5
Runs on new v8.
11 years ago
Mitar
76bbe247fa
Correctly limit bounds in PutImageData to prevent segment fault.
11 years ago
Seth Fitzsimmons
fb9e576bfb
Distinguish between 'add' and 'lighter'
When CAIRO_OPERATOR_ADD and CAIRO_OPERATOR_LIGHTEN are both available,
make CAIRO_OPERATOR_ADD available as 'add'.
11 years ago
Rod Vagg
2354d9bb8c
0.11.4+ compatibility using NAN
See https://github.com/rvagg/nan
12 years ago
Infinite Whiteboard
13b8f41141
Added backwards compatibility through conditional compilation.
12 years ago
Infinite Whiteboard
14a19421d2
Patch for Node 0.11.3
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
TJ Holowaychuk
ef897a2a2c
ocd
12 years ago
Julian Viereck
1d3a99d85a
Add support to load fonts from file.
12 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
c-spencer
35d491a284
Add pango drawing support, and silence some warnings.
13 years ago
c-spencer
8b8ee7f017
Add optional mime-data tracking to Image.
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
eb04ff63d6
Fixed Context2d::hasShadow()
13 years ago
TJ Holowaychuk
eb0edf2ce4
Changed: renamed .nextPage() to .addPage()
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
obarthel
5a8083de17
Added buffer size checks to the rgba_to_string() function
13 years ago
Robert Sköld
46bda423f8
Added a test (and fix) for a regression with gradients
13 years ago
Robert Sköld
559bd9d572
Started on ctx.createPattern() support.
13 years ago
Tj Holowaychuk
c3e9284cfa
ocd
13 years ago
Tharit
3ea435801e
fixed two memory leaks in context2d
13 years ago
Tj Holowaychuk
f65f60aec1
Fixed measureText().width. Closes #126
13 years ago
Tj Holowaychuk
549665dee8
typo
13 years ago
Tj Holowaychuk
82919c9992
Added better lineTo() / moveTo() exception messages
14 years ago
Tj Holowaychuk
10da42f2c0
Changed: prefix some private methods with _
14 years ago