# mdc15/pix2d architecture

> Architecture diagram of the GitHub repository mdc15/pix2d, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mdc15/pix2d
- Repository: https://github.com/mdc15/pix2d

## Overview

Pix2D is a cross-platform pixel-art, sprite, and animation editor. The main user journey is to create or open a project, edit artwork on the canvas using drawing and selection tools, organize layers and frames, then export to an image format. The graph also preserves documented effects, palettes, text, grids, plugins, and platform support. Many feature modules are represented by their exact tree paths, but their internal calls were not sampled; those links are marked dashed with no evidence path.

Main entry points: [`Sources/Core/Pix2d.Infrastructure/Logger/Logger.cs`](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Infrastructure/Logger/Logger.cs) (Logging and analytics), [`Sources/Core/Pix2d.Core/EditorApp.cs`](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/EditorApp.cs) (Application startup), [`Sources/Core/Pix2d.Core/SkiaCanvas.cs`](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/SkiaCanvas.cs) (Canvas and viewport), [`Sources/Core/Pix2d.Core/Services/Project/ProjectService.cs`](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/Project/ProjectService.cs) (Project management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Application shell"]
  node_app["Application startup<br/>[EditorApp.cs]"]
  node_mainview["Editor UI<br/>[MainView.cs]"]
end

subgraph group_editing["Canvas editing"]
  node_canvas["Canvas and viewport<br/>[SkiaCanvas.cs]"]
  node_drawing["Pixel drawing tools<br/>[Tools]"]
  node_selection["Selection and transforms"]
  node_effects["Layer effects<br/>[BaseEffects]"]
  node_text["Pixel text<br/>[PixelText]"]
  node_palette["Palette controls<br/>[PaletteService.cs]"]
end

subgraph group_project["Project and animation"]
  node_projectservice["Project management<br/>[ProjectService.cs]"]
  node_sprite["Sprite and layers<br/>[Sprite]"]
  node_animation["Frame animation<br/>[Animation]"]
  node_state["Editor state<br/>[AppState.cs]"]
end

subgraph group_io["Import and export"]
  node_import["Image and project import<br/>[Import]"]
  node_formats["Image format plugins<br/>[ImageFormats]"]
  node_export["Export service<br/>[ExportService.cs]"]
end

subgraph group_platform["Platform and services"]
  node_settings["Application settings<br/>[AppSettings.cs]"]
  node_platformservices["Platform services"]
  node_logger["Logging and analytics<br/>[Logger.cs]"]
  node_logtargets["Log targets<br/>[Logging]"]
  node_review["Review prompts<br/>[ReviewService.cs]"]
end

node_artist(("Artist"))
node_stats[("Usage stats backend")]
node_crash["Crash reporting service"]

node_artist -.->|"starts"| node_app
node_app -->|"loads UI"| node_mainview
node_artist -.->|"uses editor"| node_mainview
node_mainview -.->|"edits artwork"| node_canvas
node_canvas -.->|"draws pixels"| node_drawing
node_canvas -.->|"selects pixels"| node_selection
node_artist -.->|"creates or opens"| node_projectservice
node_projectservice -.->|"edits sprites"| node_sprite
node_sprite -.->|"animates frames"| node_animation
node_projectservice -.->|"tracks project state"| node_state
node_artist -.->|"imports artwork"| node_import
node_import -.->|"uses format handlers"| node_formats
node_artist -.->|"requests export"| node_export
node_export -.->|"exports formats"| node_formats
node_artist -.->|"applies effects"| node_effects
node_artist -.->|"adds text"| node_text
node_artist -.->|"adjusts palette"| node_palette
node_artist -.->|"sets preferences"| node_settings
node_app -.->|"uses platform services"| node_platformservices
node_logger -->|"dispatches entries"| node_logtargets
node_logger -.->|"sends usage events"| node_stats
node_logger -.->|"forwards fatal crashes"| node_crash
node_artist -.->|"responds to prompts"| node_review
node_review -->|"reads and writes"| node_settings

click node_app "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/EditorApp.cs"
click node_mainview "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/UI/MainView.cs"
click node_canvas "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/SkiaCanvas.cs"
click node_drawing "https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/Drawing/Tools"
click node_selection "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Plugins/Drawing/Nodes/SelectionController.cs"
click node_effects "https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/BaseEffects"
click node_text "https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/PixelText"
click node_projectservice "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/Project/ProjectService.cs"
click node_sprite "https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/Sprite"
click node_animation "https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/UI/Animation"
click node_state "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Shared/State/AppState.cs"
click node_import "https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Services/Import"
click node_formats "https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/ImageFormats"
click node_export "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/ExportService.cs"
click node_palette "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/PaletteService.cs"
click node_settings "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/AppSettings.cs"
click node_platformservices "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Shared/Abstract/Services/IPlatformStuffService.cs"
click node_logger "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Infrastructure/Logger/Logger.cs"
click node_logtargets "https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Logging"
click node_review "https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/ReviewService.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_mainview toneBlue
class node_canvas,node_drawing,node_selection,node_effects,node_text,node_palette,node_stats toneAmber
class node_projectservice,node_sprite,node_animation,node_state toneMint
class node_import,node_formats,node_export toneRose
class node_settings,node_platformservices,node_logger,node_logtargets,node_review,node_artist,node_crash toneIndigo
```

## Components

### Application shell

- [Application startup](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/EditorApp.cs): `Sources/Core/Pix2d.Core/EditorApp.cs`
- [Editor UI](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/UI/MainView.cs): `Sources/Core/Pix2d.Core/UI/MainView.cs`

### Canvas editing

- [Canvas and viewport](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/SkiaCanvas.cs): `Sources/Core/Pix2d.Core/SkiaCanvas.cs`
- [Pixel drawing tools](https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/Drawing/Tools): `Sources/Core/Pix2d.Core/Plugins/Drawing/Tools`
- [Selection and transforms](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Plugins/Drawing/Nodes/SelectionController.cs): `Sources/Core/Pix2d.Core/Plugins/Drawing/Nodes/SelectionController.cs`
- [Layer effects](https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/BaseEffects): `Sources/Core/Pix2d.Core/Plugins/BaseEffects`
- [Pixel text](https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/PixelText): `Sources/Core/Pix2d.Core/Plugins/PixelText`
- [Palette controls](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/PaletteService.cs): `Sources/Core/Pix2d.Core/Services/PaletteService.cs`

### Project and animation

- [Project management](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/Project/ProjectService.cs): `Sources/Core/Pix2d.Core/Services/Project/ProjectService.cs`
- [Sprite and layers](https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/Sprite): `Sources/Core/Pix2d.Core/Plugins/Sprite`
- [Frame animation](https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/UI/Animation): `Sources/Core/Pix2d.Core/UI/Animation`
- [Editor state](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Shared/State/AppState.cs): `Sources/Core/Pix2d.Shared/State/AppState.cs`

### Import and export

- [Image and project import](https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Services/Import): `Sources/Core/Pix2d.Core/Services/Import`
- [Image format plugins](https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Plugins/ImageFormats): `Sources/Core/Pix2d.Core/Plugins/ImageFormats`
- [Export service](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/ExportService.cs): `Sources/Core/Pix2d.Core/Services/ExportService.cs`

### Platform and services

- [Application settings](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/AppSettings.cs): `Sources/Core/Pix2d.Core/Services/AppSettings.cs`
- [Platform services](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Shared/Abstract/Services/IPlatformStuffService.cs): `Sources/Core/Pix2d.Shared/Abstract/Services/IPlatformStuffService.cs`
- [Logging and analytics](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Infrastructure/Logger/Logger.cs): `Sources/Core/Pix2d.Infrastructure/Logger/Logger.cs`
- [Log targets](https://github.com/mdc15/pix2d/tree/main/Sources/Core/Pix2d.Core/Logging): `Sources/Core/Pix2d.Core/Logging`
- [Review prompts](https://github.com/mdc15/pix2d/blob/main/Sources/Core/Pix2d.Core/Services/ReviewService.cs): `Sources/Core/Pix2d.Core/Services/ReviewService.cs`

### Other components

- **Artist**
- **Usage stats backend**
- **Crash reporting service**

## Connections

- Artist → Application startup: starts
- Application startup → Editor UI: loads UI (evidence: `Sources/Core/Pix2d.Core/EditorApp.cs`)
- Artist → Editor UI: uses editor (evidence: `README.md`)
- Editor UI → Canvas and viewport: edits artwork (evidence: `README.md`)
- Canvas and viewport → Pixel drawing tools: draws pixels (evidence: `README.md`)
- Canvas and viewport → Selection and transforms: selects pixels
- Artist → Project management: creates or opens (evidence: `README.md`)
- Project management → Sprite and layers: edits sprites
- Sprite and layers → Frame animation: animates frames (evidence: `README.md`)
- Project management → Editor state: tracks project state
- Artist → Image and project import: imports artwork
- Image and project import → Image format plugins: uses format handlers
- Artist → Export service: requests export (evidence: `README.md`)
- Export service → Image format plugins: exports formats (evidence: `README.md`)
- Artist → Layer effects: applies effects (evidence: `README.md`)
- Artist → Pixel text: adds text (evidence: `README.md`)
- Artist → Palette controls: adjusts palette (evidence: `README.md`)
- Artist → Application settings: sets preferences
- Application startup → Platform services: uses platform services (evidence: `Sources/Core/Pix2d.Core/EditorApp.cs`)
- Logging and analytics → Log targets: dispatches entries (evidence: `Sources/Core/Pix2d.Infrastructure/Logger/Logger.cs`)
- Logging and analytics → Usage stats backend: sends usage events (evidence: `README.md`)
- Logging and analytics → Crash reporting service: forwards fatal crashes (evidence: `README.md`)
- Artist → Review prompts: responds to prompts
- Review prompts → Application settings: reads and writes (evidence: `Sources/Core/Pix2d.Core/Services/ReviewService.cs`)
