Skip to content

Commit

Permalink
fix(android): support animating stroke color
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloCore committed Jan 14, 2020
1 parent 2d34734 commit c5dd62f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/src/main/java/com/horcrux/svg/RenderableView.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ public void setStroke(@Nullable Dynamic strokeColors) {
JavaOnlyArray arr = new JavaOnlyArray();
arr.pushInt(0);
Matcher m = regex.matcher(strokeColors.asString());
int i = 0;
while (m.find()) {
double parsed = Double.parseDouble(m.group());
arr.pushDouble(parsed);
arr.pushDouble(i++ < 3 ? parsed / 255 : parsed);
}
stroke = arr;
}
Expand Down

0 comments on commit c5dd62f

Please sign in to comment.