GDS-Render v1.2.1
bounding-box.c File Reference

Calculation of bounding boxes. More...

#include <stdio.h>
#include <math.h>
#include <gds-render/geometric/bounding-box.h>
Include dependency graph for bounding-box.c:

Go to the source code of this file.

Macros

#define MIN(a, b)   (((a) < (b)) ? (a) : (b))
 Return smaller number. More...
 
#define MAX(a, b)   (((a) > (b)) ? (a) : (b))
 Return bigger number. More...
 
#define ABS_DBL(a)   ((a) < 0 ? -(a) : (a))
 

Functions

void bounding_box_calculate_from_polygon (GList *vertices, conv_generic_to_vector_2d_t conv_func, union bounding_box *box)
 Calculate bounding box of polygon. More...
 
void bounding_box_update_with_box (union bounding_box *destination, union bounding_box *update)
 Update an exisitng bounding box with another one. More...
 
void bounding_box_prepare_empty (union bounding_box *box)
 Prepare an empty bounding box. More...
 
static void calculate_path_miter_points (struct vector_2d *a, struct vector_2d *b, struct vector_2d *c, struct vector_2d *m1, struct vector_2d *m2, double width)
 Calculate path miter points for a pathwith a width and the anchors a b c. More...
 
void bounding_box_update_with_path (GList *vertices, double thickness, conv_generic_to_vector_2d_t conv_func, union bounding_box *box)
 Calculate the bounding box of a path and update the given bounding box. More...
 
void bounding_box_update_with_point (union bounding_box *destination, conv_generic_to_vector_2d_t conv_func, void *pt)
 Update bounding box with a point. More...
 
void bounding_box_get_all_points (struct vector_2d *points, union bounding_box *box)
 Return all four corner points of a bounding box. More...
 
void bounding_box_apply_transform (double scale, double rotation_deg, bool flip_at_x, union bounding_box *box)
 Apply transformations onto bounding box. More...
 

Detailed Description

Calculation of bounding boxes.

Author
Mario Hüttel mario.nosp@m..hue.nosp@m.ttel@.nosp@m.gmx..nosp@m.net

Definition in file bounding-box.c.