2
* Copyright (C) 2001-2004 Michael H. Schimek
3
* Copyright (C) 2000-2003 I�aki Garc�a Etxebarria
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
/* $Id: clip_vector.h,v 1.2 2005/01/31 07:13:06 mschimek Exp $ */
22
#ifndef __ZTV_CLIP_VECTOR_H__
23
#define __ZTV_CLIP_VECTOR_H__
25
#include <inttypes.h> /* uintX_t */
30
/* Overlay clipping rectangle. These are regions you don't want
31
overlaid, with clipping coordinates relative to the top, left
32
corner of the overlay window (not the overlay buffer). */
42
tv_clip_equal (const tv_clip * clip1,
43
const tv_clip * clip2)
45
if (8 == sizeof (tv_clip))
46
return ((* (const uint64_t *) clip1)
47
== (* (const uint64_t *) clip2));
49
return (0 == ((clip1->x1 ^ clip2->x1) |
50
(clip1->y1 ^ clip2->y1) |
51
(clip1->x2 ^ clip2->x2) |
52
(clip1->y2 ^ clip2->y2)));
58
unsigned int capacity;
62
tv_clip_vector_to_clip_mask (tv_clip_vector * vector,
65
__attribute__ ((_tv_nonnull (1)));
67
_tv_clip_vector_add_clip_xy (tv_clip_vector * vector,
72
__attribute__ ((_tv_nonnull (1)));
74
#define tv_clip_vector_add_clip_xy(v,x1,y1,x2,y2) \
75
_tv_clip_vector_add_clip_xy(v,x1,y1,x2,y2)
78
tv_clip_vector_add_clip_wh (tv_clip_vector * vector,
84
return _tv_clip_vector_add_clip_xy (vector,
85
x, y, x + width, y + height);
89
tv_clip_vector_equal (const tv_clip_vector * vector1,
90
const tv_clip_vector * vector2)
91
__attribute__ ((_tv_nonnull (1, 2)));
94
tv_clip_vector_clear (tv_clip_vector * vector)
100
tv_clip_vector_set (tv_clip_vector * dst,
101
const tv_clip_vector * src)
102
__attribute__ ((_tv_nonnull (1)));
104
tv_clip_vector_copy (tv_clip_vector * dst,
105
const tv_clip_vector * src)
106
__attribute__ ((_tv_nonnull (1)));
108
tv_clip_vector_destroy (tv_clip_vector * vector)
109
__attribute__ ((_tv_nonnull (1)));
111
tv_clip_vector_init (tv_clip_vector * vector)
112
__attribute__ ((_tv_nonnull (1)));
116
#endif /* __ZTV_CLIP_VECTOR_H__ */