Giter Club home page Giter Club logo

Comments (16)

migueldeicaza avatar migueldeicaza commented on May 18, 2024 5

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.

derrickp avatar derrickp commented on May 18, 2024 2

Any idea when this might be implemented? Is it a fairly low priority thing?

from skiasharp.

bholmes avatar bholmes commented on May 18, 2024

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.

petergolde avatar petergolde commented on May 18, 2024

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.

petergolde avatar petergolde commented on May 18, 2024

Obviously the other PathEffects would have their own CreateXXX function.

from skiasharp.

hypeartist avatar hypeartist commented on May 18, 2024

Could anyone, please, make a windows binary (dll) of SkiaSharp with SKPathEffect added?

from skiasharp.

migueldeicaza avatar migueldeicaza commented on May 18, 2024

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.

bholmes avatar bholmes commented on May 18, 2024

@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.

migueldeicaza avatar migueldeicaza commented on May 18, 2024

I like it.

from skiasharp.

petergolde avatar petergolde commented on May 18, 2024

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

  1. most like the skia C++ api
  2. discoverable
  3. doesn't overly pollute the SKPaint members
  4. 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.

hypeartist avatar hypeartist commented on May 18, 2024

Is anything of SKPathEffect implemented in 1.49.2-beta?

from skiasharp.

bholmes avatar bholmes commented on May 18, 2024

@hypeartist no there is not

from skiasharp.

gentledepp avatar gentledepp commented on May 18, 2024

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.

mattleibow avatar mattleibow commented on May 18, 2024

The C code for this is in commit mono/skia@e31d35b
DIFF: mono/skia@xamarin-mobile-bindings...mono:feature-patheffect

C#: #112

from skiasharp.

mattleibow avatar mattleibow commented on May 18, 2024

This will be in the next release. It is currently merged into master.

from skiasharp.

Rungee avatar Rungee commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.