Code Monkey home page Code Monkey logo

Comments (4)

biocarl avatar biocarl commented on June 8, 2024 2

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;)

from drawing_animation.

Doko-Demo-Doa avatar Doko-Demo-Doa commented on June 8, 2024

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;
          }),
        ),
      ),
    );
  }

from drawing_animation.

biocarl avatar biocarl commented on June 8, 2024

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?

from drawing_animation.

Doko-Demo-Doa avatar Doko-Demo-Doa commented on June 8, 2024

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:

image

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)
            ),
          ),

from drawing_animation.

Related Issues (18)

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.