Files
wlgol/include/pattern.h
T

21 lines
518 B
C
Raw Normal View History

#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