Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gskroundedrect.h
Go to the documentation of this file.
1/* GSK - The GTK Scene Kit
2 *
3 * Copyright 2016 Endless
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library 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 GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#pragma once
20
21#if !defined (__GSK_H_INSIDE__) && !defined (GTK_COMPILATION)
22#error "Only <gsk/gsk.h> can be included directly."
23#endif
24
25#include <gsk/gsktypes.h>
26
28
29/**
30 * GSK_ROUNDED_RECT_INIT:
31 * @_x: the X coordinate of the origin
32 * @_y: the Y coordinate of the origin
33 * @_w: the width
34 * @_h: the height
35 *
36 * Initializes a `GskRoundedRect` when declaring it.
37 * All corner sizes will be initialized to 0.
38 */
39#define GSK_ROUNDED_RECT_INIT(_x,_y,_w,_h) (GskRoundedRect) { .bounds = GRAPHENE_RECT_INIT(_x,_y,_w,_h), \
40 .corner = { \
41 GRAPHENE_SIZE_INIT(0, 0),\
42 GRAPHENE_SIZE_INIT(0, 0),\
43 GRAPHENE_SIZE_INIT(0, 0),\
44 GRAPHENE_SIZE_INIT(0, 0),\
45 }}
46
53
56 const graphene_rect_t *bounds,
57 const graphene_size_t *top_left,
58 const graphene_size_t *top_right,
59 const graphene_size_t *bottom_right,
60 const graphene_size_t *bottom_left);
63 const GskRoundedRect *src);
66 const graphene_rect_t *bounds,
67 float radius);
68
71
74 float dx,
75 float dy);
78 float top,
79 float right,
80 float bottom,
81 float left);
82
87 const graphene_point_t *point) G_GNUC_PURE;
90 const graphene_rect_t *rect) G_GNUC_PURE;
93 const graphene_rect_t *rect) G_GNUC_PURE;
94
96
#define GDK_AVAILABLE_IN_ALL
#define G_GNUC_PURE
Definition gmacros.h:287
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
GDK_AVAILABLE_IN_ALL GskRoundedRect * gsk_rounded_rect_offset(GskRoundedRect *self, float dx, float dy)
GDK_AVAILABLE_IN_ALL gboolean gsk_rounded_rect_contains_point(const GskRoundedRect *self, const graphene_point_t *point) G_GNUC_PURE
GDK_AVAILABLE_IN_ALL GskRoundedRect * gsk_rounded_rect_init_from_rect(GskRoundedRect *self, const graphene_rect_t *bounds, float radius)
GDK_AVAILABLE_IN_ALL gboolean gsk_rounded_rect_intersects_rect(const GskRoundedRect *self, const graphene_rect_t *rect) G_GNUC_PURE
GDK_AVAILABLE_IN_ALL gboolean gsk_rounded_rect_is_rectilinear(const GskRoundedRect *self) G_GNUC_PURE
GDK_AVAILABLE_IN_ALL GskRoundedRect * gsk_rounded_rect_init_copy(GskRoundedRect *self, const GskRoundedRect *src)
GDK_AVAILABLE_IN_ALL GskRoundedRect * gsk_rounded_rect_shrink(GskRoundedRect *self, float top, float right, float bottom, float left)
GDK_AVAILABLE_IN_ALL gboolean gsk_rounded_rect_contains_rect(const GskRoundedRect *self, const graphene_rect_t *rect) G_GNUC_PURE
GDK_AVAILABLE_IN_ALL GskRoundedRect * gsk_rounded_rect_normalize(GskRoundedRect *self)
GDK_AVAILABLE_IN_ALL GskRoundedRect * gsk_rounded_rect_init(GskRoundedRect *self, const graphene_rect_t *bounds, const graphene_size_t *top_left, const graphene_size_t *top_right, const graphene_size_t *bottom_right, const graphene_size_t *bottom_left)
gint gboolean
Definition gtypes.h:56
lu_byte right
lu_byte left
graphene_size_t corner[4]
graphene_rect_t bounds