Main Page | Data Structures | File List | Data Fields | Globals

mr_line.h

Go to the documentation of this file.
00001 /* The Partitions Musics Recognition System project.
00002  * (c)2003 by Fabien Pelisson (fabien dot pelisson at wanadoo dot fr)
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (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
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 #ifndef MR_LINE_H
00020 #define MR_LINE_H
00021 
00022 #ifdef __cplusplus
00023 extern              "C"
00024 {
00025 #endif                          /* __cplusplus */
00026 
00028 #define MR_LINE_DIFF_X1(l1,l2) ((l1).x1 - (l2).x1)
00029 
00031 #define MR_LINE_DIFF_Y1(l1,l2) ((l1).y1 - (l2).y1)
00032 
00034 #define MR_BB_WIDTH(bb)  ((bb).x2 - (bb).x1)
00035 
00037 #define MR_BB_HEIGHT(bb) ((bb).y2 - (bb).y1)
00038 
00039 typedef struct MrLine MrLine;
00040 
00048 struct MrLine
00049 {
00051   int x1, y1;
00053   int x2, y2;
00054 };
00055 
00057 MrLine* mr_line_new();
00058 
00060 MrLine* mr_line_new_init(int x1, int y1, int x2, int y2);
00061 
00063 void mr_line_set(MrLine* dst, const MrLine* src);
00064 
00066 void mr_line_free(void* l);
00067 
00068 #ifdef __cplusplus
00069 }
00070 #endif                          /* __cplusplus */
00071 
00072 #endif /* MR_LINE_H */

Generated on Sun Apr 9 17:29:40 2006 for MusicReco by  doxygen 1.4.4