You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When rendering a Path in a canvas with start and end properties, if one of them causes the path to end in a 0/90/180/270 angle in the screen (Like 25%/50%/75% of a full circle, for example), it causes the end to render erratically and not straight. It only happens at certain dimensions, could not find the relation on which break there. Making the path bigger or smaller solves the issue, but at some points it breaks like this.
Version
1.7.6 is latest checked, has been broken since before 1.0. React Native CLI. React native 0.75.2
Happening on Android, on a Pixel Pro 7. Has been seen and fixed itself in the past on iPhone X and iPhone 12.
Steps to reproduce
Run the following code on android. Any path with enough thickness for it to be visible, with start and end properties, one of them making it cut in a straight angle, should work.
Snack, code example, screenshot, or link to a repository
constgetPath=()=>{constradius=107;//Have suspicions that this not being an integer is an issue, seems to work with 195.4, but other hardcoded decimal values here kill it. Only in //straight angles though, if I try this on any other path it works as intended. Shouldn't break with a float I imagine though? Since an svg path can //have decimals without issuesconstcenterX=195.5;constcenterY=174;constmatrix=Skia.Matrix();matrix.translate(centerX,centerY);matrix.rotate(ONE_QUARTER_CIRCLE_RADIANS);matrix.translate(-centerX,-centerY);constskPath=Skia.Path.Make().addCircle(centerX,centerY,radius);skPath.transform(matrix);}exportconstGaugeDoughnut=()=>{constpath=getPath();consttrimmingValues=[{"end": 0.7333333333333334,"start": 0.5}];return(<Group>{trimmingValues.map((trimming,index)=><GaugeDoughnutArckey={`gauge-arc-${index}`}path={path}trimming={trimming}color={"red"}/>;
)}</Group>);};exportconstGaugeDoughnutArc=({path, trimming, color}: GaugeDoughnutArcProps)=>{conststrokeWidth=42;return(<Pathpath={path}color={color}style="stroke"strokeWidth={strokeWidth}start={trimming.start}end={trimming.end}/>);};
The text was updated successfully, but these errors were encountered:
Description
When rendering a Path in a canvas with start and end properties, if one of them causes the path to end in a 0/90/180/270 angle in the screen (Like 25%/50%/75% of a full circle, for example), it causes the end to render erratically and not straight. It only happens at certain dimensions, could not find the relation on which break there. Making the path bigger or smaller solves the issue, but at some points it breaks like this.
Version
1.7.6 is latest checked, has been broken since before 1.0. React Native CLI. React native 0.75.2
Happening on Android, on a Pixel Pro 7. Has been seen and fixed itself in the past on iPhone X and iPhone 12.
Steps to reproduce
Run the following code on android. Any path with enough thickness for it to be visible, with start and end properties, one of them making it cut in a straight angle, should work.
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: