• Home
  • Blog
  • C# / Unity
  • C++ / Unreal Engine
  • Python strategy games
  • Python arcade games
  • Python other
  • Machine Learning
  • C
  • Scratch
  • Coding and electronics
  • How I learnt to code
  • Project Euler
  • Feedback
  James L.'s coding

James's blog

what I've been doing.

Open source contributions - Graphite

13/7/2021

0 Comments

 
I have recently been learning Rust, a programming language similar to C and C++ in speed and syntax but with an emphasis on memory safety; for example handling if a variable is None. I found Graphite whilst looking on a Rust newsletter (gamedev.rs/news/020/#graphite). Graphite is a new vector editor built using Rust. The master branch can be found on the web thanks to WASM, which is a portable binary-code format for executable programs similar to assembly except it can be run on all architectures.
Picture
Above is a screenshot of the current master of graphite (editor.graphite.design/). The source code is available at their GitHub repository github.com/GraphiteEditor/Graphite. I have made several contributions available github.com/GraphiteEditor/Graphite/pulls?q=author%3A0hypercube+is%3Amerged including
  • ⬠ Add polygon drawing tool - this allows the user to draw hexagons and other shapes (once the UI is implemented)
  • 🎨 Add colours in Rust - This allowed the frontend to specify the current colour which was then stored with any new shapes that where drawn and added into the svg that is displayed for the user.
  • Add preview for rectangles / shapes / lines - This build upon TrueDoctor's work on adding a preview when dragging a rectangle and applied it to the other tools
  • Add a movable canvas with matrices - This gives all layers a matrix transform and adds the TransformLayer operation. This also allows the user to move the document around with Middle mouse button drag. I found the following guide useful when learning about matrices https://docs.rainmeter.net/tips/transformation-matrix-guide/
  • Navigation - This built upon my previous PR in adding the ability to zoom and rotate the viewport with a series of shortcuts as well as the widgets at the top.  This was the first time I'd used the vue framework so I'd like to thank Keavon for the support.
  • Allow transforming layers - A bugfix adding the ability to transform layers as well as just folders as I'd used the wrong function in the matrices PR.
  • Unmount working on select - Another small bugfix that fixed a problem where when selecting layers with the select tool then layers could not be nudged around or changed visibility until a new shape was drawn
I'm finding that working on a large codebase with other more experienced programmers is helping me mature as a programmer and I'd like to thank TrueDoctor and Keavon for being so supportive.
I was really pleased to receive the following feedback from one of my code reviewers who congratulated me on 'the awesome work you did on this, it's so nicely polished and I hope you're proud of your work on this feature.'
0 Comments
    Advert:

    Author

    I am doing lots of projects every projects all the time and I can't put them all on the website so I've made a blog.

    Archives

    August 2022
    April 2022
    March 2022
    February 2022
    January 2022
    November 2021
    October 2021
    August 2021
    July 2021
    June 2021
    April 2021
    March 2021
    June 2020
    May 2020
    April 2020
    March 2020
    September 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    November 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017

    Categories

    All

Proudly powered by Weebly
  • Home
  • Blog
  • C# / Unity
  • C++ / Unreal Engine
  • Python strategy games
  • Python arcade games
  • Python other
  • Machine Learning
  • C
  • Scratch
  • Coding and electronics
  • How I learnt to code
  • Project Euler
  • Feedback