Commit graph

66 commits

Author SHA1 Message Date
xxorax
dcfeb9c8ff Fix callback called 2 times, recent versions of Node call onload on the
elements
2013-05-06 18:35:42 +02:00
Kienz
8645378288 Implement dashed stroke + some fixes with stroke, fill, removeShadow and clipTo + fixes in brushes
- fabric.Rect (now uses fabric.util.drawDashedLine), fabric.Line, fabric.Triangle, fabric.Polygon, fabric.Polyline, fabric.Image now supports dashed stroke
- fabric.Circle and fabric.Ellipse actual only supports native dashed stroke (browser must support context.setLineDash)
- fabric.Image.toSVG() has stroke/dashed-stroke support
- fabric.Object#clipTo has now affect on fabric.Image's stroke
- fabric.Shadow#affectStroke is considered - _removeShadow is now called in _renderFill (check whether stroke is to be affected) and _renderStroke
- reset shadow styles (contextTop) in fabric.PencilBrush, fabric.CircleBrush and fabric.Spraybrush (fabric.BaseBrush.removeShadowStyles)
2013-05-04 18:25:57 +02:00
kangax
a6a5cb4a54 Load image via fabric.util.loadImage in cloneAsImage. Add fabric.util.createImage helper. Closes #593 2013-04-29 15:16:59 -04:00
kangax
4e1a26cc11 Update docs 2013-04-25 14:21:32 -04:00
kangax
56e6107752 Doc fixes 2013-04-25 13:52:05 -04:00
kangax
c16dcf88a4 Change inline docs to conform to jsdoc3 2013-04-24 12:58:04 -04:00
kangax
4be589019c Fix positioning of line and image instances when part of a group 2013-04-04 13:58:08 +02:00
kangax
6e725ae18b Support stroke on image instances. Closes #536 2013-04-04 13:58:08 +02:00
Taher Haveliwala
bafc75b35c The jsdoc params for fabric.Image.clone() were out of order, making
the jsdoc API reference for this method at

    http://fabricjs.com/docs/symbols/fabric.Image.html

display an incorrect method summary (with the order of propertiesToInclude
and callback swapped).
2013-04-03 20:14:14 -07:00
kangax
4911cc036b Make fabric.Image.fromURL use fabric.util.loadImage which fixes it under Node 2013-03-23 23:16:16 +01:00
Kienz
4b1939e5d3 Add check if object is visible to fabric.Image and fabric.Path. Now all fabric instances with own render method should check for visible property.
Some doc updates - add noTransform to doc and set it optional
2013-03-22 12:10:34 +01:00
kangax
85fd7ee852 Add support for clipping objects. Closes #64 2013-03-10 21:06:17 +01:00
kangax
9be89b2f2f drawCorners -> drawControls, for consistency. Remove unused hasCorners and use hasControls instead of hideCorners. Version 1.0.12 2013-02-20 13:19:22 +01:00
Kienz
ec28167906 Fix for issue #433 - wrong width/height of image objects
If svg with image objects was parsed the width/height props 
of the image were overridden by width/height of the svg file.
2013-02-19 09:19:46 +01:00
kangax
5ee9b13a92 Add support for shadows (via fabric.Shadow) 2013-02-04 20:49:05 +01:00
kangax
87a1bb31bf Amalgamate canvas creation + VML initialization into one place. Add new method fabric.util.createCanvasElement. Version 1.0.3. 2013-01-25 14:23:13 +01:00
kangax
7a527437c9 Avoid expensive regex when modifying data url string 2013-01-17 19:00:20 +01:00
kangax
d47ed61d49 Remove unnecessary e 2013-01-10 14:20:36 +01:00
Josh Pearce
d56bf59137 Add image load onerror handler
Make sure, when loading from json, that
a bad image path doesn't fail the desserialization

