libmypaint 1.6.1
Loading...
Searching...
No Matches
/builddir/build/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
25
33typedef struct {
35 int x;
37 int y;
39 int width;
41 int height;
43
51typedef struct {
67
81
94
109
111
112#endif // MYPAINTRECTANGLE_H
#define G_END_DECLS
Definition mypaint-glib-compat.h:14
#define G_BEGIN_DECLS
Definition mypaint-glib-compat.h:13
Representation of a rectangle, integer values: (x, y, w, h)
Definition mypaint-rectangle.h:33
int width
The width of the rectangle.
Definition mypaint-rectangle.h:39
int y
The x-coordinate of the rectangle's top-left corner.
Definition mypaint-rectangle.h:37
int height
The height of the rectangle.
Definition mypaint-rectangle.h:41
int x
The x-coordinate of the rectangle's top-left corner.
Definition mypaint-rectangle.h:35
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 *r)
Create a copy of the given rectangle.
void mypaint_rectangle_expand_to_include_rect(MyPaintRectangle *r, MyPaintRectangle *other)
Minimally expand a rectangle so that it fully contains another.
Holds the size and location of a MyPaintRectangle array.
Definition mypaint-rectangle.h:51
int num_rectangles
The number of rectangles.
Definition mypaint-rectangle.h:58
MyPaintRectangle * rectangles
Pointer to a single, or an array of, MyPaintRectangles.
Definition mypaint-rectangle.h:65