Commit graph

29 commits

Author SHA1 Message Date
kangax
d2f6a9033e Add JSCS validation & change bunch of things for conformance. Down to 333 failures from ~1000. 2014-02-16 16:36:14 -05:00
kangax
fc3bb9fe69 Refactor getColorStop 2013-11-10 16:51:08 +01:00
kangax
86d8df6c8e Refactor duplication in gradient class 2013-10-25 20:27:02 +02:00
kangax
476da71e92 Doc changes 2013-10-25 09:05:39 +02:00
Kienz
fa2f18a77a Add more docs.
Examples, tutorial and demo links.
2013-09-28 12:31:32 +02:00
Kienz
721ac7a8c2 Doc additions - document object parameter 2013-09-17 22:42:58 +02:00
Kienz
92bdebfde7 Doc fixes, Update README (1800+ unit tests) 2013-08-08 18:31:26 +02:00
Kienz
520b2258d3 Convert opacity value into float value. If stop-opacity is set as attribute (not as style attribute) el.getAttribute('stop-opacity') returns null. Problem exists since commit a0b7fa4eb9.
Add default value rgb(0,0,0) for stop-color and 1 for stop-opacity.
Add more gradient tests.
2013-07-02 21:09:50 +02:00
Michal Knizek
f22c198a1e Zero opacity in gracient color stop kangax/fabric.js#711 2013-06-18 09:00:55 +02:00
kangax
51b7c09314 Move Cufon methods to text.cufon. Move drawControls to Canvas (from StaticCanvas). Move dataURL-exporting methods to dataurl_exporter mixin. 2013-06-06 12:31:32 +02:00
Stefan Kienzle
2698597c74 Fix vertical gradients (x1 = x2 = 0)
I think `ctx.canvas.width` is not needed.
If gradient coords are e.g. `{x1: 0, y1: -50, x2: 0, y2: -50}` the vertical gradient doesn't work.
Fixes issue #660
2013-05-31 13:30:44 +02:00
kangax
2223b1b61f Remove more functions in distribution when SVG import (parser) is not included. Always include stateful mixin. Closes #662 2013-05-30 21:55:26 +02:00
kangax
2b6b64dd02 Add support for removing SVG export functionality during build (via no-svg-export flag) 2013-05-09 14:21:10 -04:00
kangax
4e1a26cc11 Update docs 2013-04-25 14:21:32 -04:00
kangax
c16dcf88a4 Change inline docs to conform to jsdoc3 2013-04-24 12:58:04 -04:00
kangax
e8e32e80de Fix gradient colorStops initialization. Thanks @Kienz 2013-03-18 13:11:31 +01:00
kangax
012c333bbb Fix gradient initialization 2013-03-10 21:05:24 +01:00
Kienz
e35e1a0191 [BACK_INCOMPAT] Implement fabric.Gradient#toSVG() and radialGradient
- Implement radial gradient and expand linear gradient (stop-opacity should now take into account)
- Gradients should now be included in the SVG output for the following fabric objects: circle, ellipse, line, path, polygon, polyline, rect and triangle (text is not yet implemented)
- Gradients (linear / radial) can be applied to stroke or fill property => change setGradientFill(options) to setGradient(type, options)
- Change toObject() that linear and radial gradients can be serialized
- Expand fabric.Color by 16 basic colors fabric.Color.colorNameMap => gradients with e.g. stop-color="blue" and stop-opacity="0.5 can be converted to RGBA color
- RGBA colors in svg has no affect (convert to RGB color), only stop-opacity has affect to color opacity
- Attached some test svg files http://kienzle.geschaeft.s3.amazonaws.com/projects/fabricjs/gradients/gradients.rarUpdate setGradient and addColorStop interface

Update setGradient and addColorStop interface
- setGradient('fill', {x1: 50, y2: 10, colorStops: {'0.7', 'rgba(0,153,153,0.5)'}});
- addColorStop({'0.4', 'blue'});
2013-03-09 21:00:54 +01:00
Kienz
ae67d83216 Update setGradient and addColorStop interface
- setGradient('fill', {x1: 50, y2: 10, colorStops: {'0.7', 'rgba(0,153,153,0.5)'}});
- addColorStop({'0.4', 'blue'});
2013-02-25 18:26:20 +01:00
Kienz
4c4f845bfe [BACK_INCOMPAT] Implement fabric.Gradient#toSVG() and radialGradient
- Implement radial gradient and expand linear gradient (stop-opacity should now take into account)
- Gradients should now be included in the SVG output for the following fabric objects: circle, ellipse, line, path, polygon, polyline, rect and triangle (text is not yet implemented)
- Gradients (linear / radial) can be applied to stroke or fill property => change setGradientFill(options) to setGradient(type, options)
- Change toObject() that linear and radial gradients can be serialized
- Expand fabric.Color by 16 basic colors fabric.Color.colorNameMap => gradients with e.g. stop-color="blue" and stop-opacity="0.5 can be converted to RGBA color
- RGBA colors in svg has no affect (convert to RGB color), only stop-opacity has affect to color opacity
- Attached some test svg files http://kienzle.geschaeft.s3.amazonaws.com/projects/fabricjs/gradients/gradients.rar
2013-02-23 17:02:52 +01:00
kangax
6777c50012 Add support for patterns 2013-02-03 02:15:29 +01:00
kangax
6ed3dda6f5 Merge master 2012-12-15 17:16:39 +01:00
kangax
fcfe5052f8 Use toFixed to cutoff some of the values. Closes #352. 2012-12-15 17:09:37 +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
kangax
f0b5329157 Doc additions, fixes. 2012-11-23 13:38:26 +01:00
kangax
84a956c4b6 Lint everything with JSHint. Version 0.9.14. 2012-10-14 02:53:12 +02:00
kangax
eb4ac004aa Gradients now render properly in IE9 (thanks Kienz).
Closes #110, #247. Version 0.9.3.
2012-08-26 21:14:34 +02:00
kangax
9594ba330f gradient.js --> gradient.class.js 2012-08-20 18:23:53 +02:00
Renamed from src/gradient.js (Browse further)