# adrian-utz/paint architecture

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

- Interactive diagram: https://gitdiagram.com/adrian-utz/paint
- Repository: https://github.com/adrian-utz/paint

## Overview

myPaint is a JavaFX desktop painting application. The principal workflow is selecting a tool and brush settings, then drawing on a canvas with mouse input; the hand tool supports panning and zooming. The README also describes image import/editing and layers, but the sampled files do not show those workflows implemented. Some tool and utility classes are empty, so the graph focuses on evidenced runtime behavior and documented capabilities rather than inferring their connections.

Main entry points: [`myPaint/AppShell.java`](https://github.com/adrian-utz/paint/blob/main/myPaint/AppShell.java) (JavaFX app shell), [`myPaint/controls/MouseListener.java`](https://github.com/adrian-utz/paint/blob/main/myPaint/controls/MouseListener.java) (Mouse event handling), [`myPaint/userTools/BrushTool.java`](https://github.com/adrian-utz/paint/blob/main/myPaint/userTools/BrushTool.java) (Brush rendering), [`myPaint/MainClass.java`](https://github.com/adrian-utz/paint/blob/main/myPaint/MainClass.java) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Application interface"]
  node_entry["Application entry<br/>[MainClass.java]"]
  node_shell["JavaFX app shell<br/>[AppShell.java]"]
  node_canvas["Drawing canvas<br/>[AppShell.java]"]
  node_tooltype["Tool selection state<br/>[ToolType.java]"]
  node_version["Version display<br/>[VersionNumber.java]"]
end

subgraph group_input["Input handling"]
  node_mouse["Mouse event handling<br/>[MouseListener.java]"]
end

subgraph group_tools["Canvas tools and capabilities"]
  node_brush["Brush rendering<br/>[BrushTool.java]"]
  node_hand["Pan and zoom<br/>[HandTool.java]"]
  node_imageedit["Image import and editing"]
  node_layers["Layer management<br/>[Layers.java]"]
end

node_user(("Artist"))

node_user -->|"launches"| node_entry
node_entry -->|"launches"| node_shell
node_shell -->|"creates"| node_canvas
node_shell -->|"creates"| node_brush
node_shell -->|"configures"| node_brush
node_shell -->|"tracks"| node_tooltype
node_shell -->|"displays"| node_version
node_mouse -->|"checks"| node_tooltype
node_mouse -->|"draws with"| node_brush
node_mouse -->|"pans and zooms"| node_hand

click node_entry "https://github.com/adrian-utz/paint/blob/main/myPaint/MainClass.java"
click node_shell "https://github.com/adrian-utz/paint/blob/main/myPaint/AppShell.java"
click node_canvas "https://github.com/adrian-utz/paint/blob/main/myPaint/AppShell.java"
click node_tooltype "https://github.com/adrian-utz/paint/blob/main/myPaint/utils/ToolType.java"
click node_version "https://github.com/adrian-utz/paint/blob/main/myPaint/utils/VersionNumber.java"
click node_mouse "https://github.com/adrian-utz/paint/blob/main/myPaint/controls/MouseListener.java"
click node_brush "https://github.com/adrian-utz/paint/blob/main/myPaint/userTools/BrushTool.java"
click node_hand "https://github.com/adrian-utz/paint/blob/main/myPaint/userTools/HandTool.java"
click node_imageedit "https://github.com/adrian-utz/paint/tree/main/myPaint"
click node_layers "https://github.com/adrian-utz/paint/blob/main/myPaint/utils/Layers.java"

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_entry,node_shell,node_canvas,node_tooltype,node_version toneBlue
class node_mouse toneAmber
class node_brush,node_hand,node_imageedit,node_layers toneMint
class node_user toneIndigo
```

## Components

### Application interface

- [Application entry](https://github.com/adrian-utz/paint/blob/main/myPaint/MainClass.java): `myPaint/MainClass.java`
- [JavaFX app shell](https://github.com/adrian-utz/paint/blob/main/myPaint/AppShell.java): `myPaint/AppShell.java`
- [Drawing canvas](https://github.com/adrian-utz/paint/blob/main/myPaint/AppShell.java): `myPaint/AppShell.java`
- [Tool selection state](https://github.com/adrian-utz/paint/blob/main/myPaint/utils/ToolType.java): `myPaint/utils/ToolType.java`
- [Version display](https://github.com/adrian-utz/paint/blob/main/myPaint/utils/VersionNumber.java): `myPaint/utils/VersionNumber.java`

### Input handling

- [Mouse event handling](https://github.com/adrian-utz/paint/blob/main/myPaint/controls/MouseListener.java): `myPaint/controls/MouseListener.java`

### Canvas tools and capabilities

- [Brush rendering](https://github.com/adrian-utz/paint/blob/main/myPaint/userTools/BrushTool.java): `myPaint/userTools/BrushTool.java`
- [Pan and zoom](https://github.com/adrian-utz/paint/blob/main/myPaint/userTools/HandTool.java): `myPaint/userTools/HandTool.java`
- [Image import and editing](https://github.com/adrian-utz/paint/tree/main/myPaint): `myPaint`
- [Layer management](https://github.com/adrian-utz/paint/blob/main/myPaint/utils/Layers.java): `myPaint/utils/Layers.java`

### Other components

- **Artist**

## Connections

- Artist → Application entry: launches (evidence: `README.md`)
- Application entry → JavaFX app shell: launches (evidence: `myPaint/MainClass.java`)
- JavaFX app shell → Drawing canvas: creates (evidence: `myPaint/AppShell.java`)
- JavaFX app shell → Brush rendering: creates (evidence: `myPaint/AppShell.java`)
- JavaFX app shell → Brush rendering: configures (evidence: `myPaint/AppShell.java`)
- JavaFX app shell → Tool selection state: tracks (evidence: `myPaint/AppShell.java`)
- JavaFX app shell → Version display: displays (evidence: `myPaint/AppShell.java`)
- Mouse event handling → Tool selection state: checks (evidence: `myPaint/controls/MouseListener.java`)
- Mouse event handling → Brush rendering: draws with (evidence: `myPaint/controls/MouseListener.java`)
- Mouse event handling → Pan and zoom: pans and zooms (evidence: `myPaint/controls/MouseListener.java`)
