Files
wlgol/include/pattern.h
T
arek 7874a5f7c6 feat: implement keyboard and mouse input, pattern placement, and HiDPI scaling
Add configurable key bindings (TOML), modifier-aware dispatch, mouse-driven
pattern placement with preview and rotation, cell grid storage/rendering,
and fractional/integer HiDPI scaling. Archive the input-and-placement change
and sync its specs to main specs.

Tests: Hashtable, Config, Grid, Pattern (4/4 pass).
2026-11-08 14:46:04 +01:00

21 lines
518 B
C

#ifndef PATTERN_H
#define PATTERN_H
typedef struct { int dx, dy; } cell_offset_t;
typedef struct {
const char *name;
int count;
const cell_offset_t *cells;
} pattern_t;
int pattern_count(void);
const pattern_t *pattern_get(int index);
/* Fill out_dx/out_dy with normalized rotated offsets. Returns cell count. */
int pattern_rotated_offsets(int index, int rotation, int *out_dx, int *out_dy);
/* Bounding box of rotated pattern. */
void pattern_bounds(int index, int rotation, int *w, int *h);
#endif