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
I use KineticJS 5.1.0 and want to apply a filter on an Image. My image has a border. After applying cache and filter the border in gone.
Here is the code I use (http://jsfiddle.net/confile/qgrjjjq9/):
var imageObj = new Image(); imageObj.onload = function() { var stage = new Kinetic.Stage({ container: 'container', width: 600, height: 700 }); var layer = new Kinetic.Layer(); img = new Kinetic.Image({ x: 250, y: 200, image: imageObj, draggable: true }); img.clearCache(); img.setOffsetX(img.getWidth() / 2); img.setOffsetY(img.getHeight() / 2); img.stroke("green"); img.strokeWidth(4); img.strokeScaleEnabled(false); img.strokeEnabled(true); layer.add(img); stage.add(layer); img.cache({ x: -(img.getWidth() / 2), y: -(img.getHeight() / 2), drawBorder: true }); img.filters([Kinetic.Filters.Invert]); layer.draw(); console.log("type: "+img.getType()); }; imageObj.crossOrigin = "anonymous"; imageObj.src = "https://dl.dropboxusercontent.com/u/47067729/darth-vader.jpg";
Here is the image before the caching:
And the image after caching and filter:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I use KineticJS 5.1.0 and want to apply a filter on an Image. My image has a border. After applying cache and filter the border in gone.
Here is the code I use (http://jsfiddle.net/confile/qgrjjjq9/):
Here is the image before the caching:
And the image after caching and filter:
The text was updated successfully, but these errors were encountered: