| 12345678910111213141516171819202122232425262728293031 |
- #ifndef packing_h
- #define packing_h
- typedef struct _node{
- char cutline;
- double width;
- double height;
- double xcord;
- double ycord;
- struct _node *left;
- struct _node *right;
- } Node;
- typedef struct _stack{
- Node *node;
- struct _stack *next;
- } Stack;
- Node *load_file(char *filename);
- void push(Stack *stackin, Node *nodein);
- Node *pop(Stack *stackin);
- void free_stack(Stack *stackin);
- void set_dimensions(Node *root);
- void set_coordinates(Node *root);
- void find_best_fit(Node *root, double *best_width, double *best_height);
- void print_nodes_inorder(Node *root);
- void print_nodes_postorder(Node *root);
- void save_boxes(char *filename, Node *root);
- void free_tree(Node *root);
- #endif
|