Signed-off-by: kangax <kangax@gmail.com>
2013-01-04 19:14:24 +01:00
kangax
c4bec70455 Performance optimizations 2013-01-02 23:25:13 +01:00
kangax
f6cbb259f3 Doc additions. 2012-12-15 17:05:23 +01:00
kangax
3416d8a090 Documentation additions. 2012-12-13 15:46:06 +01:00
shilo
4fba531e6f close <image> tag XML style to allow access to native SVG document 2012-12-10 14:40:26 +02:00
Kienz
f85e7a0335 Bugfixes for new parameter propertiesToInclude
Doc additions, fixes.
fabric.Group.toObject() now passes object propertiesToInclude also to objects inside the group
fabric.Image.clone() has now parameter propertiesToInclude
fabric.Object.clone() has now parameter propertiesToInclude
2012-12-01 13:57:27 +01:00
kangax
2329ef59fe Add support for specifying additional properties to return in toObject, toJSON. Fix #272. 2012-11-30 23:46:09 +01:00
kangax
15b1dcc555 Remove redundant bordervisibility/cornervisibility properties from image objects. Version 0.9.15. 2012-10-17 01:25:01 +02:00
kangax
514f064710 Normalize option setting in all classes. Fix #287. 2012-10-17 01:17:51 +02:00
kangax
84a956c4b6 Lint everything with JSHint. Version 0.9.14. 2012-10-14 02:53:12 +02:00
kangax
0171b665be Fix SVG rendering of lines and images in groups. 2012-09-06 16:41:31 -04:00
Will McNeilly
2a22e1dba6 add transform matrix to render method, reset image width and height 2012-08-21 17:19:55 +01:00
aggrosoft
ce86c0470c Fixing broken size of scaled images
Size of original image will be taken into account where the scaled size should be used when calling applyFilter.
This fixes this.
2012-07-25 13:24:45 +03:00
kangax
d9a64e4529 Replace element in applyFilters directly, to avoid messing up image instance dimensions. 2012-07-20 21:16:14 +02:00
kangax
ea699a776a Width/height passed to fabric.Image during initialization now take precedence over actual image width/height. 2012-07-19 11:45:04 +02:00
kangax
be5e8a600f Remove redundant "//= require" statements. 2012-06-26 16:42:45 +02:00
kangax
4dcf268d67 Prevent error in initFilters when filter is null (filters array is with holes). 2012-06-24 11:52:00 +02:00
kangax
b5d76f752d Add more image filters (Sepia, Sepia2, Brightness, Noise, GradientTransparency) based on Stoyan's demo — http://www.phpied.com/pixel-manipulation-in-canvas/ Fix bug with fabric.Image and filters. 2012-06-11 19:17:24 +02:00
kangax
af67423df9 fabric.Image now renders image according to current width/height (not width/height of original image). 2012-05-27 23:48:00 +04:00
kangax
905ab44665 Remove unused functionality in fabric.Image (maxwidth/maxheight). If we do add this in the future, it should really be on fabric.Object not only on fabric.Image. 2012-02-10 00:13:28 -05:00
kangax
13049361b0 Preserve image src for use in node.js. Add support for overriding src of images when exporting to SVG. 2012-02-03 23:27:45 -05:00
Tim de Koning
3795149dda Allow excanvas to kick in for IE8 and lower 2012-01-18 10:01:34 +01:00
kangax
d870410a7d First (and almost complete) implementation of fabric.Canvas#toSVG. 2012-01-02 16:14:20 -05:00
kangax
f3a3e81ea2 [BACK_INCOMPAT] Fix JS error when calling fabric.Image#toDataURL. toDataURL is now asynchronous, and passes data url to callback (first argument) instead of returning it. Closes #79. 2011-11-18 10:44:53 -05:00
kangax
2e42f9bd9d fabric.Image#setElement now updates instance' width/height properly. 2011-11-03 18:12:53 -04:00
kangax
d16e166e54 Fix element replacement in applyFilters (when no filters are present). 2011-11-02 17:25:20 -04:00
kangax
ae9025ce5c Fix image filter initialization in node. 2011-10-29 14:36:09 -04:00
kangax
d226102fbb Make fabric.Image#applyFilters work in node. 2011-10-29 14:11:44 -04:00
kangax
94db7bfc8f fabric.Image.GrayscaleFilter --> fabric.Image.filters.Grayscale as per users request; Make image filters serializable. 2011-10-27 20:06:19 -04:00
kangax
ea0da5a987 Make sure fabric.Image#filters can be a sparse array. 2011-10-26 20:03:51 -04:00
kangax
1a8b82b8e3 [BACK_INCOMPAT] Add support for image filters. Add fabric.Image.GrayscaleFilter and fabric.Image.RemoveWhiteFilter "classes". Filters should be used by adding them to filters array of image instances. For example, myImage.filters = [ new fabric.Image.GrayscaleFilter(), new fabric.Image.RemoveWhiteFilter({ threshold: 30, distance: 50 }) ]. 2011-10-26 01:34:54 -04:00
kangax
5627b5b06c Fix reference error. 2011-09-26 14:40:27 -04:00