---
title: "Draw commands (PDC)"
canonical_url: https://developer.repebble.com/pebbleos/docs/reference/formats/pdc/
last_updated: 2026-11-22
sdk_version: 4.44
---
# Draw commands (PDC)

Source: https://developer.repebble.com/pebbleos/docs/reference/formats/pdc/

Pebble Draw Commands are the vector-graphics format behind `GDrawCommand`: an image (`.pdc` / PDCI) or animation sequence (PDCS) of stroke/fill commands rendered at runtime. The packed structs and file magics are defined in `pebble/applib/graphics/gdraw_command_private.h`; files are generated from SVG or JSON by `tools/generate_pdcs/` (the serializers and format docstring live in `tools/generate_pdcs/pebble_commands.py`), and `tools/pdc2png` renders them back to PNG. All multi-byte fields are little-endian.

## Draw command

| 

Field

 | 

Type

 | 

Notes

 |
| --- | --- | --- |
| 

type

 | 

`uint8_t`

 | 

1 = path, 2 = circle, 3 = precise path (0 = invalid)

 |
| 

flags

 | 

`uint8_t`

 | 

bit 0: hidden; bits 1–7 reserved

 |
| 

stroke color

 | 

`uint8_t`

 | 

ARGB8

 |
| 

stroke width

 | 

`uint8_t`

 | 

 |
| 

fill color

 | 

`uint8_t`

 | 

ARGB8

 |
| 

path: open

 | 

`uint8_t` ×2

 | 

1 = open path, 0 = closed; second byte unused

 |
| 

circle: radius

 | 

`uint16_t`

 | 

(shares the two bytes above)

 |
| 

num\_points

 | 

`uint16_t`

 | 

1 for circles

 |
| 

points

 | 

`int16_t` ×2 each

 | 

x, y per point

 |

Path points are whole pixels; precise-path points are 13.3 fixed-point (eighths of a pixel). A command list is a `uint16_t` command count followed by that many commands.

## Coordinate grid

The SVG converters translate input coordinates by (-0.5, -0.5) and round, so source coordinates must sit on the half-pixel grid: multiples of 0.5 px for paths and circles, 0.125 px (1/8) for precise paths. Off-grid points are snapped to the nearest supported coordinate and flagged (`convert_to_pebble_coordinates` in `tools/generate_pdcs/pebble_commands.py` and the annotation emitted by `tools/libs/pblconvert/pblconvert/svg2pdc/pdc.py`).

## File containers

**PDCI (image)**:

| 

Field

 | 

Type

 |
| --- | --- |
| 

magic

 | 

`"PDCI"`

 |
| 

payload size

 | 

`uint32_t`

 |
| 

version

 | 

`uint8_t` (currently 1)

 |
| 

reserved

 | 

`uint8_t`

 |
| 

view-box width, height

 | 

`int16_t` ×2

 |
| 

command list

 | 

 |

**PDCS (sequence)** replaces the command list with animation frames:

| 

Field

 | 

Type

 |
| --- | --- |
| 

magic

 | 

`"PDCS"`

 |
| 

payload size

 | 

`uint32_t`

 |
| 

version, reserved, view-box

 | 

as PDCI

 |
| 

play count

 | 

`uint16_t`

 |
| 

frame count

 | 

`uint16_t`

 |
| 

frames

 | 

`uint16_t` duration (ms) + command list, each

 |

Generated from PebbleOS [5285d4236](https://github.com/coredevices/pebbleos/commit/5285d423600370a73ae94b619748a69933107797). This page is maintained in the pebbleos repository: [docs/reference/formats/pdc.md](https://github.com/coredevices/pebbleos/blob/5285d423600370a73ae94b619748a69933107797/docs/reference/formats/pdc.md).
