Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00019 * All rights reserved. 00020 * 00021 * The Original Code is: all of this file. 00022 * 00023 * Contributor(s): none yet. 00024 * 00025 * ***** END GPL LICENSE BLOCK ***** 00026 * 00027 */ 00028 00029 #ifndef BLI_RECT_H 00030 #define BLI_RECT_H 00031 00036 struct rctf; 00037 struct rcti; 00038 00039 #ifdef __cplusplus 00040 extern "C" { 00041 #endif 00042 00043 /* BLI_rct.c */ 00051 int BLI_rcti_is_empty(struct rcti *rect); 00052 int BLI_rctf_is_empty(struct rctf *rect); 00053 void BLI_init_rctf(struct rctf *rect, float xmin, float xmax, float ymin, float ymax); 00054 void BLI_init_rcti(struct rcti *rect, int xmin, int xmax, int ymin, int ymax); 00055 void BLI_translate_rctf(struct rctf *rect, float x, float y); 00056 void BLI_translate_rcti(struct rcti *rect, int x, int y); 00057 void BLI_resize_rcti(struct rcti *rect, int x, int y); 00058 void BLI_resize_rctf(struct rctf *rect, float x, float y); 00059 int BLI_in_rcti(struct rcti *rect, int x, int y); 00060 int BLI_in_rctf(struct rctf *rect, float x, float y); 00061 int BLI_isect_rctf(struct rctf *src1, struct rctf *src2, struct rctf *dest); 00062 int BLI_isect_rcti(struct rcti *src1, struct rcti *src2, struct rcti *dest); 00063 void BLI_union_rctf(struct rctf *rcta, struct rctf *rctb); 00064 void BLI_union_rcti(struct rcti *rcti1, struct rcti *rcti2); 00065 void BLI_copy_rcti_rctf(struct rcti *tar, const struct rctf *src); 00066 00067 void print_rctf(const char *str, struct rctf *rect); 00068 void print_rcti(const char *str, struct rcti *rect); 00069 00070 #ifdef __cplusplus 00071 } 00072 #endif 00073 00074 #endif