Closed Doko-Demo-Doa closed 4 years ago
The code I used:
@override
Widget build(BuildContext context) {
var x = '0' + 09924.toString();
return Scaffold(
body: Container(
margin: const EdgeInsets.all(24),
height: 250,
width: 250,
color: Colors.green,
child: KanjiViewer.svg(
"assets/vectors/" + x + ".svg",
run: this.run,
width: 200,
height: 200,
lineAnimation: LineAnimation.oneByOne,
duration: new Duration(seconds: 3),
onFinish: () => setState(() {
this.run = false;
}),
),
),
);
}
I'm happy you like it! I also had some Hanzi character animation app in mind when I was creating the library. Before looking more into it, is the issued you resolved if you pass in the scaleToViewport
flag as false?
Hi @biocarl I did but as you can see, it is still cropped. I tried with a bigger Container (the green area) with scaleToViewport = false
flag:
Code:
Container(
width: 400,
height: 400,
alignment: Alignment.center,
padding: const EdgeInsets.all(6),
color: Colors.green,
child: KanjiViewer.svg(
"assets/vectors/" + x + ".svg",
controller: _controller,
scaleToViewport: false,
width: ,
lineAnimation: LineAnimation.oneByOne,
duration: new Duration(seconds: 3)
),
),
I was looking into it - it seems like you are not using my library but copied some parts of the code and you are now trying to adopt it for your purposes. For instance you are overwriting the stroke width and line-cap which will impact the margin properties of the bounding box. Sorry but that is not really related to my project;)
Hello, thank you for the great library.
I'm bumping into a weird situation like this: I'm working on a kanji drawing library. Here is the sample SVG:
It is this character: 餤
However when I use the lib to draw it, some strokes are cropped at corners like so:
Where should I look at? I think it's the problem with canvas size and I would like to extend it a bit more, but no clue still.