Comments (16)
Mattew is on vacation this week, and we were hoping to focus on merging our changes with upstream Google after that. So shortly after I would hope we could work on this.
from skiasharp.
Any idea when this might be implemented? Is it a fairly low priority thing?
from skiasharp.
I quickly found that this patch is more involved than adding a missing property or method. I have created a branch to discuss the best way to integrate PathEffects.
Ensuring that we wrap the return of the getter of the PathEffect property with the correct managed object is the point of discussion.
from skiasharp.
I don't think, in this particular case, that exposing subclasses of SkPathEffect serves any significant purpose, because the subclasses in the C++ API don't expose additional public members. I would just expose the single sealed class SKPathEffect, along with static Create function. E.g.:
static SKPathEffect CreateDashed(float[] intervals, float phase)
from skiasharp.
Obviously the other PathEffects would have their own CreateXXX function.
from skiasharp.
Could anyone, please, make a windows binary (dll) of SkiaSharp with SKPathEffect added?
from skiasharp.
I agree with Peter's take. We do not need to bind the subclasses (and in fact, I am wondering if we need to surface all of those SKStream subclasses in the first place as well).
We should just provide convenient factory methods to create these.
from skiasharp.
@migueldeicaza First I agree that we should do this. I need to check the remaining path effect classes to see if there are any critical members that will be missing.
There are some members on these effects, but they feel advanced to me. Also I do not think creating factory methods would stop us from later surfacing these if needed.
I see two similar options. One add the factory methods to the paint object in C# which will handle creating the effect and assigning in C. The other option is to create a C# class (SkPathEffect) that only has static factory methods that take the paint as an argument to assign the new effect to. Again in C.
In both options I think we need a way to clear the effect from the paint. That could be as simple as a ResetEffect method on the paint class.
Thoughts?
from skiasharp.
I like it.
from skiasharp.
I would have a read/write property on SKPaint of type SKPathEffect.
SKPathEffect would have only static creation methods, e.g.:
public static SKPathEffect CreateDashedPathEffect(...);
I think this is
- most like the skia C++ api
- discoverable
- doesn't overly pollute the SKPaint members
- could extend later if we allow user-written subclasses of SKPathEffect (I don't think we should be go here now though)
Peter
On Apr 7, 2016, at 2:12 PM, Bill Holmes [email protected] wrote:
@migueldeicaza First I agree that we should do this. I need to check the remaining path effect classes to see if there are any critical members that will be missing.
There are some members on these effects, but they feel advanced to me. Also I do not think creating factory methods would stop us from later surfacing these if needed.
I see two similar options. One add the factory methods to the paint object in C# which will handle creating the effect and assigning in C. The other option is to create a C# class (SkPathEffect) that only has static factory methods that take the paint as an argument to assign the new effect to. Again in C.
In both options I think we need a way to clear the effect from the paint. That could be as simple as a ResetEffect method on the paint class.
Thoughts?
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
from skiasharp.
Is anything of SKPathEffect implemented in 1.49.2-beta?
from skiasharp.
@hypeartist no there is not
from skiasharp.
Is there any chance this will be implemented soon? At least in a branch so I can make a private nuget package? I would code it myself if I had any clue how to do so... :-\
from skiasharp.
The C code for this is in commit mono/skia@e31d35b
DIFF: mono/skia@xamarin-mobile-bindings...mono:feature-patheffect
C#: #112
from skiasharp.
This will be in the next release. It is currently merged into master.
from skiasharp.
Thanks a lot for all your efforts.
29 Июл 2016 г. 20:31 пользователь "Matthew Leibowitz" <
[email protected]> написал:
This will be in the next release. It is currently merged into master.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#47 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABlXL1r0vqzYPXKIOr2y_E9--gAath0pks5qakb_gaJpZM4Hz1wZ
.
from skiasharp.
Related Issues (20)
- [FEATURE] Support Direct3D HOT 4
- [BUG] `SKNativeObject` instances are not kept alive during native API calls
- [BUG] Annoying warning on .NET Framework 4.8 project with SkiaSharp 2.88.6 or 2.88.7 HOT 17
- [BUG] Text Missing When Running From AWS Lambda HOT 3
- [BUG] SkiaSharp 3.0 Preview 3.1 crashes the release version of the .NET MAUI app at start, debug works fine HOT 9
- [BUG] Drawing is warped during window resize on NVIDIA graphics card
- Canvas Info shows huge size when using Chrome Debugger and using Device Emulation
- [BUG] Build outputs duplicate native libraries HOT 2
- Skia Blazor Runs in debugger but not when deployed
- [BUG] SKGLElement gives black screen on Intel integrated graphics
- [BUG] SKGLView on .NET MAUI is missing a handler (the return) HOT 6
- [BUG] On iOS, with .NET 9.0 Preview 2 and 3 and SkiaSharp 3.0 Preview 2.1 / 3.1, SKGLView corrupts SkiaSharp memory and stops SkiaSharp from functioning HOT 7
- [BUG] The position draw on SKXamCanvas is not correct. #1585 Was this a bug that you worked around? HOT 3
- [PERFORMANCE] On iOS, layout speed of pages with SKGLView is slow, making layout wobbly at start (SKCanvasView is instantaneous)
- [BUG] SkiaSharp 2.88.8 (Xamarin) crashes randomly with Mali GPUs HOT 4
- [BUG] SKPaint's IsAntiAlisasing is on on Android but off on iOS by default (Xamarin / SkiaSharp 2.88.8) HOT 1
- [BUG] SkiaSharp crashes in WebAssembly if building with non-Release/Debug build config HOT 1
- [BUG] Canvas.DrawPath Cause Memory Leak on Windows 11 HOT 1
- [BUG] SKBitmap.ColorSpace is always null. Unable to check for CMYK, RGB, etc. HOT 1
- [BUG] CR2 image orientation being detected incorrectly.
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 skiasharp.