Shopify / react-native-skia

High-performance React Native Graphics using Skia

Home Page:https://shopify.github.io/react-native-skia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Path dash return SkPath

Angelk90 opened this issue · comments

Description

Hi! @wcandillon , Would it be possible for dash to return to SkPath?

Code:

 const dottedLinePath = Skia.Path.Make()
    .moveTo(0, height / 2)
    .lineTo(width, height / 2);
 dottedLinePath.dash(10, 2, 0);

in

 const dottedLinePath = Skia.Path.Make()
    .moveTo(0, height / 2)
    .lineTo(width, height / 2);
    .dash(10, 2, 0);

Link: https://snack.expo.dev/07PWugq_VWSFQul4oHrcd

unfortunately not as it needs to return a boolean.

@wcandillon : Wouldn't it be possible to declare the same function with the same value but returning SkPath?
Something like this doesn't work: Angelk90@55d99bf

no that's doesn't work indeed.