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