Coder Social home page Coder Social logo

Bug: Duplication offset about rnote HOT 4 CLOSED

flxzt avatar flxzt commented on May 20, 2024
Bug: Duplication offset

from rnote.

Comments (4)

giannissc avatar giannissc commented on May 20, 2024

I have opened another round of bug and feature requests for you.. I hope you don´t mind! 😅 It is not all bad though I have noticed significant performance gains with the last two updates as well!!

from rnote.

flxzt avatar flxzt commented on May 20, 2024

Not at all :) But no promises when the issues will get fixed / improved, because developing Rnote is just a hobby for me right now. I already fixed this one upstream though!

from rnote.

giannissc avatar giannissc commented on May 20, 2024

No don´t worry about it, I know the drill :) I also had a look at the documentation for gtk-rs when I find some more time I will start playing around a bit with it and then I can help…but not promises here either… haha

The only things that I consider priority are the undo/redo (#23) bug and the missed strokes (#28). If you could point me to their code I could have a look an see if anything seems wrong!

I already fixed this one upstream though!

Should I close this then?

from rnote.

flxzt avatar flxzt commented on May 20, 2024

Again if you need any help please ask :). And the gtk-rs book helped me a ton and the matrix chat channel for gtk-rs is also very helpful for questions with the toolkit.
How the strokes and their behaviour work is that they are split into lists of components (which are fields of the "StrokeState" struct). For example trash_comp to hold the state if the stroke currently is trashed, select_comp to hold the state of selected strokes, render_comp to hold the pixel data, etc.. StrokeState has methods, which are the systems which iterate over these lists and modify their state. (its an ECS pattern, check this video for a better explanation. The undo / redo is in "/src/strokes/trash_comp.rs", more precicely the "undo_last_stroke()" and "redo_last_stroke()" methods. They use the chrono_comp which has holds the variable t, which must be incremented wherever a stroke is inserted or modified. This is needed because the lists don't retain a chronological ordering, meaning iterating over them is more or less in arbitrary order. This way of doing it does not support undoing / redoing of something else than trashing (e.g. translating or resizing a selection), so I want to refactor it into something better anyways

from rnote.

Related Issues (20)

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.