Comments (5)
Nice, DM me on Discord Zamiel#8743
from canvas2svg.
I have tried to add support for a drop-shadow filter ( https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/filter ) :
ctx.prototype.__applyFilter = function () {
var filter = this.filter;
if (filter != null) {
var match = /^drop-shadow\(([^p]+)px\s+([^p]+)px\s+([^p]+)px\s+([\s\S]+?)\)$/.exec(filter);
if (match != null) {
var dx = match[1];
var dy = match[2];
var stdDeviation = Number.parseFloat(match[3]) / 2;
var floodColor = match[4];
var feDropShadowElement = this.__createElement("feDropShadow", {
dx: dx,
dy: dy,
stdDeviation: stdDeviation,
"flood-color": floodColor
}, false);
var id = randomString(this.__ids);
var filterElement = this.__createElement("filter", {
id: id
}, false);
filterElement.appendChild(feDropShadowElement);
this.__defs.appendChild(filterElement);
this.__currentElement.setAttribute('filter', format("url(#{id})", {id:id}));
}
}
};
from canvas2svg.
@Zamiell i don't know how to use Discord, do you want to ask something?
from canvas2svg.
Was gonna offer to pay you
from canvas2svg.
@Zamiell , thanks, glad to see this, but no need I have some money
from canvas2svg.
Related Issues (20)
- clearRect is drawing white instead of clearing to transparent HOT 3
- Font parsing fails on "normal 12px 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif" HOT 1
- Publish the latest version to NPM
- How can I use canvas2svg on React hooks?
- a moi mème HOT 1
- Using with Node.JS HOT 1
- Cannot export to svg HOT 1
- filter and globalCompositeOperation are not working HOT 6
- support for putImageData needed HOT 3
- Opacity not working HOT 2
- Handling Decimal RGB values
- How to render text as vector? HOT 3
- Is is possible to convert only a part of the canvas? HOT 5
- Is it Possible to Append two mock context?
- Can not see the plot in browser using the demo code
- Text-Decoration is not compliant with specification.
- any plan to support ellipse, resetTransform function? HOT 2
- panning whole graphics in canvas
- It is possible to use the lib with Chart JS to convert the chart into SVG HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from canvas2svg.