[go: up one dir, main page]

Menu

#110 Rotate

open
nobody
None
5
2010-10-09
2010-10-09
WG.
No

In xournal you can select a shape with the "select rectangle" tool. You are then able to resize your shape in length, width or both... You are however not able to rotate your shape... Of course this would be a nice addition as well.

off-topic: I would like to contribute to the project. I've good experience with C only never worked on a opensource project so I was wondering where I could start best? Reading all the code? Or you guys maybe have some documentation of how the core functionalities work?

Discussion

  • Denis Auroux

    Denis Auroux - 2010-10-10

    Thanks for the suggestions.

    About contributing to the project: I'd recommend to start by reading some, but not all, of the code. (Unfortunately it's vastly under-documented). Things are usually action-driven: user actions cause callback functions in xo-callbacks.c to be executed (as connected to user interface items by glade), and those in turn rely on functions that are usually in xo-paint.c, xo-file.c, xo-print.c or xo-misc.c depending on what it's about. User actions that require more than a single step of processing and/or can be undone are typically associated with ITEM_... action types, as declared in xournal.h. The best way to add a relatively incremental feature is to understand how another, fairly similar, feature is implemented.

    E.g., to implement the present suggestion (which is a more reasonable place to start than your other idea -- the shape library is a larger undertaking), you'd probably want to first look at how the resizing feature is implemented. That one has no user interface items specifically associated with it, so no specific callbacks in xo-callbacks.c; instead search for "resize" (case insensitive) (grep -i resize * in the source directory) and see what comes up; then read the code around these areas, the functions called by these parts of the code, and what calls these functions. See how the resizing is initiated by a response to a button press event. See how undo/redo of the resizing gets handled. Then you'll be in good shape to implement rotation.

    Denis

     
  • WG.

    WG. - 2010-10-11

    Thank you for your comment auroux. I was indeed planning to implement the rotate function first. I will see what I can do in the upcoming weeks since I also got exams coming up.

    Further more FYI I quited with Windows only because of xournal :-P Xournal has a great shape recognition, also the ruler is just really awesome. With windows journal you don't have that tools without going into several menu's or you need to use Onenote but that program is far to proces.sor heavy when you are running in battery saving mode in which I sometime am running because of 3 hour college.

     

Log in to post a comment.