Comments (5)
Thanks for the report.
> I'd guess drawBitmap using a PorterDuffXfermode would work here, too.
Unfortunately not. The mask's translucency is based on the RGB values of the
mask, not its alpha channel. So none of the PorterDuff modes match what we
need.
I have a faster implementation written in RenderScript in my 1.3 branch
(filters). But that branch needs a lot more work before it is releasable.
Original comment by [email protected]
on 18 Aug 2014 at 2:37
from androidsvg.
Note to self: need to fix the mask routine. It currently uses a bitmap the size of the whole canvas for the mask buffer. This uses a lot of memory if there are a lot of nested masks. Should use buffer the size of the original object - or use a different technique.
from androidsvg.
Fixed.
from androidsvg.
TODO: Update the documentation on 1.3 release:
Rendering of masks no longer requires the use of renderToCanvas().
from androidsvg.
Android P makes these changes and the use of Canvas.ALL_SAVE_FLAG somehow mandatory.
If use targetSdkVersion 28
the AndroidSVG Maven current release does not work, throwing:
IllegalArgumentException: Invalid Layer Save Flag - only ALL_SAVE_FLAGS is allowed
So with latest Android need to use the AndroidSVG snapshot version instead.
from androidsvg.
Related Issues (20)
- SVG drawable alpha value is not supporated HOT 1
- Make fallback color configurable HOT 3
- Svg Color Filter
- Fhhj
- Marcoscortes1
- Look for `currentColor` in case-insensitive manner
- Handle all CSS system colors HOT 1
- This svg file, there is a problem HOT 3
- I want to need content width and height without set view box so how can i resolve this issue ?
- I want to get only drawn content of svg as picture HOT 3
- below svg is getting cut in imageview, I want to get whole svg as picture how to do it HOT 5
- SVG Rendering Issue in androidsvg Library HOT 3
- Support animated gif and webp for <image> HOT 3
- Android 14 emulator: App crashes with java.lang.SecurityException: "Writable dex file is not allowed. " HOT 2
- Release 1.5
- colrv1 asset with multi-layers HOT 2
- Text is misplaced HOT 2
- 图片放到之后有黑色边框 HOT 2
- SVG href or xlink:href not working
- Text is hidden after scaled a element
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 androidsvg.