libmypaint
1.6.1
Toggle main menu visibility
Loading...
Searching...
No Matches
/builddir/build/BUILD/libmypaint-1.6.1-build/libmypaint-1.6.1/mypaint-rectangle.h
Go to the documentation of this file.
1
#ifndef MYPAINTRECTANGLE_H
2
#define MYPAINTRECTANGLE_H
3
4
/* libmypaint - The MyPaint Brush Library
5
* Copyright (C) 2008 Martin Renold <martinxyz@gmx.ch>
6
* Copyright (C) 2012 Jon Nordby <jononor@gmail.com>
7
*
8
* Permission to use, copy, modify, and/or distribute this software for any
9
* purpose with or without fee is hereby granted, provided that the above
10
* copyright notice and this permission notice appear in all copies.
11
*
12
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
*/
20
21
#include "
mypaint-config.h
"
22
#include "
mypaint-glib-compat.h
"
23
24
G_BEGIN_DECLS
25
33
typedef
struct
{
35
int
x
;
37
int
y
;
39
int
width
;
41
int
height
;
42
}
MyPaintRectangle
;
43
51
typedef
struct
{
58
int
num_rectangles
;
65
MyPaintRectangle
*
rectangles
;
66
}
MyPaintRectangles
;
67
80
void
mypaint_rectangle_expand_to_include_point
(
MyPaintRectangle
*r,
int
x
,
int
y
);
81
93
void
mypaint_rectangle_expand_to_include_rect
(
MyPaintRectangle
*r,
MyPaintRectangle
*other);
94
107
MyPaintRectangle
*
108
mypaint_rectangle_copy
(
MyPaintRectangle
*r);
109
110
G_END_DECLS
111
112
#endif
// MYPAINTRECTANGLE_H
mypaint-config.h
mypaint-glib-compat.h
G_END_DECLS
#define G_END_DECLS
Definition
mypaint-glib-compat.h:14
G_BEGIN_DECLS
#define G_BEGIN_DECLS
Definition
mypaint-glib-compat.h:13
MyPaintRectangle
Representation of a rectangle, integer values: (x, y, w, h).
Definition
mypaint-rectangle.h:33
MyPaintRectangle::width
int width
The width of the rectangle.
Definition
mypaint-rectangle.h:39
MyPaintRectangle::y
int y
The x-coordinate of the rectangle's top-left corner.
Definition
mypaint-rectangle.h:37
MyPaintRectangle::height
int height
The height of the rectangle.
Definition
mypaint-rectangle.h:41
MyPaintRectangle::x
int x
The x-coordinate of the rectangle's top-left corner.
Definition
mypaint-rectangle.h:35
MyPaintRectangle::mypaint_rectangle_expand_to_include_point
void mypaint_rectangle_expand_to_include_point(MyPaintRectangle *r, int x, int y)
Minimally expand a rectangle so that it contains a given point (x, y).
MyPaintRectangle::mypaint_rectangle_copy
MyPaintRectangle * mypaint_rectangle_copy(MyPaintRectangle *r)
Create a copy of the given rectangle.
MyPaintRectangle::mypaint_rectangle_expand_to_include_rect
void mypaint_rectangle_expand_to_include_rect(MyPaintRectangle *r, MyPaintRectangle *other)
Minimally expand a rectangle so that it fully contains another.
MyPaintRectangles
Holds the size and location of a MyPaintRectangle array.
Definition
mypaint-rectangle.h:51
MyPaintRectangles::num_rectangles
int num_rectangles
The number of rectangles.
Definition
mypaint-rectangle.h:58
MyPaintRectangles::rectangles
MyPaintRectangle * rectangles
Pointer to a single, or an array of, MyPaintRectangles.
Definition
mypaint-rectangle.h:65
Generated on
for libmypaint by
1.17.0