-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
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
Support for dashed lines #47
Comments
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. |
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) |
Obviously the other PathEffects would have their own CreateXXX function. |
Could anyone, please, make a windows binary (dll) of SkiaSharp with SKPathEffect added? |
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. |
@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? |
I like it. |
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
Peter
|
Is anything of SKPathEffect implemented in 1.49.2-beta? |
@hypeartist no there is not |
Any idea when this might be implemented? Is it a fairly low priority thing? |
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... :-\ |
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. |
The C code for this is in commit mono/skia@e31d35b C#: #112 |
This will be in the next release. It is currently merged into master. |
Thanks a lot for all your efforts. 29 Июл 2016 г. 20:31 пользователь "Matthew Leibowitz" <
|
No description provided.
The text was updated successfully, but these errors were encountered: