Start here
Docs are still work in progress and lots of information are missing. Join our Discord server to get help.
Contributing to PixiEditor
Section titled “Contributing to PixiEditor”Hey! Thanks for being interested in the project! It means a lot. This guide will help you get familiar with the codebase.
Before you start
Section titled “Before you start”-
Before you start writing code, it’s best to discuss the changes you want to make. The quickest way to talk with us is on our discord server. You can also make an issue or comment on an existing one. If you want to work on an issue, keep in mind that some issues can be unexpectedly difficult, and some may even be invalid (since anyone can make one).
-
We welcome early pull requests, in fact, you can and should make one before writing any code. This tells everyone what you are working on, and this way you’ll be able to get feedback as you are writing code.
The basics
Section titled “The basics”- PixiEditor is written in C#, .NET
- We use AvaloniaUI framework for the UI and SkiaSharp for everything related to drawing/painting.
- The app has two general parts
- A GUI built in AvaloniaUI
- The PixiEditor’s Core, the part that implements most of the functionality, like drawing, handling layers, keeping track of the changes for the undo system, etc.
PixiEditor is split int several sub-projects:
- Drawie - GPU accelerated drawing library. It manages GPU context, provides it to SkiaSharp, exposes high level drawing API and is responsible for interopping with AvaloniaUI.
- PixiParser - A library for parsing .pixi files.
- PixiDocks - A library for creating and managing dockable windows in AvaloniaUI.
- ColorPicker - A ui component for picking colors and gradients.
All of above subprojects are used via git submodules.
Code main points
Section titled “Code main points”PixiEditor
project (the GUI)
Section titled “PixiEditor project (the GUI)”- The constructor of MainWindow is considered to be the entry point of program.
- Part of the initialization also happens in ViewModelMain, which is the
DataContext
ofMainWindow
- The outside look and layout of PixiEditor’s GUI is defined in .axaml files, located in the Views directory
- The C# code that backs the GUI is mostly located in the ViewModels directory
- ActionAccumulator is the main class that ties the GUI with the Core.
PixiEditor.ChangeableDocument
project (the Core)
Section titled “PixiEditor.ChangeableDocument project (the Core)”- The Changes directory contains all the code used for actions that change the content of the document, specifically the ones that you can undo and redo. Examples include: Drawing, Creating and deleting layers, Changing canvas size, Selecting pixels with the magic wand tool, etc.