We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.4.4
https://jsfiddle.net/jester1983/Da7SP/3172/
chrome
create clipPath, then canvas.toSVG()
canvas background is clipped
background is not clipped.
suggest reorder steps for toSVG:
toSVG: function(options, reviver) { options || (options = { }); options.reviver = reviver; var markup = []; this._setSVGPreamble(markup, options); this._setSVGHeader(markup, options); this._setSVGBgOverlayColor(markup, 'backgroundColor'); this._setSVGBgOverlayImage(markup, 'backgroundImage', reviver); if (this.clipPath) { markup.push('<g clip-path="url(#' + this.clipPath.clipPathId + ')" >\n'); } this._setSVGObjects(markup, reviver); if (this.clipPath) { markup.push('</g>\n'); } this._setSVGBgOverlayColor(markup, 'overlayColor'); this._setSVGBgOverlayImage(markup, 'overlayImage', reviver); markup.push('</svg>'); return markup.join(''); },
should be
toSVG: function(options, reviver) { options || (options = { }); options.reviver = reviver; var markup = []; this._setSVGPreamble(markup, options); this._setSVGHeader(markup, options); if (this.clipPath) { markup.push('<g clip-path="url(#' + this.clipPath.clipPathId + ')" >\n'); } this._setSVGBgOverlayColor(markup, 'backgroundColor'); this._setSVGBgOverlayImage(markup, 'backgroundImage', reviver); this._setSVGObjects(markup, reviver); if (this.clipPath) { markup.push('</g>\n'); } this._setSVGBgOverlayColor(markup, 'overlayColor'); this._setSVGBgOverlayImage(markup, 'overlayImage', reviver); markup.push('</svg>'); return markup.join(''); },
or include overlays, not sure if overlay images should be clipped, but background definitely should be.
The text was updated successfully, but these errors were encountered:
thanks for the report, i ll fix this.
Sorry, something went wrong.
your solution is correct, i wonder if you want to open a pr, in that case i ll wait for the fix. Otherwise i m fixing it today.
Successfully merging a pull request may close this issue.
Version
2.4.4
Test Case
https://jsfiddle.net/jester1983/Da7SP/3172/
Information about environment
chrome
Steps to reproduce
create clipPath, then canvas.toSVG()
Expected Behavior
canvas background is clipped
Actual Behavior
background is not clipped.
suggest reorder steps for toSVG:
should be
or include overlays, not sure if overlay images should be clipped, but background definitely should be.
The text was updated successfully, but these errors were encountered: