mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Switch int to int16_t.
This commit is contained in:
parent
0384d43304
commit
67b9a815b3
@ -29,15 +29,15 @@ typedef struct size {
|
|||||||
} wsize_t;
|
} wsize_t;
|
||||||
|
|
||||||
typedef struct point {
|
typedef struct point {
|
||||||
int x;
|
int16_t x;
|
||||||
int y;
|
int16_t y;
|
||||||
} point_t;
|
} point_t;
|
||||||
|
|
||||||
typedef struct rectangle {
|
typedef struct rectangle {
|
||||||
int x;
|
int16_t x;
|
||||||
int y;
|
int16_t y;
|
||||||
int w;
|
int16_t w;
|
||||||
int h;
|
int16_t h;
|
||||||
} rectangle_t;
|
} rectangle_t;
|
||||||
|
|
||||||
typedef struct blob {
|
typedef struct blob {
|
||||||
@ -151,12 +151,12 @@ typedef enum interp {
|
|||||||
} interp_t;
|
} interp_t;
|
||||||
|
|
||||||
/* Point functions */
|
/* Point functions */
|
||||||
point_t *point_alloc(int x, int y);
|
point_t *point_alloc(int16_t x, int16_t y);
|
||||||
bool point_equal(point_t *p1, point_t *p2);
|
bool point_equal(point_t *p1, point_t *p2);
|
||||||
float point_distance(point_t *p1, point_t *p2);
|
float point_distance(point_t *p1, point_t *p2);
|
||||||
|
|
||||||
/* Rectangle functions */
|
/* Rectangle functions */
|
||||||
rectangle_t *rectangle_alloc(int x, int y, int w, int h);
|
rectangle_t *rectangle_alloc(int16_t x, int16_t y, int16_t w, int16_t h);
|
||||||
bool rectangle_equal(rectangle_t *r1, rectangle_t *r2);
|
bool rectangle_equal(rectangle_t *r1, rectangle_t *r2);
|
||||||
bool rectangle_intersects(rectangle_t *r1, rectangle_t *r2);
|
bool rectangle_intersects(rectangle_t *r1, rectangle_t *r2);
|
||||||
bool rectangle_subimg(image_t *img, rectangle_t *r, rectangle_t *r_out);
|
bool rectangle_subimg(image_t *img, rectangle_t *r, rectangle_t *r_out);
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
#include "imlib.h"
|
#include "imlib.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
point_t *point_alloc(int x, int y)
|
point_t *point_alloc(int16_t x, int16_t y)
|
||||||
{
|
{
|
||||||
point_t *p = xalloc(sizeof(point_t));
|
point_t *p = xalloc(sizeof(point_t));
|
||||||
p->x = x;
|
p->x = x;
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
#include "array.h"
|
#include "array.h"
|
||||||
#include "xalloc.h"
|
#include "xalloc.h"
|
||||||
|
|
||||||
rectangle_t *rectangle_alloc(int x, int y, int w, int h)
|
rectangle_t *rectangle_alloc(int16_t x, int16_t y, int16_t w, int16_t h)
|
||||||
{
|
{
|
||||||
rectangle_t *r = xalloc(sizeof(rectangle_t));
|
rectangle_t *r = xalloc(sizeof(rectangle_t));
|
||||||
r->x = x;
|
r->x = x;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user