Compare commits
105 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 21245a8729 | |||
| 45cacd25ce | |||
| 231c0ad77f | |||
| da635d6392 | |||
| b8a103b993 | |||
| 162759f34b | |||
| 2a03e50030 | |||
| fb0f5b5c14 | |||
| cd7726bb31 | |||
| 2b4e577b53 | |||
| 1ed695931f | |||
| 51a44ddd1d | |||
| ac76cadf32 | |||
| 5516ff6a02 | |||
| f2578fcfb9 | |||
| 4da80520b8 | |||
| b12a27083d | |||
| 07ec266a00 | |||
| 965b3025d9 | |||
| 88e74ca21e | |||
| 148da12cfc | |||
| 3ded6ada0c | |||
| 0c39890e0f | |||
| b4977decc1 | |||
| 2da9d5862f | |||
| b948e03e8a | |||
| 2c90cadef4 | |||
| 08c064d79a | |||
| 73853f1a6b | |||
| 8634d67cff | |||
| 125ea90894 | |||
| ffba5a3f42 | |||
| 60df21213b | |||
| 14ba577acb | |||
| 7d5ef1117e | |||
| af0e2bff94 | |||
| 7d65f81d7f | |||
| b08ecfcf9e | |||
| e2cd362f24 | |||
| 1a1b6fe66b | |||
| 122176a3a1 | |||
| 5beccc8208 | |||
| 6715a3267a | |||
| 313078b77c | |||
| 246a7cfeab | |||
| 082fdfdb24 | |||
| 823cb714ec | |||
| cc93347fe6 | |||
| d6a07cd617 | |||
| 858bd9f84c | |||
| be7e5c866f | |||
| 93a90bafc3 | |||
| 090e01b383 | |||
| 03a511aab4 | |||
| 5cf9a09c07 | |||
| 9558c70683 | |||
| 57d98a12fa | |||
| 3dd40049a9 | |||
| 225e626ada | |||
| 081f504ae4 | |||
| 45aa8e4e00 | |||
| 87430be658 | |||
| 012c16ccd6 | |||
| de0cef5d4d | |||
| e807a84967 | |||
| b5e105d4f4 | |||
| a85ab3585e | |||
| a1d40c5236 | |||
| 95ea6b2615 | |||
| 82d8bc9403 | |||
| 536d432444 | |||
| 3b8c26a116 | |||
| 6ace4b60d8 | |||
| 7601b89561 | |||
| 0cdd2e7008 | |||
| 595152bdba | |||
| 90f0733673 | |||
| 625e83e1de | |||
| daac04be82 | |||
| 8ec9bba892 | |||
| b63e365fd2 | |||
| 859a25b0e7 | |||
| f5d47a4658 | |||
| fa6645f157 | |||
| 69b6067c5e | |||
| e645f59748 | |||
| 2929686c1d | |||
| c83256e080 | |||
| 4b7e1b1233 | |||
| 95a8821614 | |||
| 73500f9ebb | |||
| eae38756c2 | |||
| 8bf7187b89 | |||
| e7fb8842b5 | |||
| aaac0cb4a1 | |||
| 67a4279d3f | |||
| dd4b8a4c89 | |||
| 4cc5a54da3 | |||
| 07add0144e | |||
| d1c7376b05 | |||
| a71388d2d6 | |||
| 62176a3bd0 | |||
| 8475a29836 | |||
| 2a96dde115 | |||
| f55b3c68ad |
@@ -6,7 +6,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliar
|
||||
|
||||
:: FIXME: make warnings fatal
|
||||
pip3 install --upgrade --user meson~=0.64 || goto :error
|
||||
meson -Ddebug=false -Dmedia-gstreamer=disabled _build || goto :error
|
||||
meson setup -Dbackend_max_links=1 -Ddebug=false -Dmedia-gstreamer=disabled _build || goto :error
|
||||
ninja -C _build || goto :error
|
||||
|
||||
goto :EOF
|
||||
|
||||
@@ -336,6 +336,7 @@
|
||||
<file>panes.c</file>
|
||||
<file>password_entry.c</file>
|
||||
<file>path_fill.c</file>
|
||||
<file>path_walk.c</file>
|
||||
<file>peg_solitaire.c</file>
|
||||
<file>pickers.c</file>
|
||||
<file>printing.c</file>
|
||||
@@ -421,6 +422,10 @@
|
||||
<gresource prefix="/fontrendering">
|
||||
<file>fontrendering.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/path_walk">
|
||||
<file>path_walk.ui</file>
|
||||
<file compressed="true">path_world.txt</file>
|
||||
</gresource>
|
||||
<gresource prefix="/org/gtk/Demo4">
|
||||
<file>icons/16x16/actions/application-exit.png</file>
|
||||
<file>icons/16x16/actions/document-new.png</file>
|
||||
|
||||
@@ -73,6 +73,7 @@ demos = files([
|
||||
'panes.c',
|
||||
'password_entry.c',
|
||||
'path_fill.c',
|
||||
'path_walk.c',
|
||||
'peg_solitaire.c',
|
||||
'pickers.c',
|
||||
'printing.c',
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
/* Path/Map
|
||||
*
|
||||
* This demo shows how to draw a map using paths.
|
||||
*
|
||||
* The world map that is used here is a path with 211 lines and 1569 cubic
|
||||
* Bėzier segments in 121 contours.
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define GTK_TYPE_PATH_WALK (gtk_path_walk_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GtkPathWalk, gtk_path_walk, GTK, PATH_WALK, GtkWidget)
|
||||
|
||||
#define POINT_SIZE 8
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_PATH,
|
||||
N_PROPS
|
||||
};
|
||||
|
||||
struct _GtkPathWalk
|
||||
{
|
||||
GtkWidget parent_instance;
|
||||
|
||||
GskPath *path;
|
||||
graphene_rect_t bounds;
|
||||
};
|
||||
|
||||
struct _GtkPathWalkClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
};
|
||||
|
||||
static GParamSpec *properties[N_PROPS] = { NULL, };
|
||||
|
||||
G_DEFINE_TYPE (GtkPathWalk, gtk_path_walk, GTK_TYPE_WIDGET)
|
||||
|
||||
static void
|
||||
gtk_path_walk_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
GtkPathWalk *self = GTK_PATH_WALK (widget);
|
||||
double width = gtk_widget_get_width (widget);
|
||||
double height = gtk_widget_get_height (widget);
|
||||
GskStroke *stroke;
|
||||
|
||||
if (self->path == NULL)
|
||||
return;
|
||||
|
||||
gtk_snapshot_save (snapshot);
|
||||
|
||||
stroke = gsk_stroke_new (2.0);
|
||||
gtk_snapshot_push_stroke (snapshot, self->path, stroke);
|
||||
gtk_snapshot_append_color (snapshot, &(GdkRGBA) { 0, 0, 0, 1 }, &GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
gtk_snapshot_pop (snapshot);
|
||||
gsk_stroke_free (stroke);
|
||||
|
||||
gtk_snapshot_restore (snapshot);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_walk_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
int for_size,
|
||||
int *minimum,
|
||||
int *natural,
|
||||
int *minimum_baseline,
|
||||
int *natural_baseline)
|
||||
{
|
||||
GtkPathWalk *self = GTK_PATH_WALK (widget);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
*minimum = *natural = (int) ceilf (self->bounds.size.width);
|
||||
else
|
||||
*minimum = *natural = (int) ceilf (self->bounds.size.height);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_walk_set_path (GtkPathWalk *self,
|
||||
GskPath *path)
|
||||
{
|
||||
if (self->path == path)
|
||||
return;
|
||||
|
||||
g_clear_pointer (&self->path, gsk_path_unref);
|
||||
graphene_rect_init (&self->bounds, 0, 0, 0, 0);
|
||||
if (path)
|
||||
{
|
||||
GskStroke *stroke;
|
||||
|
||||
self->path = gsk_path_ref (path);
|
||||
stroke = gsk_stroke_new (2.0);
|
||||
gsk_path_get_stroke_bounds (path, stroke, &self->bounds);
|
||||
gsk_stroke_free (stroke);
|
||||
}
|
||||
|
||||
gtk_widget_queue_resize (GTK_WIDGET (self));
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PATH]);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_walk_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
|
||||
{
|
||||
GtkPathWalk *self = GTK_PATH_WALK (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_PATH:
|
||||
gtk_path_walk_set_path (self, g_value_get_boxed (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_walk_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkPathWalk *self = GTK_PATH_WALK (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_PATH:
|
||||
g_value_set_boxed (value, self->path);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_walk_dispose (GObject *object)
|
||||
{
|
||||
GtkPathWalk *self = GTK_PATH_WALK (object);
|
||||
|
||||
g_clear_pointer (&self->path, gsk_path_unref);
|
||||
|
||||
G_OBJECT_CLASS (gtk_path_walk_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_walk_class_init (GtkPathWalkClass *klass)
|
||||
{
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->dispose = gtk_path_walk_dispose;
|
||||
object_class->set_property = gtk_path_walk_set_property;
|
||||
object_class->get_property = gtk_path_walk_get_property;
|
||||
|
||||
widget_class->snapshot = gtk_path_walk_snapshot;
|
||||
widget_class->measure = gtk_path_walk_measure;
|
||||
|
||||
properties[PROP_PATH] =
|
||||
g_param_spec_boxed ("path",
|
||||
NULL, NULL,
|
||||
GSK_TYPE_PATH,
|
||||
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||
|
||||
g_object_class_install_properties (object_class, N_PROPS, properties);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_path_walk_init (GtkPathWalk *self)
|
||||
{
|
||||
/* Data taken from
|
||||
* https://commons.wikimedia.org/wiki/Maps_of_the_world#/media/File:Simplified_blank_world_map_without_Antartica_(no_borders).svg
|
||||
*/
|
||||
GBytes *data = g_resources_lookup_data ("/path_walk/path_world.txt", 0, NULL);
|
||||
GskPath *path = gsk_path_parse (g_bytes_get_data (data, NULL));
|
||||
g_bytes_unref (data);
|
||||
gtk_path_walk_set_path (self, path);
|
||||
gsk_path_unref (path);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
gtk_path_walk_new (void)
|
||||
{
|
||||
GtkPathWalk *self;
|
||||
|
||||
self = g_object_new (GTK_TYPE_PATH_WALK, NULL);
|
||||
|
||||
return GTK_WIDGET (self);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_path_walk (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
|
||||
g_type_ensure (GTK_TYPE_PATH_WALK);
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/path_walk/path_walk.ui");
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *) &window);
|
||||
g_object_unref (builder);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
else
|
||||
gtk_window_destroy (GTK_WINDOW (window));
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="title" translatable="yes">World Map</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkPathWalk" id="view">
|
||||
<property name="hexpand">true</property>
|
||||
<property name="vexpand">true</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -36,8 +36,16 @@ content_images = [
|
||||
"gtk-logo.svg",
|
||||
"images/caps-dark.png",
|
||||
"images/caps-light.png",
|
||||
"images/cubic-dark.png",
|
||||
"images/cubic-light.png",
|
||||
"images/directions-dark.png",
|
||||
"images/directions-light.png",
|
||||
"images/join-dark.png",
|
||||
"images/join-light.png",
|
||||
"images/line-dark.png",
|
||||
"images/line-light.png",
|
||||
"images/quad-dark.png",
|
||||
"images/quad-light.png",
|
||||
"images/path-dark.png",
|
||||
"images/path-light.png",
|
||||
]
|
||||
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
|
||||
sodipodi:docname="cubic.svg"
|
||||
inkscape:export-filename="path-dark.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="0.75989759"
|
||||
inkscape:cx="398.73794"
|
||||
inkscape:cy="466.51023"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1123"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false" />
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 65.680232,196.81045 31.85267,-27.20583 3.379138,46.6055 23.3915,-31.31401"
|
||||
id="path6"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
<path
|
||||
style="fill:#f90048;stroke:#a2a2a2;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 52.936092,207.66575 12.60825,-10.20893"
|
||||
id="path4"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:#f90048;stroke:#a2a2a2;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:1, 3;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="m 43.279229,215.31751 8.95641,-7.26298"
|
||||
id="path4-8"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 65.857856,197.15027 c 31.390863,-27.80022 35.053874,18.93262 59.490604,-13.30694"
|
||||
id="path5"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<circle
|
||||
style="fill:#ff0404;fill-opacity:1;stroke:#000064;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
id="path2-8-7"
|
||||
cx="97.246689"
|
||||
cy="169.65689"
|
||||
r="1.5" />
|
||||
<circle
|
||||
style="fill:#818181;fill-opacity:1;stroke:#000064;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
id="path2-8-7-61"
|
||||
cx="65.471832"
|
||||
cy="197.19359"
|
||||
r="1.5" />
|
||||
<circle
|
||||
style="fill:#ff0404;fill-opacity:1;stroke:#000064;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
id="path2-8-7-6"
|
||||
cx="101.05927"
|
||||
cy="215.75879"
|
||||
r="1.5" />
|
||||
<circle
|
||||
style="fill:#ff0404;fill-opacity:1;stroke:#000064;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
id="path2-8-7-6-3"
|
||||
cx="124.97194"
|
||||
cy="184.30319"
|
||||
r="1.5" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,328 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
|
||||
sodipodi:docname="directions.svg"
|
||||
inkscape:export-filename="directions-light.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="1.0746575"
|
||||
inkscape:cx="371.28108"
|
||||
inkscape:cy="266.59657"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1123"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false" />
|
||||
<defs
|
||||
id="defs1">
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="marker5"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Triangle arrow"
|
||||
markerWidth="0.5"
|
||||
markerHeight="0.5"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
||||
id="path5" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="marker3"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Triangle arrow"
|
||||
markerWidth="2"
|
||||
markerHeight="2"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
||||
id="path3" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Triangle"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Triangle arrow"
|
||||
markerWidth="2"
|
||||
markerHeight="2"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
||||
id="path135" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="marker3-8"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Triangle arrow"
|
||||
markerWidth="2"
|
||||
markerHeight="2"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
||||
id="path3-5" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Triangle-0"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Triangle arrow"
|
||||
markerWidth="2"
|
||||
markerHeight="2"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
||||
id="path135-9" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="marker5-9"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Triangle arrow"
|
||||
markerWidth="0.5"
|
||||
markerHeight="0.5"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
||||
id="path5-8" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="marker3-8-4"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Triangle arrow"
|
||||
markerWidth="2"
|
||||
markerHeight="2"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
||||
id="path3-5-4" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Triangle-0-7"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto-start-reverse"
|
||||
inkscape:stockid="Triangle arrow"
|
||||
markerWidth="2"
|
||||
markerHeight="2"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
||||
id="path135-9-6" />
|
||||
</marker>
|
||||
</defs>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;marker-end:url(#marker5)"
|
||||
d="m 27.834229,78.180655 c 21.653076,9.584156 38.648414,3.28592 57.704513,-16.91815 26.702288,3.84691 38.178308,6.290079 51.837088,35.267113"
|
||||
id="path1"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;marker-end:url(#marker5-9)"
|
||||
d="m 91.839025,170.91959 c -22.098283,1.18425 -24.17615,-37.34309 2.699778,-37.47998 20.898567,-0.10644 38.726427,9.19795 51.837087,35.26711"
|
||||
id="path1-8"
|
||||
sodipodi:nodetypes="csc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;marker-start:url(#marker3);marker-end:url(#Triangle)"
|
||||
d="M 52.087008,92.522138 119.92974,29.398044"
|
||||
id="path2"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;marker-start:url(#marker3-8);marker-end:url(#Triangle-0)"
|
||||
d="M 39.037646,53.839137 130.44855,69.048774"
|
||||
id="path2-3"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:transform-center-x="-71.02355"
|
||||
inkscape:transform-center-y="28.680447" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;marker-start:url(#marker3-8-4);marker-end:url(#Triangle-0-7)"
|
||||
d="M 48.764932,133.73955 141.43055,133.1318"
|
||||
id="path2-3-1"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:transform-center-x="-74.875204"
|
||||
inkscape:transform-center-y="16.143612" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88055556px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
x="99.90786"
|
||||
y="24.737305"
|
||||
id="text4"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88055556px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke-width:0.2"
|
||||
x="99.90786"
|
||||
y="24.737305">GSK_PATH_FROM_START</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
x="142.84389"
|
||||
y="128.82414"
|
||||
id="text4-5"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4-7"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke-width:0.2"
|
||||
x="142.84389"
|
||||
y="128.82414">GSK_PATH_FROM_START</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88055556px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
x="29.309605"
|
||||
y="100.65614"
|
||||
id="text5"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88055556px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.2"
|
||||
x="29.309605"
|
||||
y="100.65614">GSK_PATH_TO_START</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
x="14.843884"
|
||||
y="141.82414"
|
||||
id="text5-8"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan5-8"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.2"
|
||||
x="14.843884"
|
||||
y="141.82414">GSK_PATH_TO_START</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
x="135.70834"
|
||||
y="70.811882"
|
||||
id="text6"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan6"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.2"
|
||||
x="135.70834"
|
||||
y="70.811882">GSK_PATH_TO_END</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
x="142.84389"
|
||||
y="141.82416"
|
||||
id="text6-6"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan6-2"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.2"
|
||||
x="142.84389"
|
||||
y="141.82416">GSK_PATH_TO_END</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
x="14.843884"
|
||||
y="48.774254"
|
||||
id="text7"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan7"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.2"
|
||||
x="14.843884"
|
||||
y="48.774254">GSK_PATH_FROM_END</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
x="14.843884"
|
||||
y="128.82414"
|
||||
id="text7-5"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan7-9"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:3.88056px;font-family:Cantarell;-inkscape-font-specification:'Cantarell, Light';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke-width:0.2"
|
||||
x="14.843884"
|
||||
y="128.82414">GSK_PATH_FROM_END</tspan></text>
|
||||
<circle
|
||||
style="fill:#ff0404;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path2-8-9-7"
|
||||
cx="85.343727"
|
||||
cy="61.691891"
|
||||
r="1.5" />
|
||||
<circle
|
||||
style="fill:#ff0404;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="path2-8-9-7-0"
|
||||
cx="93.787331"
|
||||
cy="133.30902"
|
||||
r="1.5" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
|
||||
sodipodi:docname="line.svg"
|
||||
inkscape:export-filename="line-light.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="0.75989759"
|
||||
inkscape:cx="398.73794"
|
||||
inkscape:cy="466.51023"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1123"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false" />
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#f90048;stroke:#a2a2a2;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 52.936092,207.66575 12.60825,-10.20893"
|
||||
id="path4"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:#f90048;stroke:#a2a2a2;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:1, 3;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="m 43.279229,215.31751 8.95641,-7.26298"
|
||||
id="path4-8"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 66.150275,196.9925 40.275255,-5.24977"
|
||||
id="path5"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<circle
|
||||
style="fill:#818181;fill-opacity:1;stroke:#000064;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
id="path2-8-7-61"
|
||||
cx="65.471832"
|
||||
cy="197.19359"
|
||||
r="1.5" />
|
||||
<circle
|
||||
style="fill:#ff0404;fill-opacity:1;stroke:#000064;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
id="path2-8-7-6"
|
||||
cx="106.42249"
|
||||
cy="191.8156"
|
||||
r="1.5" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
inkscape:version="1.3 (0e150ed6c4, 2023-07-21)"
|
||||
sodipodi:docname="path.svg"
|
||||
inkscape:export-filename="path-dark.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:zoom="0.75989759"
|
||||
inkscape:cx="398.07996"
|
||||
inkscape:cy="466.51023"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1123"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false" />
|
||||
<defs
|
||||
id="defs1" />
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#f90048;stroke:#a2a2a2;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 52.936092,207.66575 12.60825,-10.20893"
|
||||
id="path4"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:#f90048;stroke:#a2a2a2;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:1, 3;stroke-dashoffset:0;stroke-opacity:1"
|
||||
d="m 43.279229,215.31751 8.95641,-7.26298"
|
||||
id="path4-8"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 66.150275,196.9925 C 86.276878,182.17569 104.9512,180.54783 123.39945,192.39557"
|
||||
id="path5"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<circle
|
||||
style="fill:#ff0404;fill-opacity:1;stroke:#000064;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
id="path2-8-7"
|
||||
cx="95.69075"
|
||||
cy="175.70657"
|
||||
r="1.5" />
|
||||
<circle
|
||||
style="fill:#818181;fill-opacity:1;stroke:#000064;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
id="path2-8-7-61"
|
||||
cx="65.471832"
|
||||
cy="197.19359"
|
||||
r="1.5" />
|
||||
<circle
|
||||
style="fill:#ff0404;fill-opacity:1;stroke:#000064;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none"
|
||||
id="path2-8-7-6"
|
||||
cx="123.73506"
|
||||
cy="192.49165"
|
||||
r="1.5" />
|
||||
<path
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.2;stroke-linecap:square;stroke-linejoin:bevel;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 65.439496,197.17632 30.328009,-21.33704 28.506125,16.61621"
|
||||
id="path6" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,181 @@
|
||||
.. _gtk4-path-tool(1):
|
||||
|
||||
=================
|
||||
gtk4-path-tool
|
||||
=================
|
||||
|
||||
-----------------------
|
||||
GskPath Utility
|
||||
-----------------------
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
| **gtk4-path-tool** <COMMAND> [OPTIONS...] <PATH>
|
||||
|
|
||||
| **gtk4-path-tool** decompose [OPTIONS...] <PATH>
|
||||
| **gtk4-path-tool** show [OPTIONS...] <PATH>
|
||||
| **gtk4-path-tool** render [OPTIONS...] <PATH>
|
||||
| **gtk4-path-tool** info [OPTIONS...] <PATH>
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
|
||||
``gtk4-path-tool`` can perform various tasks on paths. Paths are specified
|
||||
in SVG syntax, as strings like "M 100 100 C 100 200 200 200 200 100 Z".
|
||||
|
||||
To read a path from a file, use a filename that starts with a '.' or a '/'.
|
||||
To read a path from stdin, use '-'.
|
||||
|
||||
COMMANDS
|
||||
--------
|
||||
|
||||
Decomposing
|
||||
^^^^^^^^^^^
|
||||
|
||||
The ``decompose`` command approximates the path by one with simpler elements.
|
||||
When used without options, the curves of the path are approximated by line
|
||||
segments.
|
||||
|
||||
``--allow-quad``
|
||||
|
||||
Allow quadratic Bézier curves to be used in the generated path.
|
||||
|
||||
``--allow-cubic``
|
||||
|
||||
Allow cubic Bézier curves to be used in the generated path.
|
||||
|
||||
Showing
|
||||
^^^^^^^
|
||||
|
||||
The ``show`` command displays the given path in a window. The interior
|
||||
of the path is filled.
|
||||
|
||||
``--fill-rule=VALUE``
|
||||
|
||||
The fill rule that is used to determine what areas are inside the path.
|
||||
The possible values are ``winding`` or ``even-odd``. The default is ``winding``.
|
||||
|
||||
``--fg-color=COLOR``
|
||||
|
||||
The color that is used to fill the interior of the path or stroke the path.
|
||||
If not specified, black is used.
|
||||
|
||||
``--bg-color=COLOR``
|
||||
|
||||
The color that is used to render the background behind the path.
|
||||
If not specified, white is used.
|
||||
|
||||
``--stroke``
|
||||
|
||||
Stroke the path instead of filling it.
|
||||
|
||||
``--line-width=VALUE``
|
||||
|
||||
The line width to use for the stroke. ``VALUE`` must be a positive number.
|
||||
The default line width is 1.
|
||||
|
||||
``--line-cap=VALUE``
|
||||
|
||||
The cap style to use at line ends. The possible values are ``butt``, ``round``
|
||||
or ``square``. See the SVG specification for details on these styles.
|
||||
The default cap style is ``butt``.
|
||||
|
||||
``--line-join=VALUE``
|
||||
|
||||
The join style to use at line joins. The possible values are ``miter``,
|
||||
``miter-clip``, ``round``, ``bevel`` or ``arcs``. See the SVG specification
|
||||
for details on these styles.
|
||||
The default join style is ``miter``.
|
||||
|
||||
``--miter-limit=VALUE``
|
||||
|
||||
The limit at which to clip miters at line joins. The default value is 4.
|
||||
|
||||
``--dashes=VALUE``
|
||||
|
||||
The dash pattern to use for this stroke. A dash pattern is specified by
|
||||
a comma-separated list of alternating non-negative numbers. Each number
|
||||
provides the length of alternate "on" and "off" portions of the stroke.
|
||||
If the dash pattern is empty, dashing is disabled, which is the default.
|
||||
See the SVG specification for details on dashing.
|
||||
|
||||
``--dash-offset=VALUE``
|
||||
|
||||
The offset into the dash pattern where dashing should begin.
|
||||
The default value is 0.
|
||||
|
||||
Rendering
|
||||
^^^^^^^^^
|
||||
|
||||
The ``render`` command renders the given path as a PNG image.
|
||||
The interior of the path is filled.
|
||||
|
||||
``--fill-rule=VALUE``
|
||||
|
||||
The fill rule that is used to determine what areas are inside the path.
|
||||
The possible values are ``winding`` or ``even-odd``. The default is ``winding``.
|
||||
|
||||
``--fg-color=COLOR``
|
||||
|
||||
The color that is used to fill the interior of the path or stroke the path.
|
||||
If not specified, black is used.
|
||||
|
||||
``--bg-color=COLOR``
|
||||
|
||||
The color that is used to render the background behind the path.
|
||||
If not specified, white is used.
|
||||
|
||||
``--output-file=FILE``
|
||||
|
||||
The file to save the PNG image to.
|
||||
If not specified, "path.png" is used.
|
||||
|
||||
``--stroke``
|
||||
|
||||
Stroke the path instead of filling it.
|
||||
|
||||
``--line-width=VALUE``
|
||||
|
||||
The line width to use for the stroke. ``VALUE`` must be a positive number.
|
||||
The default line width is 1.
|
||||
|
||||
``--line-cap=VALUE``
|
||||
|
||||
The cap style to use at line ends. The possible values are ``butt``, ``round``
|
||||
or ``square``. See the SVG specification for details on these styles.
|
||||
The default cap style is ``butt``.
|
||||
|
||||
``--line-join=VALUE``
|
||||
|
||||
The join style to use at line joins. The possible values are ``miter``,
|
||||
``miter-clip``, ``round``, ``bevel`` or ``arcs``. See the SVG specification
|
||||
for details on these styles.
|
||||
The default join style is ``miter``.
|
||||
|
||||
``--miter-limit=VALUE``
|
||||
|
||||
The limit at which to clip miters at line joins. The default value is 4.
|
||||
|
||||
``--dashes=VALUE``
|
||||
|
||||
The dash pattern to use for this stroke. A dash pattern is specified by
|
||||
a comma-separated list of alternating non-negative numbers. Each number
|
||||
provides the length of alternate "on" and "off" portions of the stroke.
|
||||
If the dash pattern is empty, dashing is disabled, which is the default.
|
||||
See the SVG specification for details on dashing.
|
||||
|
||||
``--dash-offset=VALUE``
|
||||
|
||||
The offset into the dash pattern where dashing should begin.
|
||||
The default value is 0.
|
||||
|
||||
Info
|
||||
^^^^
|
||||
|
||||
The ``info`` command shows various information about the given path,
|
||||
such as its bounding box.
|
||||
|
||||
REFERENCES
|
||||
----------
|
||||
|
||||
- SVG Path Specification, https://www.w3.org/TR/SVG2/paths.html
|
||||
@@ -77,6 +77,7 @@ if get_option('man-pages') and rst2man.found()
|
||||
[ 'gtk4-query-settings', '1', ],
|
||||
[ 'gtk4-rendernode-tool', '1' ],
|
||||
[ 'gtk4-update-icon-cache', '1', ],
|
||||
[ 'gtk4-path-tool', '1', ],
|
||||
]
|
||||
|
||||
if get_option('demos')
|
||||
|
||||
@@ -297,7 +297,7 @@ gdk_clipboard_read_local_async (GdkClipboard *clipboard,
|
||||
{
|
||||
GOutputStream *output_stream;
|
||||
GIOStream *stream;
|
||||
|
||||
|
||||
stream = gdk_pipe_io_stream_new ();
|
||||
output_stream = g_io_stream_get_output_stream (stream);
|
||||
gdk_clipboard_write_async (clipboard,
|
||||
@@ -767,7 +767,7 @@ gdk_clipboard_read_value_internal (GdkClipboard *clipboard,
|
||||
GdkContentFormats *formats;
|
||||
GValue *value;
|
||||
GTask *task;
|
||||
|
||||
|
||||
task = g_task_new (clipboard, cancellable, callback, user_data);
|
||||
g_task_set_priority (task, io_priority);
|
||||
g_task_set_source_tag (task, source_tag);
|
||||
@@ -946,7 +946,7 @@ gdk_clipboard_read_texture_finish (GdkClipboard *clipboard,
|
||||
value = g_task_propagate_pointer (G_TASK (result), error);
|
||||
if (!value)
|
||||
return NULL;
|
||||
|
||||
|
||||
return g_value_dup_object (value);
|
||||
}
|
||||
|
||||
@@ -1011,7 +1011,7 @@ gdk_clipboard_read_text_finish (GdkClipboard *clipboard,
|
||||
value = g_task_propagate_pointer (G_TASK (result), error);
|
||||
if (!value)
|
||||
return NULL;
|
||||
|
||||
|
||||
return g_value_dup_string (value);
|
||||
}
|
||||
|
||||
@@ -1110,7 +1110,7 @@ gdk_clipboard_write_async (GdkClipboard *clipboard,
|
||||
GError *error = NULL;
|
||||
|
||||
g_assert (gtype != G_TYPE_INVALID);
|
||||
|
||||
|
||||
g_value_init (&value, gtype);
|
||||
if (gdk_content_provider_get_value (priv->content, &value, &error))
|
||||
{
|
||||
@@ -1126,7 +1126,7 @@ gdk_clipboard_write_async (GdkClipboard *clipboard,
|
||||
{
|
||||
g_task_return_error (task, error);
|
||||
}
|
||||
|
||||
|
||||
g_value_unset (&value);
|
||||
}
|
||||
else
|
||||
@@ -1148,7 +1148,7 @@ gdk_clipboard_write_finish (GdkClipboard *clipboard,
|
||||
g_return_val_if_fail (g_task_is_valid (result, clipboard), FALSE);
|
||||
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gdk_clipboard_write_async, FALSE);
|
||||
|
||||
return g_task_propagate_boolean (G_TASK (result), error);
|
||||
return g_task_propagate_boolean (G_TASK (result), error);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1248,8 +1248,8 @@ gdk_clipboard_set_content (GdkClipboard *clipboard,
|
||||
* Sets the clipboard to contain the value collected from the given varargs.
|
||||
*
|
||||
* Values should be passed the same way they are passed to other value
|
||||
* collecting APIs, such as [`method@GObject.Object.set`] or
|
||||
* [`func@GObject.signal_emit`].
|
||||
* collecting APIs, such as [method@GObject.Object.set] or
|
||||
* [func@GObject.signal_emit].
|
||||
*
|
||||
* ```c
|
||||
* gdk_clipboard_set (clipboard, GTK_TYPE_STRING, "Hello World");
|
||||
@@ -1263,7 +1263,7 @@ gdk_clipboard_set (GdkClipboard *clipboard,
|
||||
...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
|
||||
g_return_if_fail (GDK_IS_CLIPBOARD (clipboard));
|
||||
|
||||
va_start (args, type);
|
||||
|
||||
@@ -1528,7 +1528,8 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
|
||||
if (gdk_gl_context_get_use_es (context))
|
||||
{
|
||||
priv->has_unpack_subimage = epoxy_has_gl_extension ("GL_EXT_unpack_subimage");
|
||||
priv->has_unpack_subimage = gdk_gl_version_greater_equal (&priv->gl_version, &GDK_GL_VERSION_INIT (3, 0)) ||
|
||||
epoxy_has_gl_extension ("GL_EXT_unpack_subimage");
|
||||
priv->has_khr_debug = epoxy_has_gl_extension ("GL_KHR_debug");
|
||||
}
|
||||
else
|
||||
|
||||
@@ -153,7 +153,7 @@ gdk_gl_texture_find_format (gboolean use_es,
|
||||
if (gdk_memory_format_alpha (format) != alpha)
|
||||
continue;
|
||||
|
||||
if (!gdk_memory_format_gl_format (format, use_es, gl_major, gl_minor, &q_internal_format, &q_format, &q_type, &q_swizzle))
|
||||
if (!gdk_memory_format_gl_format (format, use_es, gl_major, gl_minor, &q_internal_format, &q_format, &q_type, q_swizzle))
|
||||
continue;
|
||||
|
||||
if (q_format != gl_format || q_type != gl_type)
|
||||
@@ -188,7 +188,7 @@ gdk_gl_texture_do_download (GdkGLTexture *self,
|
||||
FALSE,
|
||||
major, minor,
|
||||
&gl_internal_format,
|
||||
&gl_format, &gl_type, &gl_swizzle))
|
||||
&gl_format, &gl_type, gl_swizzle))
|
||||
{
|
||||
if (download->stride == expected_stride &&
|
||||
download->format == format)
|
||||
|
||||
@@ -739,12 +739,12 @@ gdk_memory_format_gl_format (GdkMemoryFormat format,
|
||||
guint *out_internal_format,
|
||||
guint *out_format,
|
||||
guint *out_type,
|
||||
GLint (*out_swizzle)[4])
|
||||
GLint out_swizzle[4])
|
||||
{
|
||||
*out_internal_format = memory_formats[format].gl.internal_format;
|
||||
*out_format = memory_formats[format].gl.format;
|
||||
*out_type = memory_formats[format].gl.type;
|
||||
memcpy (out_swizzle, &memory_formats[format].gl.swizzle, sizeof(GLint) * 4);
|
||||
memcpy (out_swizzle, memory_formats[format].gl.swizzle, sizeof(GLint) * 4);
|
||||
|
||||
if (gles)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ gboolean gdk_memory_format_gl_format (GdkMemoryFormat
|
||||
guint *out_internal_format,
|
||||
guint *out_format,
|
||||
guint *out_type,
|
||||
GLint (*out_gizzle)[4]);
|
||||
GLint out_gizzle[4]);
|
||||
|
||||
void gdk_memory_convert (guchar *dest_data,
|
||||
gsize dest_stride,
|
||||
|
||||
@@ -127,3 +127,6 @@ libgdk_wayland = static_library('gdk-wayland',
|
||||
link_with: [ libwayland_cursor, ],
|
||||
dependencies: [ gdk_deps, gdk_wayland_deps ],
|
||||
)
|
||||
|
||||
# Used to generate pkg-config Requires
|
||||
wayland_public_deps = [wlclientdep]
|
||||
|
||||
@@ -86,3 +86,5 @@ libgdk_x11 = static_library('gdk-x11',
|
||||
] + common_cflags,
|
||||
dependencies: [ gdk_deps, gdk_x11_deps, ],
|
||||
)
|
||||
|
||||
x11_public_deps = [x11_dep]
|
||||
|
||||
@@ -1456,7 +1456,7 @@ memory_format_gl_format (GdkMemoryFormat data_format,
|
||||
guint *gl_internalformat,
|
||||
guint *gl_format,
|
||||
guint *gl_type,
|
||||
GLint (*gl_swizzle)[4])
|
||||
GLint gl_swizzle[4])
|
||||
{
|
||||
GdkMemoryDepth depth;
|
||||
|
||||
@@ -1577,7 +1577,7 @@ gsk_gl_command_queue_do_upload_texture_chunk (GskGLCommandQueue *self,
|
||||
&gl_internalformat,
|
||||
&gl_format,
|
||||
&gl_type,
|
||||
&gl_swizzle);
|
||||
gl_swizzle);
|
||||
|
||||
gdk_texture_downloader_init (&downloader, texture);
|
||||
gdk_texture_downloader_set_format (&downloader, data_format);
|
||||
@@ -1595,8 +1595,7 @@ gsk_gl_command_queue_do_upload_texture_chunk (GskGLCommandQueue *self,
|
||||
{
|
||||
glTexSubImage2D (GL_TEXTURE_2D, 0, x, y, width, height, gl_format, gl_type, data);
|
||||
}
|
||||
else if (stride % bpp == 0 &&
|
||||
(gdk_gl_context_check_version (self->context, NULL, "3.0") || gdk_gl_context_has_unpack_subimage (self->context)))
|
||||
else if (stride % bpp == 0 && gdk_gl_context_has_unpack_subimage (self->context))
|
||||
{
|
||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, stride / bpp);
|
||||
|
||||
@@ -1684,7 +1683,7 @@ gsk_gl_command_queue_upload_texture_chunks (GskGLCommandQueue *self,
|
||||
&gl_internalformat,
|
||||
&gl_format,
|
||||
&gl_type,
|
||||
&gl_swizzle);
|
||||
gl_swizzle);
|
||||
|
||||
glTexImage2D (GL_TEXTURE_2D, 0, gl_internalformat, width, height, 0, gl_format, gl_type, NULL);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ struct _GskContourClass
|
||||
GskContour * (* reverse) (const GskContour *contour);
|
||||
int (* get_winding) (const GskContour *contour,
|
||||
const graphene_point_t *point);
|
||||
gsize (* get_n_points) (const GskContour *contour);
|
||||
gsize (* get_n_ops) (const GskContour *contour);
|
||||
gboolean (* get_closest_point) (const GskContour *contour,
|
||||
const graphene_point_t *point,
|
||||
float threshold,
|
||||
@@ -119,6 +119,8 @@ struct _GskStandardContour
|
||||
|
||||
GskPathFlags flags;
|
||||
|
||||
GskBoundingBox bounds;
|
||||
|
||||
gsize n_ops;
|
||||
gsize n_points;
|
||||
graphene_point_t *points;
|
||||
@@ -129,9 +131,13 @@ static gsize
|
||||
gsk_standard_contour_compute_size (gsize n_ops,
|
||||
gsize n_points)
|
||||
{
|
||||
return sizeof (GskStandardContour)
|
||||
+ sizeof (gskpathop) * n_ops
|
||||
+ sizeof (graphene_point_t) * n_points;
|
||||
gsize align = MAX (G_ALIGNOF (graphene_point_t),
|
||||
MAX (G_ALIGNOF (gpointer),
|
||||
G_ALIGNOF (GskStandardContour)));
|
||||
gsize s = sizeof (GskStandardContour)
|
||||
+ sizeof (gskpathop) * n_ops
|
||||
+ sizeof (graphene_point_t) * n_points;
|
||||
return s + (align - (s % align));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -250,7 +256,7 @@ gsk_standard_contour_print (const GskContour *contour,
|
||||
const graphene_point_t *pt = gsk_pathop_points (self->ops[i]);
|
||||
|
||||
switch (gsk_pathop_op (self->ops[i]))
|
||||
{
|
||||
{
|
||||
case GSK_PATH_MOVE:
|
||||
g_string_append (string, "M ");
|
||||
_g_string_append_point (string, &pt[0]);
|
||||
@@ -284,7 +290,7 @@ gsk_standard_contour_print (const GskContour *contour,
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,68 +299,32 @@ gsk_standard_contour_get_bounds (const GskContour *contour,
|
||||
GskBoundingBox *bounds)
|
||||
{
|
||||
const GskStandardContour *self = (const GskStandardContour *) contour;
|
||||
gsize i;
|
||||
|
||||
if (self->n_points == 0)
|
||||
return FALSE;
|
||||
|
||||
gsk_bounding_box_init (bounds, &self->points[0], &self->points[0]);
|
||||
for (i = 1; i < self->n_points; i ++)
|
||||
gsk_bounding_box_expand (bounds, &self->points[i]);
|
||||
*bounds = self->bounds;
|
||||
|
||||
return bounds->max.x > bounds->min.x && bounds->max.y > bounds->min.y;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
add_stroke_bounds (GskPathOperation op,
|
||||
const graphene_point_t *pts,
|
||||
gsize n_pts,
|
||||
gpointer user_data)
|
||||
{
|
||||
struct {
|
||||
GskBoundingBox *bounds;
|
||||
float lw;
|
||||
float mw;
|
||||
} *data = user_data;
|
||||
GskBoundingBox bounds;
|
||||
|
||||
for (int i = 1; i < n_pts - 1; i++)
|
||||
{
|
||||
gsk_bounding_box_init (&bounds,
|
||||
&GRAPHENE_POINT_INIT (pts[i].x - data->lw/2, pts[i].y - data->lw/2),
|
||||
&GRAPHENE_POINT_INIT (pts[i].x + data->lw/2, pts[i].y + data->lw/2));
|
||||
gsk_bounding_box_union (&bounds, data->bounds, data->bounds);
|
||||
}
|
||||
|
||||
gsk_bounding_box_init (&bounds,
|
||||
&GRAPHENE_POINT_INIT (pts[n_pts - 1].x - data->mw/2, pts[n_pts - 1].y - data->mw/2),
|
||||
&GRAPHENE_POINT_INIT (pts[n_pts - 1].x + data->mw/2, pts[n_pts - 1].y + data->mw/2));
|
||||
gsk_bounding_box_union (&bounds, data->bounds, data->bounds);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gsk_standard_contour_get_stroke_bounds (const GskContour *contour,
|
||||
const GskStroke *stroke,
|
||||
GskBoundingBox *bounds)
|
||||
{
|
||||
GskStandardContour *self = (GskStandardContour *) contour;
|
||||
struct {
|
||||
GskBoundingBox *bounds;
|
||||
float lw;
|
||||
float mw;
|
||||
} data;
|
||||
float extra;
|
||||
|
||||
data.bounds = bounds;
|
||||
data.lw = stroke->line_width;
|
||||
data.mw = gsk_stroke_get_join_width (stroke);
|
||||
if (self->n_points == 0)
|
||||
return FALSE;
|
||||
|
||||
gsk_bounding_box_init (bounds,
|
||||
&GRAPHENE_POINT_INIT (self->points[0].x - data.mw/2, self->points[0].y - data.mw/2),
|
||||
&GRAPHENE_POINT_INIT (self->points[0].x + data.mw/2, self->points[0].y + data.mw/2));
|
||||
extra = MAX (stroke->line_width / 2, gsk_stroke_get_join_width (stroke) / 2);
|
||||
|
||||
gsk_standard_contour_foreach (contour, GSK_PATH_TOLERANCE_DEFAULT, add_stroke_bounds, &data);
|
||||
gsk_bounding_box_init (bounds, &GRAPHENE_POINT_INIT (self->bounds.min.x - extra,
|
||||
self->bounds.min.y - extra),
|
||||
&GRAPHENE_POINT_INIT (self->bounds.max.x + extra,
|
||||
self->bounds.max.y + extra));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -380,6 +350,9 @@ gsk_standard_contour_get_winding (const GskContour *contour,
|
||||
GskStandardContour *self = (GskStandardContour *) contour;
|
||||
int winding = 0;
|
||||
|
||||
if (!gsk_bounding_box_contains_point (&self->bounds, point))
|
||||
return 0;
|
||||
|
||||
for (gsize i = 0; i < self->n_ops; i ++)
|
||||
{
|
||||
GskCurve c;
|
||||
@@ -406,7 +379,7 @@ gsk_standard_contour_get_winding (const GskContour *contour,
|
||||
}
|
||||
|
||||
static gsize
|
||||
gsk_standard_contour_get_n_points (const GskContour *contour)
|
||||
gsk_standard_contour_get_n_ops (const GskContour *contour)
|
||||
{
|
||||
GskStandardContour *self = (GskStandardContour *) contour;
|
||||
|
||||
@@ -509,7 +482,8 @@ gsk_standard_contour_get_tangent (const GskContour *contour,
|
||||
idx = point->idx;
|
||||
t = point->t;
|
||||
|
||||
if (t == 0 && direction == GSK_PATH_START)
|
||||
if (t == 0 && (direction == GSK_PATH_FROM_START ||
|
||||
direction == GSK_PATH_TO_START))
|
||||
{
|
||||
/* Look at the previous segment */
|
||||
if (idx > 1)
|
||||
@@ -523,7 +497,8 @@ gsk_standard_contour_get_tangent (const GskContour *contour,
|
||||
t = 1;
|
||||
}
|
||||
}
|
||||
else if (t == 1 && direction == GSK_PATH_END)
|
||||
else if (t == 1 && (direction == GSK_PATH_TO_END ||
|
||||
direction == GSK_PATH_FROM_END))
|
||||
{
|
||||
/* Look at the next segment */
|
||||
if (idx < self->n_ops - 1)
|
||||
@@ -540,6 +515,9 @@ gsk_standard_contour_get_tangent (const GskContour *contour,
|
||||
|
||||
gsk_curve_init (&curve, self->ops[idx]);
|
||||
gsk_curve_get_tangent (&curve, t, tangent);
|
||||
|
||||
if (direction == GSK_PATH_TO_START || direction == GSK_PATH_FROM_END)
|
||||
graphene_vec2_negate (tangent, tangent);
|
||||
}
|
||||
|
||||
static float
|
||||
@@ -583,6 +561,8 @@ gsk_standard_contour_add_segment (const GskContour *contour,
|
||||
GskStandardContour *self = (GskStandardContour *) contour;
|
||||
GskCurve c, c1, c2;
|
||||
|
||||
g_assert (start->idx < self->n_ops);
|
||||
|
||||
gsk_curve_init (&c, self->ops[start->idx]);
|
||||
|
||||
if (start->idx == end->idx)
|
||||
@@ -618,7 +598,7 @@ gsk_standard_contour_add_segment (const GskContour *contour,
|
||||
else if (end->t > 0)
|
||||
{
|
||||
gsk_curve_split (&c, end->t, &c1, &c2);
|
||||
add_curve (&c, builder, &emit_move_to);
|
||||
add_curve (&c1, builder, &emit_move_to);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -636,7 +616,7 @@ static const GskContourClass GSK_STANDARD_CONTOUR_CLASS =
|
||||
gsk_standard_contour_foreach,
|
||||
gsk_standard_contour_reverse,
|
||||
gsk_standard_contour_get_winding,
|
||||
gsk_standard_contour_get_n_points,
|
||||
gsk_standard_contour_get_n_ops,
|
||||
gsk_standard_contour_get_closest_point,
|
||||
gsk_standard_contour_get_position,
|
||||
gsk_standard_contour_get_tangent,
|
||||
@@ -658,7 +638,6 @@ gsk_standard_contour_init (GskContour *contour,
|
||||
|
||||
{
|
||||
GskStandardContour *self = (GskStandardContour *) contour;
|
||||
gsize i;
|
||||
|
||||
self->contour.klass = &GSK_STANDARD_CONTOUR_CLASS;
|
||||
|
||||
@@ -669,11 +648,13 @@ gsk_standard_contour_init (GskContour *contour,
|
||||
memcpy (self->points, points, sizeof (graphene_point_t) * n_points);
|
||||
|
||||
offset += self->points - points;
|
||||
for (i = 0; i < n_ops; i++)
|
||||
{
|
||||
self->ops[i] = gsk_pathop_encode (gsk_pathop_op (ops[i]),
|
||||
gsk_pathop_points (ops[i]) + offset);
|
||||
}
|
||||
for (gsize i = 0; i < n_ops; i++)
|
||||
self->ops[i] = gsk_pathop_encode (gsk_pathop_op (ops[i]),
|
||||
gsk_pathop_points (ops[i]) + offset);
|
||||
|
||||
gsk_bounding_box_init (&self->bounds, &self->points[0], &self->points[0]);
|
||||
for (gsize i = 1; i < self->n_points; i ++)
|
||||
gsk_bounding_box_expand (&self->bounds, &self->points[i]);
|
||||
}
|
||||
|
||||
GskContour *
|
||||
@@ -789,9 +770,9 @@ gsk_contour_get_closest_point (const GskContour *self,
|
||||
}
|
||||
|
||||
gsize
|
||||
gsk_contour_get_n_points (const GskContour *self)
|
||||
gsk_contour_get_n_ops (const GskContour *self)
|
||||
{
|
||||
return self->klass->get_n_points (self);
|
||||
return self->klass->get_n_ops (self);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -57,7 +57,7 @@ void gsk_contour_get_start_end (const GskContou
|
||||
graphene_point_t *end);
|
||||
int gsk_contour_get_winding (const GskContour *self,
|
||||
const graphene_point_t *point);
|
||||
gsize gsk_contour_get_n_points (const GskContour *self);
|
||||
gsize gsk_contour_get_n_ops (const GskContour *self);
|
||||
gboolean gsk_contour_get_closest_point (const GskContour *self,
|
||||
const graphene_point_t *point,
|
||||
float threshold,
|
||||
|
||||
@@ -76,6 +76,10 @@ struct _GskCurveClass
|
||||
GskBoundingBox *bounds);
|
||||
void (* get_tight_bounds) (const GskCurve *curve,
|
||||
GskBoundingBox *bounds);
|
||||
void (* get_derivative) (const GskCurve *curve,
|
||||
GskCurve *derivative);
|
||||
int (* get_crossing) (const GskCurve *curve,
|
||||
const graphene_point_t *point);
|
||||
};
|
||||
|
||||
/* {{{ Utilities */
|
||||
@@ -89,6 +93,51 @@ get_tangent (const graphene_point_t *p0,
|
||||
graphene_vec2_normalize (t, t);
|
||||
}
|
||||
|
||||
static int
|
||||
line_get_crossing (const graphene_point_t *p,
|
||||
const graphene_point_t *p1,
|
||||
const graphene_point_t *p2)
|
||||
{
|
||||
if (p1->y <= p->y)
|
||||
{
|
||||
if (p2->y > p->y)
|
||||
{
|
||||
if ((p2->x - p1->x) * (p->y - p1->y) - (p->x - p1->x) * (p2->y - p1->y) > 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (p2->y <= p->y)
|
||||
{
|
||||
if ((p2->x - p1->x) * (p->y - p1->y) - (p->x - p1->x) * (p2->y - p1->y) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
get_crossing_by_bisection (const GskCurve *curve,
|
||||
const graphene_point_t *point)
|
||||
{
|
||||
GskBoundingBox bounds;
|
||||
GskCurve c1, c2;
|
||||
|
||||
gsk_curve_get_bounds (curve, &bounds);
|
||||
|
||||
if (bounds.max.y < point->y || bounds.min.y > point->y || bounds.max.x < point->x)
|
||||
return 0;
|
||||
|
||||
if (bounds.min.x > point->x)
|
||||
return line_get_crossing (point, gsk_curve_get_start_point (curve), gsk_curve_get_end_point (curve));
|
||||
|
||||
if (graphene_point_distance (&bounds.min, &bounds.max, NULL, NULL) < 0.001)
|
||||
return line_get_crossing (point, gsk_curve_get_start_point (curve), gsk_curve_get_end_point (curve));
|
||||
|
||||
gsk_curve_split (curve, 0.5, &c1, &c2);
|
||||
|
||||
return gsk_curve_get_crossing (&c1, point) + gsk_curve_get_crossing (&c2, point);
|
||||
}
|
||||
|
||||
/* Replace a line by an equivalent quad,
|
||||
* and a quad by an equivalent cubic.
|
||||
*/
|
||||
@@ -311,6 +360,26 @@ gsk_line_curve_get_bounds (const GskCurve *curve,
|
||||
gsk_bounding_box_init (bounds, &pts[0], &pts[1]);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_line_curve_get_derivative (const GskCurve *curve,
|
||||
GskCurve *deriv)
|
||||
{
|
||||
const GskLineCurve *self = &curve->line;
|
||||
graphene_point_t p;
|
||||
|
||||
p.x = self->points[1].x - self->points[0].x;
|
||||
p.y = self->points[1].y - self->points[0].y;
|
||||
|
||||
gsk_line_curve_init_from_points (&deriv->line, GSK_PATH_LINE, &p, &p);
|
||||
}
|
||||
|
||||
static int
|
||||
gsk_line_curve_get_crossing (const GskCurve *curve,
|
||||
const graphene_point_t *point)
|
||||
{
|
||||
return line_get_crossing (point, gsk_curve_get_start_point (curve), gsk_curve_get_end_point (curve));
|
||||
}
|
||||
|
||||
static const GskCurveClass GSK_LINE_CURVE_CLASS = {
|
||||
gsk_line_curve_init,
|
||||
gsk_line_curve_init_foreach,
|
||||
@@ -330,6 +399,8 @@ static const GskCurveClass GSK_LINE_CURVE_CLASS = {
|
||||
gsk_line_curve_decompose_curve,
|
||||
gsk_line_curve_get_bounds,
|
||||
gsk_line_curve_get_bounds,
|
||||
gsk_line_curve_get_derivative,
|
||||
gsk_line_curve_get_crossing,
|
||||
};
|
||||
|
||||
/* }}} */
|
||||
@@ -670,6 +741,28 @@ gsk_quad_curve_get_tight_bounds (const GskCurve *curve,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_quad_curve_get_derivative (const GskCurve *curve,
|
||||
GskCurve *deriv)
|
||||
{
|
||||
const GskQuadCurve *self = &curve->quad;
|
||||
graphene_point_t p[2];
|
||||
|
||||
p[0].x = 2.f * (self->points[1].x - self->points[0].x);
|
||||
p[0].y = 2.f * (self->points[1].y - self->points[0].y);
|
||||
p[1].x = 2.f * (self->points[2].x - self->points[1].x);
|
||||
p[1].y = 2.f * (self->points[2].y - self->points[1].y);
|
||||
|
||||
gsk_line_curve_init_from_points (&deriv->line, GSK_PATH_LINE, &p[0], &p[1]);
|
||||
}
|
||||
|
||||
static int
|
||||
gsk_quad_curve_get_crossing (const GskCurve *curve,
|
||||
const graphene_point_t *point)
|
||||
{
|
||||
return get_crossing_by_bisection (curve, point);
|
||||
}
|
||||
|
||||
static const GskCurveClass GSK_QUAD_CURVE_CLASS = {
|
||||
gsk_quad_curve_init,
|
||||
gsk_quad_curve_init_foreach,
|
||||
@@ -689,6 +782,8 @@ static const GskCurveClass GSK_QUAD_CURVE_CLASS = {
|
||||
gsk_quad_curve_decompose_curve,
|
||||
gsk_quad_curve_get_bounds,
|
||||
gsk_quad_curve_get_tight_bounds,
|
||||
gsk_quad_curve_get_derivative,
|
||||
gsk_quad_curve_get_crossing,
|
||||
};
|
||||
|
||||
/* }}} */
|
||||
@@ -859,61 +954,6 @@ gsk_cubic_curve_reverse (const GskCurve *curve,
|
||||
reverse->cubic.has_coefficients = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_curve_get_derivative (const GskCurve *curve,
|
||||
GskCurve *deriv)
|
||||
{
|
||||
switch (curve->op)
|
||||
{
|
||||
case GSK_PATH_LINE:
|
||||
{
|
||||
const GskLineCurve *self = &curve->line;
|
||||
graphene_point_t p;
|
||||
|
||||
p.x = self->points[1].x - self->points[0].x;
|
||||
p.y = self->points[1].y - self->points[0].y;
|
||||
|
||||
gsk_line_curve_init_from_points (&deriv->line, GSK_PATH_LINE, &p, &p);
|
||||
}
|
||||
break;
|
||||
|
||||
case GSK_PATH_QUAD:
|
||||
{
|
||||
const GskQuadCurve *self = &curve->quad;
|
||||
graphene_point_t p[2];
|
||||
|
||||
p[0].x = 2.f * (self->points[1].x - self->points[0].x);
|
||||
p[0].y = 2.f * (self->points[1].y - self->points[0].y);
|
||||
p[1].x = 2.f * (self->points[2].x - self->points[1].x);
|
||||
p[1].y = 2.f * (self->points[2].y - self->points[1].y);
|
||||
|
||||
gsk_line_curve_init_from_points (&deriv->line, GSK_PATH_LINE, &p[0], &p[1]);
|
||||
}
|
||||
break;
|
||||
|
||||
case GSK_PATH_CUBIC:
|
||||
{
|
||||
const GskCubicCurve *self = &curve->cubic;
|
||||
graphene_point_t p[3];
|
||||
|
||||
p[0].x = 3.f * (self->points[1].x - self->points[0].x);
|
||||
p[0].y = 3.f * (self->points[1].y - self->points[0].y);
|
||||
p[1].x = 3.f * (self->points[2].x - self->points[1].x);
|
||||
p[1].y = 3.f * (self->points[2].y - self->points[1].y);
|
||||
p[2].x = 3.f * (self->points[3].x - self->points[2].x);
|
||||
p[2].y = 3.f * (self->points[3].y - self->points[2].y);
|
||||
|
||||
gsk_quad_curve_init_from_points (&deriv->quad, p);
|
||||
}
|
||||
break;
|
||||
|
||||
case GSK_PATH_MOVE:
|
||||
case GSK_PATH_CLOSE:
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
static inline float
|
||||
cross (const graphene_vec2_t *v1,
|
||||
const graphene_vec2_t *v2)
|
||||
@@ -928,6 +968,9 @@ pow3 (float w)
|
||||
return w * w * w;
|
||||
}
|
||||
|
||||
static void gsk_cubic_curve_get_derivative (const GskCurve *curve,
|
||||
GskCurve *deriv);
|
||||
|
||||
static float
|
||||
gsk_cubic_curve_get_curvature (const GskCurve *curve,
|
||||
float t)
|
||||
@@ -937,8 +980,8 @@ gsk_cubic_curve_get_curvature (const GskCurve *curve,
|
||||
graphene_vec2_t d, dd;
|
||||
float num, denom;
|
||||
|
||||
gsk_curve_get_derivative (curve, &c1);
|
||||
gsk_curve_get_derivative (&c1, &c2);
|
||||
gsk_cubic_curve_get_derivative (curve, &c1);
|
||||
gsk_quad_curve_get_derivative (&c1, &c2);
|
||||
|
||||
gsk_curve_get_point (&c1, t, &p);
|
||||
gsk_curve_get_point (&c2, t, &pp);
|
||||
@@ -1150,6 +1193,30 @@ gsk_cubic_curve_get_tight_bounds (const GskCurve *curve,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_cubic_curve_get_derivative (const GskCurve *curve,
|
||||
GskCurve *deriv)
|
||||
{
|
||||
const GskCubicCurve *self = &curve->cubic;
|
||||
graphene_point_t p[3];
|
||||
|
||||
p[0].x = 3.f * (self->points[1].x - self->points[0].x);
|
||||
p[0].y = 3.f * (self->points[1].y - self->points[0].y);
|
||||
p[1].x = 3.f * (self->points[2].x - self->points[1].x);
|
||||
p[1].y = 3.f * (self->points[2].y - self->points[1].y);
|
||||
p[2].x = 3.f * (self->points[3].x - self->points[2].x);
|
||||
p[2].y = 3.f * (self->points[3].y - self->points[2].y);
|
||||
|
||||
gsk_quad_curve_init_from_points (&deriv->quad, p);
|
||||
}
|
||||
|
||||
static int
|
||||
gsk_cubic_curve_get_crossing (const GskCurve *curve,
|
||||
const graphene_point_t *point)
|
||||
{
|
||||
return get_crossing_by_bisection (curve, point);
|
||||
}
|
||||
|
||||
static const GskCurveClass GSK_CUBIC_CURVE_CLASS = {
|
||||
gsk_cubic_curve_init,
|
||||
gsk_cubic_curve_init_foreach,
|
||||
@@ -1169,6 +1236,8 @@ static const GskCurveClass GSK_CUBIC_CURVE_CLASS = {
|
||||
gsk_cubic_curve_decompose_curve,
|
||||
gsk_cubic_curve_get_bounds,
|
||||
gsk_cubic_curve_get_tight_bounds,
|
||||
gsk_cubic_curve_get_derivative,
|
||||
gsk_cubic_curve_get_crossing,
|
||||
};
|
||||
|
||||
/* }}} */
|
||||
@@ -1359,52 +1428,18 @@ gsk_curve_get_tight_bounds (const GskCurve *curve,
|
||||
get_class (curve->op)->get_tight_bounds (curve, bounds);
|
||||
}
|
||||
|
||||
static inline int
|
||||
line_get_crossing (const graphene_point_t *p,
|
||||
const graphene_point_t *p1,
|
||||
const graphene_point_t *p2)
|
||||
void
|
||||
gsk_curve_get_derivative (const GskCurve *curve,
|
||||
GskCurve *deriv)
|
||||
{
|
||||
if (p1->y <= p->y)
|
||||
{
|
||||
if (p2->y > p->y)
|
||||
{
|
||||
if ((p2->x - p1->x) * (p->y - p1->y) - (p->x - p1->x) * (p2->y - p1->y) > 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (p2->y <= p->y)
|
||||
{
|
||||
if ((p2->x - p1->x) * (p->y - p1->y) - (p->x - p1->x) * (p2->y - p1->y) < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
get_class (curve->op)->get_derivative (curve, deriv);
|
||||
}
|
||||
|
||||
int
|
||||
gsk_curve_get_crossing (const GskCurve *curve,
|
||||
const graphene_point_t *point)
|
||||
{
|
||||
GskBoundingBox bounds;
|
||||
GskCurve c1, c2;
|
||||
|
||||
if (curve->op == GSK_PATH_LINE || curve->op == GSK_PATH_CLOSE)
|
||||
return line_get_crossing (point, gsk_curve_get_start_point (curve), gsk_curve_get_end_point (curve));
|
||||
|
||||
gsk_curve_get_bounds (curve, &bounds);
|
||||
|
||||
if (bounds.max.y < point->y || bounds.min.y > point->y || bounds.max.x < point->x)
|
||||
return 0;
|
||||
|
||||
if (bounds.min.x > point->x)
|
||||
return line_get_crossing (point, gsk_curve_get_start_point (curve), gsk_curve_get_end_point (curve));
|
||||
|
||||
if (graphene_point_distance (&bounds.min, &bounds.max, NULL, NULL) < 0.001)
|
||||
return line_get_crossing (point, gsk_curve_get_start_point (curve), gsk_curve_get_end_point (curve));
|
||||
|
||||
gsk_curve_split (curve, 0.5, &c1, &c2);
|
||||
|
||||
return gsk_curve_get_crossing (&c1, point) + gsk_curve_get_crossing (&c2, point);
|
||||
return get_class (curve->op)->get_crossing (curve, point);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -145,6 +145,8 @@ void gsk_curve_get_bounds (const GskCurve
|
||||
void gsk_curve_get_tight_bounds (const GskCurve *curve,
|
||||
GskBoundingBox *bounds);
|
||||
|
||||
void gsk_curve_get_derivative (const GskCurve *curve,
|
||||
GskCurve *derivative);
|
||||
int gsk_curve_get_crossing (const GskCurve *curve,
|
||||
const graphene_point_t *point);
|
||||
gboolean gsk_curve_get_closest_point (const GskCurve *curve,
|
||||
|
||||
@@ -220,13 +220,16 @@ typedef enum {
|
||||
*
|
||||
* The default line cap style is `GSK_LINE_CAP_BUTT`.
|
||||
*
|
||||
* <picture>
|
||||
* <source srcset="caps-dark.png" media="(prefers-color-scheme: dark)">
|
||||
* <img alt="Line Cap Styles" src="caps-light.png">
|
||||
* </picture>
|
||||
*
|
||||
* New entries may be added in future versions.
|
||||
*
|
||||
* <figure>
|
||||
* <picture>
|
||||
* <source srcset="caps-dark.png" media="(prefers-color-scheme: dark)">
|
||||
* <img alt="Line Cap Styles" src="caps-light.png">
|
||||
* </picture>
|
||||
* <figcaption>GSK_LINE_CAP_BUTT, GSK_LINE_CAP_ROUND, GSK_LINE_CAP_SQUARE</figcaption>
|
||||
* </figure>
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
typedef enum {
|
||||
@@ -247,13 +250,16 @@ typedef enum {
|
||||
*
|
||||
* The default line join style is `GSK_LINE_JOIN_MITER`.
|
||||
*
|
||||
* <picture>
|
||||
* <source srcset="join-dark.png" media="(prefers-color-scheme: dark)">
|
||||
* <img alt="Line Join Styles" src="join-light.png">
|
||||
* </picture>
|
||||
*
|
||||
* New entries may be added in future versions.
|
||||
*
|
||||
* <figure>
|
||||
* <picture>
|
||||
* <source srcset="join-dark.png" media="(prefers-color-scheme: dark)">
|
||||
* <img alt="Line Join Styles" src="join-light.png">
|
||||
* </picture>
|
||||
* <figcaption>GSK_LINE_JOINT_MITER, GSK_LINE_JOINT_ROUND, GSK_LINE_JOIN_BEVEL</figcaption>
|
||||
* </figure>
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
typedef enum {
|
||||
@@ -292,17 +298,34 @@ typedef enum {
|
||||
|
||||
/**
|
||||
* GskPathDirection:
|
||||
* @GSK_PATH_START: The side that leads to the start of the path
|
||||
* @GSK_PATH_END: The side that leads to the end of the path
|
||||
* @GSK_PATH_FROM_START: The tangent in path direction of the incoming side
|
||||
* of the path
|
||||
* @GSK_PATH_TO_START: The tangent against path direction of the incoming side
|
||||
* of the path
|
||||
* @GSK_PATH_TO_END: The tangent in path direction of the outgoing side
|
||||
* of the path
|
||||
* @GSK_PATH_FROM_END: The tangent against path direction of the outgoing
|
||||
* side of the path
|
||||
*
|
||||
* The values of the `GskPathDirection` enum are used to pick one
|
||||
* of the two sides of the path that at a given point on the path.
|
||||
* of the four tangents at a given point on the path.
|
||||
*
|
||||
* Note that the directions for @GSK_PATH_FROM_START/@GSK_PATH_TO_END and
|
||||
* @GSK_PATH_TO_START/@GSK_PATH_FROM_END will coincide for smooth points.
|
||||
* Only sharp turns will exhibit four different directions.
|
||||
*
|
||||
* <picture>
|
||||
* <source srcset="directions-dark.png" media="(prefers-color-scheme: dark)">
|
||||
* <img alt="Path Tangents" src="directions-light.png">
|
||||
* </picture>
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
typedef enum {
|
||||
GSK_PATH_START,
|
||||
GSK_PATH_END
|
||||
GSK_PATH_FROM_START,
|
||||
GSK_PATH_TO_START,
|
||||
GSK_PATH_TO_END,
|
||||
GSK_PATH_FROM_END,
|
||||
} GskPathDirection;
|
||||
|
||||
/**
|
||||
|
||||
@@ -302,7 +302,7 @@ gsk_path_to_cairo (GskPath *self,
|
||||
cr);
|
||||
}
|
||||
|
||||
/*< private >
|
||||
/**
|
||||
* gsk_path_get_n_contours:
|
||||
* @path: a `GskPath`
|
||||
*
|
||||
@@ -311,8 +311,10 @@ gsk_path_to_cairo (GskPath *self,
|
||||
* Returns: the number of contours in @path
|
||||
*/
|
||||
gsize
|
||||
gsk_path_get_n_contours (const GskPath *self)
|
||||
gsk_path_get_n_contours (GskPath *self)
|
||||
{
|
||||
g_return_val_if_fail (self != NULL, 0);
|
||||
|
||||
return self->n_contours;
|
||||
}
|
||||
|
||||
@@ -559,7 +561,7 @@ gsk_path_get_end_point (GskPath *self,
|
||||
return FALSE;
|
||||
|
||||
res->contour = self->n_contours - 1;
|
||||
res->idx = gsk_contour_get_n_points (self->contours[self->n_contours - 1]) - 1;
|
||||
res->idx = gsk_contour_get_n_ops (self->contours[self->n_contours - 1]) - 1;
|
||||
res->t = 1;
|
||||
|
||||
return TRUE;
|
||||
@@ -914,7 +916,7 @@ parse_command (const char **p,
|
||||
if (*cmd == 'X')
|
||||
allowed = "mM";
|
||||
else
|
||||
allowed = "mMhHvVzZlLcCsStTqQoOaA";
|
||||
allowed = "mMhHvVzZlLcCsStTqQaA";
|
||||
|
||||
skip_whitespace (p);
|
||||
s = _strchr (allowed, **p);
|
||||
@@ -927,81 +929,6 @@ parse_command (const char **p,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_string (const char **p,
|
||||
const char *s)
|
||||
{
|
||||
int len = strlen (s);
|
||||
if (strncmp (*p, s, len) != 0)
|
||||
return FALSE;
|
||||
(*p) += len;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_rectangle (const char **p,
|
||||
double *x,
|
||||
double *y,
|
||||
double *w,
|
||||
double *h)
|
||||
{
|
||||
const char *o = *p;
|
||||
double w2;
|
||||
|
||||
/* Check for M%g,%gh%gv%gh%gz without any intervening whitespace */
|
||||
if (parse_coordinate_pair (p, x, y) &&
|
||||
parse_string (p, "h") &&
|
||||
parse_coordinate (p, w) &&
|
||||
parse_string (p, "v") &&
|
||||
parse_coordinate (p, h) &&
|
||||
parse_string (p, "h") &&
|
||||
parse_coordinate (p, &w2) &&
|
||||
parse_string (p, "z") &&
|
||||
w2 == - *w)
|
||||
{
|
||||
skip_whitespace (p);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
*p = o;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_circle (const char **p,
|
||||
double *sx,
|
||||
double *sy,
|
||||
double *r)
|
||||
{
|
||||
const char *o = *p;
|
||||
double r1, r2, r3, mx, my, ex, ey;
|
||||
|
||||
/* Check for M%g,%gA%g,%g,0,1,0,%g,%gA%g,%g,0,1,0,%g,%g
|
||||
* without any intervening whitespace
|
||||
*/
|
||||
if (parse_coordinate_pair (p, sx, sy) &&
|
||||
parse_string (p, "A") &&
|
||||
parse_coordinate_pair (p, r, &r1) &&
|
||||
parse_string (p, "0 0 0") &&
|
||||
parse_coordinate_pair (p, &mx, &my) &&
|
||||
parse_string (p, "A") &&
|
||||
parse_coordinate_pair (p, &r2, &r3) &&
|
||||
parse_string (p, "0 0 0") &&
|
||||
parse_coordinate_pair (p, &ex, &ey) &&
|
||||
parse_string (p, "z") &&
|
||||
*r == r1 && r1 == r2 && r2 == r3 &&
|
||||
*sx == ex && *sy == ey)
|
||||
{
|
||||
skip_whitespace (p);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
*p = o;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_path_parse:
|
||||
* @string: a string
|
||||
@@ -1084,31 +1011,9 @@ gsk_path_parse (const char *string)
|
||||
case 'M':
|
||||
case 'm':
|
||||
{
|
||||
double x1, y1, w, h, r;
|
||||
double x1, y1;
|
||||
|
||||
if (parse_rectangle (&p, &x1, &y1, &w, &h))
|
||||
{
|
||||
gsk_path_builder_add_rect (builder, &GRAPHENE_RECT_INIT (x1, y1, w, h));
|
||||
if (_strchr ("zZX", prev_cmd))
|
||||
{
|
||||
path_x = x1;
|
||||
path_y = y1;
|
||||
}
|
||||
x = x1;
|
||||
y = y1;
|
||||
}
|
||||
else if (parse_circle (&p, &x1, &y1, &r))
|
||||
{
|
||||
gsk_path_builder_add_circle (builder, &GRAPHENE_POINT_INIT (x1 - r, y1), r);
|
||||
if (_strchr ("zZX", prev_cmd))
|
||||
{
|
||||
path_x = x1;
|
||||
path_y = y1;
|
||||
}
|
||||
x = x1;
|
||||
y = y1;
|
||||
}
|
||||
else if (parse_coordinate_pair (&p, &x1, &y1))
|
||||
if (parse_coordinate_pair (&p, &x1, &y1))
|
||||
{
|
||||
if (cmd == 'm')
|
||||
{
|
||||
|
||||
@@ -92,6 +92,9 @@ GDK_AVAILABLE_IN_4_14
|
||||
void gsk_path_to_cairo (GskPath *self,
|
||||
cairo_t *cr);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
gsize gsk_path_get_n_contours (GskPath *self);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
gboolean gsk_path_is_empty (GskPath *self);
|
||||
|
||||
|
||||
@@ -180,6 +180,9 @@ gsk_path_builder_append_current (GskPathBuilder *self,
|
||||
self->current_point = points[n_points - 1];
|
||||
}
|
||||
|
||||
static void add_contour (GskPathBuilder *self,
|
||||
GskContour *contour);
|
||||
|
||||
static void
|
||||
gsk_path_builder_end_current (GskPathBuilder *self)
|
||||
{
|
||||
@@ -199,7 +202,16 @@ gsk_path_builder_end_current (GskPathBuilder *self)
|
||||
g_array_set_size (self->points, 0);
|
||||
|
||||
/* do this at the end to avoid inflooping when add_contour calls back here */
|
||||
gsk_path_builder_add_contour (self, contour);
|
||||
add_contour (self, contour);
|
||||
}
|
||||
|
||||
static void
|
||||
add_contour (GskPathBuilder *self,
|
||||
GskContour *contour)
|
||||
{
|
||||
gsk_path_builder_end_current (self);
|
||||
|
||||
self->contours = g_slist_prepend (self->contours, contour);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -298,15 +310,6 @@ gsk_path_builder_to_path (GskPathBuilder *self)
|
||||
return path;
|
||||
}
|
||||
|
||||
void
|
||||
gsk_path_builder_add_contour (GskPathBuilder *self,
|
||||
GskContour *contour)
|
||||
{
|
||||
gsk_path_builder_end_current (self);
|
||||
|
||||
self->contours = g_slist_prepend (self->contours, contour);
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_path_builder_get_current_point:
|
||||
* @self: a `GskPathBuilder`
|
||||
@@ -350,7 +353,7 @@ gsk_path_builder_add_path (GskPathBuilder *self,
|
||||
{
|
||||
const GskContour *contour = gsk_path_get_contour (path, i);
|
||||
|
||||
gsk_path_builder_add_contour (self, gsk_contour_dup (contour));
|
||||
add_contour (self, gsk_contour_dup (contour));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -374,7 +377,7 @@ gsk_path_builder_add_reverse_path (GskPathBuilder *self,
|
||||
{
|
||||
const GskContour *contour = gsk_path_get_contour (path, i - 1);
|
||||
|
||||
gsk_path_builder_add_contour (self, gsk_contour_reverse (contour));
|
||||
add_contour (self, gsk_contour_reverse (contour));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,6 +445,8 @@ gsk_path_builder_add_cairo_path (GskPathBuilder *self,
|
||||
*
|
||||
* Adds @rect as a new contour to the path built by the builder.
|
||||
*
|
||||
* The path is going around the rectangle in clockwise direction.
|
||||
*
|
||||
* If the width or height of the rectangle is negative, the start
|
||||
* point will be on the right or bottom, respectively.
|
||||
*
|
||||
@@ -476,7 +481,11 @@ gsk_path_builder_add_rect (GskPathBuilder *self,
|
||||
* @rect: the rounded rect
|
||||
*
|
||||
* Adds @rect as a new contour to the path built in @self.
|
||||
**/
|
||||
*
|
||||
* The path is going around the rectangle in clockwise direction.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
gsk_path_builder_add_rounded_rect (GskPathBuilder *self,
|
||||
const GskRoundedRect *rect)
|
||||
@@ -562,6 +571,8 @@ circle_contour_curve (const graphene_point_t pts[4],
|
||||
*
|
||||
* Adds a circle with the @center and @radius.
|
||||
*
|
||||
* The path is going around the circle in clockwise direction.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
@@ -649,6 +660,11 @@ gsk_path_builder_rel_move_to (GskPathBuilder *self,
|
||||
* Draws a line from the current point to @x, @y and makes it
|
||||
* the new current point.
|
||||
*
|
||||
* <picture>
|
||||
* <source srcset="line-dark.png" media="(prefers-color-scheme: dark)">
|
||||
* <img alt="Line To" src="line-light.png">
|
||||
* </picture>
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
@@ -708,6 +724,11 @@ gsk_path_builder_rel_line_to (GskPathBuilder *self,
|
||||
*
|
||||
* After this, @x2, @y2 will be the new current point.
|
||||
*
|
||||
* <picture>
|
||||
* <source srcset="quad-dark.png" media="(prefers-color-scheme: dark)">
|
||||
* <img alt="Quad To" src="quad-light.png">
|
||||
* </picture>
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
@@ -775,6 +796,11 @@ gsk_path_builder_rel_quad_to (GskPathBuilder *self,
|
||||
* from the current point to @x3, @y3 with @x1, @y1 and @x2, @y2 as the control
|
||||
* points.
|
||||
*
|
||||
* <picture>
|
||||
* <source srcset="cubic-dark.png" media="(prefers-color-scheme: dark)">
|
||||
* <img alt="Cubic To" src="cubic-light.png">
|
||||
* </picture>
|
||||
*
|
||||
* After this, @x3, @y3 will be the new current point.
|
||||
*
|
||||
* Since: 4.14
|
||||
@@ -1092,7 +1118,8 @@ gsk_path_builder_add_layout (GskPathBuilder *self,
|
||||
* will be connected.
|
||||
*
|
||||
* Note that this method always adds a path with the given start point
|
||||
* and end point. To add a closed path, use [method@Gsk.PathBuilder.add_path].
|
||||
* and end point. To add a closed path, use [method@Gsk.PathBuilder.add_path]
|
||||
* of [method@Gsk.PathBuilder.add_contour].
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
@@ -1107,6 +1134,7 @@ gsk_path_builder_add_segment (GskPathBuilder *self,
|
||||
const GskContour *contour;
|
||||
gsize n_contours = gsk_path_get_n_contours (path);
|
||||
graphene_point_t current;
|
||||
gsize n_ops;
|
||||
|
||||
g_return_if_fail (self != NULL);
|
||||
g_return_if_fail (path != NULL);
|
||||
@@ -1118,6 +1146,7 @@ gsk_path_builder_add_segment (GskPathBuilder *self,
|
||||
current = self->current_point;
|
||||
|
||||
contour = gsk_path_get_contour (path, s->contour);
|
||||
n_ops = gsk_contour_get_n_ops (contour);
|
||||
|
||||
if (s->contour == e->contour)
|
||||
{
|
||||
@@ -1128,29 +1157,63 @@ gsk_path_builder_add_segment (GskPathBuilder *self,
|
||||
}
|
||||
else if (n_contours == 1)
|
||||
{
|
||||
gsk_contour_add_segment (contour, self, TRUE,
|
||||
s,
|
||||
&(GskRealPathPoint) { s->contour, gsk_contour_get_n_points (contour) - 1, 1 });
|
||||
gsk_contour_add_segment (contour, self, FALSE,
|
||||
if (n_ops > 1)
|
||||
gsk_contour_add_segment (contour, self, TRUE,
|
||||
s,
|
||||
&(GskRealPathPoint) { s->contour, n_ops - 1, 1 });
|
||||
gsk_contour_add_segment (contour, self, n_ops <= 1,
|
||||
&(GskRealPathPoint) { s->contour, 1, 0 },
|
||||
e);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
gsk_contour_add_segment (contour, self, TRUE,
|
||||
s,
|
||||
&(GskRealPathPoint) { s->contour, gsk_contour_get_n_points (contour) - 1, 1 });
|
||||
if (n_ops > 1)
|
||||
gsk_contour_add_segment (contour, self, TRUE,
|
||||
s,
|
||||
&(GskRealPathPoint) { s->contour, n_ops - 1, 1. });
|
||||
|
||||
for (gsize i = (s->contour + 1) % n_contours; i != e->contour; i = (i + 1) % n_contours)
|
||||
gsk_path_builder_add_contour (self, gsk_contour_dup (gsk_path_get_contour (path, i)));
|
||||
{
|
||||
const GskContour *contour = gsk_path_get_contour (path, i);
|
||||
|
||||
add_contour (self, gsk_contour_dup (contour));
|
||||
}
|
||||
|
||||
contour = gsk_path_get_contour (path, e->contour);
|
||||
gsk_contour_add_segment (contour, self, FALSE,
|
||||
&(GskRealPathPoint) { e->contour, 1, 0 },
|
||||
e);
|
||||
n_ops = gsk_contour_get_n_ops (contour);
|
||||
|
||||
if (n_ops > 1)
|
||||
gsk_contour_add_segment (contour, self, TRUE,
|
||||
&(GskRealPathPoint) { e->contour, 1, 0 },
|
||||
e);
|
||||
|
||||
out:
|
||||
gsk_path_builder_end_current (self);
|
||||
self->current_point = current;
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_path_builder_add_contour:
|
||||
* @self: a `GskPathBuilder`
|
||||
* @path: the `GskPath` to take the contour from
|
||||
* @contour: the index of the contour to take
|
||||
*
|
||||
* Adds one of the connected contours of @path to @self.
|
||||
*
|
||||
* Use [method@Gsk.Path.get_n_contours] to find out how
|
||||
* many contours a path has.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
gsk_path_builder_add_contour (GskPathBuilder *self,
|
||||
GskPath *path,
|
||||
gsize contour)
|
||||
{
|
||||
g_return_if_fail (self != NULL);
|
||||
g_return_if_fail (path != NULL);
|
||||
g_return_if_fail (contour < gsk_path_get_n_contours (path));
|
||||
|
||||
add_contour (self, gsk_contour_dup (gsk_path_get_contour (path, contour)));
|
||||
}
|
||||
|
||||
@@ -76,6 +76,12 @@ void gsk_path_builder_add_segment (GskPathBuilder
|
||||
GskPath *path,
|
||||
const GskPathPoint *start,
|
||||
const GskPathPoint *end);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
void gsk_path_builder_add_contour (GskPathBuilder *self,
|
||||
GskPath *path,
|
||||
gsize contour);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
void gsk_path_builder_move_to (GskPathBuilder *self,
|
||||
float x,
|
||||
|
||||
@@ -19,12 +19,16 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "gskpathpointprivate.h"
|
||||
|
||||
#include "gskcontourprivate.h"
|
||||
|
||||
#include "gdk/gdkprivate.h"
|
||||
|
||||
#define RAD_TO_DEG(x) ((x) / (G_PI / 180.f))
|
||||
|
||||
/**
|
||||
* GskPathPoint:
|
||||
*
|
||||
@@ -139,8 +143,8 @@ gsk_path_point_compare (const GskPathPoint *point1,
|
||||
|
||||
/**
|
||||
* gsk_path_point_get_position:
|
||||
* @path: a `GskPath`
|
||||
* @point: a `GskPathPoint` on @path
|
||||
* @point: a `GskPathPoint`
|
||||
* @path: the path that @point is on
|
||||
* @position: (out caller-allocates): Return location for
|
||||
* the coordinates of the point
|
||||
*
|
||||
@@ -149,15 +153,15 @@ gsk_path_point_compare (const GskPathPoint *point1,
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
gsk_path_point_get_position (GskPath *path,
|
||||
const GskPathPoint *point,
|
||||
gsk_path_point_get_position (const GskPathPoint *point,
|
||||
GskPath *path,
|
||||
graphene_point_t *position)
|
||||
{
|
||||
GskRealPathPoint *self = (GskRealPathPoint *) point;
|
||||
const GskContour *contour;
|
||||
|
||||
g_return_if_fail (self != NULL);
|
||||
g_return_if_fail (path != NULL);
|
||||
g_return_if_fail (point != NULL);
|
||||
g_return_if_fail (position != NULL);
|
||||
g_return_if_fail (self->contour < gsk_path_get_n_contours (path));
|
||||
|
||||
@@ -167,8 +171,8 @@ gsk_path_point_get_position (GskPath *path,
|
||||
|
||||
/**
|
||||
* gsk_path_point_get_tangent:
|
||||
* @path: a `GskPath`
|
||||
* @point: a `GskPathPoint` on @path
|
||||
* @point: a `GskPathPoint`
|
||||
* @path: the path that @point is on
|
||||
* @direction: the direction for which to return the tangent
|
||||
* @tangent: (out caller-allocates): Return location for
|
||||
* the tangent at the point
|
||||
@@ -181,19 +185,23 @@ gsk_path_point_get_position (GskPath *path,
|
||||
* point, and the direction coming out of it. The @direction
|
||||
* argument lets you choose which one to get.
|
||||
*
|
||||
* If you want to orient something in the direction of the
|
||||
* path, [method@Gsk.PathPoint.get_rotation] may be more
|
||||
* convenient to use.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
gsk_path_point_get_tangent (GskPath *path,
|
||||
const GskPathPoint *point,
|
||||
gsk_path_point_get_tangent (const GskPathPoint *point,
|
||||
GskPath *path,
|
||||
GskPathDirection direction,
|
||||
graphene_vec2_t *tangent)
|
||||
{
|
||||
GskRealPathPoint *self = (GskRealPathPoint *) point;
|
||||
const GskContour *contour;
|
||||
|
||||
g_return_if_fail (self != NULL);
|
||||
g_return_if_fail (path != NULL);
|
||||
g_return_if_fail (point != NULL);
|
||||
g_return_if_fail (tangent != NULL);
|
||||
g_return_if_fail (self->contour < gsk_path_get_n_contours (path));
|
||||
|
||||
@@ -201,10 +209,44 @@ gsk_path_point_get_tangent (GskPath *path,
|
||||
gsk_contour_get_tangent (contour, self, direction, tangent);
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_path_point_get_rotation:
|
||||
* @point: a `GskPathPoint`
|
||||
* @path: the path that @point is on
|
||||
* @direction: the direction for which to return the rotation
|
||||
*
|
||||
* Gets the direction of the tangent at a given point.
|
||||
*
|
||||
* This is a convenience variant of [method@Gsk.PathPoint.get_tangent]
|
||||
* that returns the angle between the tangent and the X axis. The angle
|
||||
* can e.g. be used in [method@Gtk.Snapshot.rotate].
|
||||
*
|
||||
* Returns: the angle between the tangent and the X axis, in degrees
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
float
|
||||
gsk_path_point_get_rotation (const GskPathPoint *point,
|
||||
GskPath *path,
|
||||
GskPathDirection direction)
|
||||
{
|
||||
GskRealPathPoint *self = (GskRealPathPoint *) point;
|
||||
graphene_vec2_t tangent;
|
||||
|
||||
g_return_val_if_fail (self != NULL, 0);
|
||||
g_return_val_if_fail (path != NULL, 0);
|
||||
g_return_val_if_fail (self->contour < gsk_path_get_n_contours (path), 0);
|
||||
|
||||
gsk_path_point_get_tangent (point, path, direction, &tangent);
|
||||
|
||||
return RAD_TO_DEG (atan2f (graphene_vec2_get_y (&tangent),
|
||||
graphene_vec2_get_x (&tangent)));
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_path_point_get_curvature:
|
||||
* @path: a `GskPath`
|
||||
* @point: a `GskPathPoint` on @path
|
||||
* @point: a `GskPathPoint`
|
||||
* @path: the path that @point is on
|
||||
* @center: (out caller-allocates) (nullable): Return location for
|
||||
* the center of the osculating circle
|
||||
*
|
||||
@@ -220,15 +262,15 @@ gsk_path_point_get_tangent (GskPath *path,
|
||||
* Since: 4.14
|
||||
*/
|
||||
float
|
||||
gsk_path_point_get_curvature (GskPath *path,
|
||||
const GskPathPoint *point,
|
||||
gsk_path_point_get_curvature (const GskPathPoint *point,
|
||||
GskPath *path,
|
||||
graphene_point_t *center)
|
||||
{
|
||||
GskRealPathPoint *self = (GskRealPathPoint *) point;
|
||||
const GskContour *contour;
|
||||
|
||||
g_return_val_if_fail (self != NULL, 0);
|
||||
g_return_val_if_fail (path != NULL, 0);
|
||||
g_return_val_if_fail (point != NULL, 0);
|
||||
g_return_val_if_fail (self->contour < gsk_path_get_n_contours (path), 0);
|
||||
|
||||
contour = gsk_path_get_contour (path, self->contour);
|
||||
|
||||
@@ -57,19 +57,24 @@ int gsk_path_point_compare (const GskPathPoint *poin
|
||||
const GskPathPoint *point2);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
void gsk_path_point_get_position (GskPath *path,
|
||||
const GskPathPoint *point,
|
||||
void gsk_path_point_get_position (const GskPathPoint *point,
|
||||
GskPath *path,
|
||||
graphene_point_t *position);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
void gsk_path_point_get_tangent (GskPath *path,
|
||||
const GskPathPoint *point,
|
||||
void gsk_path_point_get_tangent (const GskPathPoint *point,
|
||||
GskPath *path,
|
||||
GskPathDirection direction,
|
||||
graphene_vec2_t *tangent);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
float gsk_path_point_get_curvature (GskPath *path,
|
||||
const GskPathPoint *point,
|
||||
float gsk_path_point_get_rotation (const GskPathPoint *point,
|
||||
GskPath *path,
|
||||
GskPathDirection direction);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
float gsk_path_point_get_curvature (const GskPathPoint *point,
|
||||
GskPath *path,
|
||||
graphene_point_t *center);
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ typedef struct _GskRealPathPoint GskRealPathPoint;
|
||||
|
||||
GskPath * gsk_path_new_from_contours (const GSList *contours);
|
||||
|
||||
gsize gsk_path_get_n_contours (const GskPath *self);
|
||||
const GskContour * gsk_path_get_contour (const GskPath *self,
|
||||
gsize i);
|
||||
|
||||
@@ -52,10 +51,6 @@ gboolean gsk_path_foreach_with_tolerance (GskPath
|
||||
GskPathForeachFunc func,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
void gsk_path_builder_add_contour (GskPathBuilder *builder,
|
||||
GskContour *contour);
|
||||
|
||||
void gsk_path_builder_svg_arc_to (GskPathBuilder *builder,
|
||||
float rx,
|
||||
float ry,
|
||||
|
||||
@@ -35,7 +35,6 @@ G_BEGIN_DECLS
|
||||
|
||||
#define GSK_SERIALIZATION_ERROR (gsk_serialization_error_quark ())
|
||||
|
||||
typedef struct _GskRenderNode GskRenderNode;
|
||||
typedef struct _GskColorStop GskColorStop;
|
||||
typedef struct _GskShadow GskShadow;
|
||||
|
||||
|
||||
@@ -3841,11 +3841,12 @@ gsk_color_matrix_node_class_init (gpointer g_class,
|
||||
* Creates a `GskRenderNode` that will drawn the @child with
|
||||
* @color_matrix.
|
||||
*
|
||||
* In particular, the node will transform the operation
|
||||
* In particular, the node will transform colors by applying
|
||||
*
|
||||
* pixel = color_matrix * pixel + color_offset
|
||||
* pixel = transpose(color_matrix) * pixel + color_offset
|
||||
*
|
||||
* for every pixel.
|
||||
* for every pixel. The transformation operates on unpremultiplied
|
||||
* colors, with color components ordered R, G, B, A.
|
||||
*
|
||||
* Returns: (transfer full) (type GskColorMatrixNode): A new `GskRenderNode`
|
||||
*/
|
||||
|
||||
@@ -428,8 +428,7 @@ gsk_stroke_set_dash (GskStroke *self,
|
||||
/**
|
||||
* gsk_stroke_get_dash:
|
||||
* @self: a `GskStroke`
|
||||
* @n_dash: (out caller-allocates): number of elements
|
||||
* in the array returned
|
||||
* @n_dash: (out): number of elements in the array returned
|
||||
*
|
||||
* Gets the dash array in use or `NULL` if dashing is disabled.
|
||||
*
|
||||
|
||||
@@ -29,6 +29,7 @@ typedef struct _GskPath GskPath;
|
||||
typedef struct _GskPathBuilder GskPathBuilder;
|
||||
typedef struct _GskPathPoint GskPathPoint;
|
||||
typedef struct _GskRenderer GskRenderer;
|
||||
typedef struct _GskRenderNode GskRenderNode;
|
||||
typedef struct _GskStroke GskStroke;
|
||||
typedef struct _GskTransform GskTransform;
|
||||
|
||||
|
||||
@@ -234,8 +234,8 @@
|
||||
* API as they come in. Usually `GtkCellArea` is only interested in
|
||||
* button events, however some customized derived areas can be implemented
|
||||
* who are interested in handling other events. Handling an event can
|
||||
* trigger the [`signal@Gtk.CellArea::focus-changed`] signal to fire; as well
|
||||
* as [`signal@Gtk.CellArea::add-editable`] in the case that an editable cell
|
||||
* trigger the [signal@Gtk.CellArea::focus-changed] signal to fire; as well
|
||||
* as [signal@Gtk.CellArea::add-editable] in the case that an editable cell
|
||||
* was clicked and needs to start editing. You can call
|
||||
* [method@Gtk.CellArea.stop_editing] at any time to cancel any cell editing
|
||||
* that is currently in progress.
|
||||
|
||||
@@ -1140,7 +1140,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
|
||||
* @column: (nullable): the `GtkTreeViewColumn` in which the activation occurred
|
||||
*
|
||||
* The "row-activated" signal is emitted when the method
|
||||
* [`method@Gtk.TreeView.row_activated`] is called.
|
||||
* [method@Gtk.TreeView.row_activated] is called.
|
||||
*
|
||||
* This signal is emitted when the user double-clicks a treeview row with the
|
||||
* [property@Gtk.TreeView:activate-on-single-click] property set to %FALSE,
|
||||
|
||||
@@ -937,13 +937,13 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column)
|
||||
if ((!alternative && priv->sort_order == GTK_SORT_ASCENDING) ||
|
||||
(alternative && priv->sort_order == GTK_SORT_DESCENDING))
|
||||
{
|
||||
gtk_widget_remove_css_class (arrow, "descending");
|
||||
gtk_widget_add_css_class (arrow, "ascending");
|
||||
gtk_widget_remove_css_class (arrow, "ascending");
|
||||
gtk_widget_add_css_class (arrow, "descending");
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_remove_css_class (arrow, "ascending");
|
||||
gtk_widget_add_css_class (arrow, "descending");
|
||||
gtk_widget_remove_css_class (arrow, "descending");
|
||||
gtk_widget_add_css_class (arrow, "ascending");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -459,7 +459,8 @@ gsk_pango_renderer_release (GskPangoRenderer *renderer)
|
||||
*
|
||||
* Creates render nodes for rendering @layout in the given foregound @color
|
||||
* and appends them to the current node of @snapshot without changing the
|
||||
* current node.
|
||||
* current node. The current theme's foreground color for a widget can be
|
||||
* obtained with [method@Gtk.Widget.get_color].
|
||||
*
|
||||
* Note that if the layout does not produce any visible output, then nodes
|
||||
* may not be added to the @snapshot.
|
||||
|
||||
@@ -566,7 +566,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
|
||||
* A logo for the about box.
|
||||
*
|
||||
* If it is `NULL`, the default window icon set with
|
||||
* [id@gtk_window_set_default_icon_name] will be used.
|
||||
* [func@Gtk.Window.set_default_icon_name] will be used.
|
||||
*/
|
||||
props[PROP_LOGO] =
|
||||
g_param_spec_object ("logo", NULL, NULL,
|
||||
|
||||
@@ -45,6 +45,7 @@ static GdkContentProvider *
|
||||
double x,
|
||||
double y,
|
||||
GtkColorDialogButton *self);
|
||||
static void activated (GtkColorDialogButton *self);
|
||||
static void button_clicked (GtkColorDialogButton *self);
|
||||
static void update_button_sensitivity
|
||||
(GtkColorDialogButton *self);
|
||||
@@ -96,8 +97,17 @@ enum
|
||||
NUM_PROPERTIES
|
||||
};
|
||||
|
||||
/* Signals */
|
||||
enum
|
||||
{
|
||||
SIGNAL_ACTIVATE = 1,
|
||||
NUM_SIGNALS
|
||||
};
|
||||
|
||||
static GParamSpec *properties[NUM_PROPERTIES];
|
||||
|
||||
static unsigned int color_dialog_button_signals[NUM_SIGNALS] = { 0 };
|
||||
|
||||
G_DEFINE_TYPE (GtkColorDialogButton, gtk_color_dialog_button, GTK_TYPE_WIDGET)
|
||||
|
||||
static void
|
||||
@@ -108,6 +118,8 @@ gtk_color_dialog_button_init (GtkColorDialogButton *self)
|
||||
GtkDragSource *source;
|
||||
GtkDropTarget *dest;
|
||||
|
||||
g_signal_connect_swapped (self, "activate", G_CALLBACK (activated), self);
|
||||
|
||||
self->color = GDK_RGBA ("00000000");
|
||||
|
||||
self->button = gtk_button_new ();
|
||||
@@ -278,6 +290,27 @@ gtk_color_dialog_button_class_init (GtkColorDialogButtonClass *class)
|
||||
|
||||
g_object_class_install_properties (object_class, NUM_PROPERTIES, properties);
|
||||
|
||||
/**
|
||||
* GtkColorDialogButton::activate:
|
||||
* @widget: the object which received the signal
|
||||
*
|
||||
* Emitted when the color dialog button is activated.
|
||||
*
|
||||
* The `::activate` signal on `GtkColorDialogButton` is an action signal
|
||||
* and emitting it causes the button to pop up its dialog.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
color_dialog_button_signals[SIGNAL_ACTIVATE] =
|
||||
g_signal_new (I_ ("activate"),
|
||||
G_TYPE_FROM_CLASS (class),
|
||||
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
|
||||
0,
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
gtk_widget_class_set_activate_signal (widget_class, color_dialog_button_signals[SIGNAL_ACTIVATE]);
|
||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
||||
gtk_widget_class_set_css_name (widget_class, "colorbutton");
|
||||
gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
|
||||
@@ -366,6 +399,12 @@ color_chosen (GObject *source,
|
||||
update_button_sensitivity (self);
|
||||
}
|
||||
|
||||
static void
|
||||
activated (GtkColorDialogButton *self)
|
||||
{
|
||||
gtk_widget_activate (self->button);
|
||||
}
|
||||
|
||||
static void
|
||||
button_clicked (GtkColorDialogButton *self)
|
||||
{
|
||||
|
||||
@@ -1798,6 +1798,8 @@ gtk_column_view_scroll_to_column (GtkColumnView *self,
|
||||
gtk_adjustment_get_page_size (self->hadjustment));
|
||||
|
||||
gtk_adjustment_set_value (self->hadjustment, new_value);
|
||||
|
||||
g_clear_pointer (&scroll_info, gtk_scroll_info_unref);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2214,9 +2216,14 @@ gtk_column_view_scroll_to (GtkColumnView *self,
|
||||
if (column && (flags & GTK_LIST_SCROLL_FOCUS))
|
||||
gtk_column_view_set_focus_column (self, column, FALSE);
|
||||
|
||||
gtk_list_view_scroll_to (self->listview, pos, flags, scroll);
|
||||
gtk_list_view_scroll_to (self->listview,
|
||||
pos,
|
||||
flags,
|
||||
scroll ? gtk_scroll_info_ref (scroll) : NULL);
|
||||
|
||||
if (column)
|
||||
gtk_column_view_scroll_to_column (self, column, scroll);
|
||||
else
|
||||
g_clear_pointer (&scroll, gtk_scroll_info_unref);
|
||||
}
|
||||
|
||||
|
||||
@@ -1728,5 +1728,18 @@ typedef enum { /*< prefix=GTK_ACCESSIBLE_SORT >*/
|
||||
GTK_ACCESSIBLE_SORT_OTHER
|
||||
} GtkAccessibleSort;
|
||||
|
||||
/**
|
||||
* GtkPopoverMenuFlags:
|
||||
* @GTK_POPOVER_MENU_NESTED: Create submenus as nested
|
||||
* popovers. Without this flag, submenus are created as
|
||||
* sliding pages that replace the main menu.
|
||||
*
|
||||
* Flags that affect how [class@Gtk.PopoverMenu] widgets built from
|
||||
* a [class@Gio.MenuModel] are created and displayed.
|
||||
*/
|
||||
typedef enum { /*< prefix=GTK_POPOVER_MENU >*/
|
||||
GTK_POPOVER_MENU_NESTED = 1 << 0
|
||||
} GtkPopoverMenuFlags;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
* ## GtkExpression in GObject properties
|
||||
*
|
||||
* In order to use a `GtkExpression` as a `GObject` property, you must use the
|
||||
* [id@gtk_param_spec_expression] when creating a `GParamSpec` to install in the
|
||||
* [func@Gtk.param_spec_expression] when creating a `GParamSpec` to install in the
|
||||
* `GObject` class being defined; for instance:
|
||||
*
|
||||
* ```c
|
||||
@@ -103,8 +103,8 @@
|
||||
* ```
|
||||
*
|
||||
* When implementing the `GObjectClass.set_property` and `GObjectClass.get_property`
|
||||
* virtual functions, you must use [id@gtk_value_get_expression], to retrieve the
|
||||
* stored `GtkExpression` from the `GValue` container, and [id@gtk_value_set_expression],
|
||||
* virtual functions, you must use [func@Gtk.value_get_expression], to retrieve the
|
||||
* stored `GtkExpression` from the `GValue` container, and [func@Gtk.value_set_expression],
|
||||
* to store the `GtkExpression` into the `GValue`; for instance:
|
||||
*
|
||||
* ```c
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
@class FilterComboBox;
|
||||
|
||||
typedef struct {
|
||||
GtkFileChooserNative *self;
|
||||
|
||||
@@ -68,31 +70,33 @@ typedef struct {
|
||||
|
||||
NSMutableArray *filters;
|
||||
NSMutableArray *filter_names;
|
||||
NSComboBox *filter_combo_box;
|
||||
FilterComboBox *filter_popup_button;
|
||||
|
||||
GSList *files;
|
||||
int response;
|
||||
} FileChooserQuartzData;
|
||||
|
||||
@interface FilterComboBox : NSObject<NSComboBoxDelegate>
|
||||
@interface FilterComboBox : NSPopUpButton
|
||||
{
|
||||
FileChooserQuartzData *data;
|
||||
}
|
||||
- (id) initWithData:(FileChooserQuartzData *) quartz_data;
|
||||
- (void)comboBoxSelectionDidChange:(NSNotification *)notification;
|
||||
- (void) popUpButtonSelectionChanged:(id) sender;
|
||||
@end
|
||||
|
||||
@implementation FilterComboBox
|
||||
|
||||
- (id) initWithData:(FileChooserQuartzData *) quartz_data
|
||||
{
|
||||
[super init];
|
||||
[super initWithFrame:NSMakeRect(0, 0, 200, 24)];
|
||||
[self setTarget:self];
|
||||
[self setAction:@selector(popUpButtonSelectionChanged:)];
|
||||
data = quartz_data;
|
||||
return self;
|
||||
}
|
||||
- (void)comboBoxSelectionDidChange:(NSNotification *)notification
|
||||
- (void)popUpButtonSelectionChanged:(id)sender
|
||||
{
|
||||
NSInteger selected_index = [data->filter_combo_box indexOfSelectedItem];
|
||||
NSInteger selected_index = [data->filter_popup_button indexOfSelectedItem];
|
||||
NSArray *filter = [data->filters objectAtIndex:selected_index];
|
||||
// check for empty strings in filter -> indicates all filetypes should be allowed!
|
||||
if ([filter containsObject:@""])
|
||||
@@ -302,10 +306,8 @@ filechooser_quartz_launch (FileChooserQuartzData *data)
|
||||
if (data->filters)
|
||||
{
|
||||
// when filters have been provided, a combobox needs to be added
|
||||
data->filter_combo_box = [[NSComboBox alloc] initWithFrame:NSMakeRect(0, 0, 200, 24)];
|
||||
[data->filter_combo_box addItemsWithObjectValues:data->filter_names];
|
||||
[data->filter_combo_box setEditable:NO];
|
||||
[data->filter_combo_box setDelegate:[[FilterComboBox alloc] initWithData:data]];
|
||||
data->filter_popup_button = [[FilterComboBox alloc] initWithData:data];
|
||||
[data->filter_popup_button addItemsWithTitles:data->filter_names];
|
||||
|
||||
if (data->self->current_filter)
|
||||
{
|
||||
@@ -329,16 +331,18 @@ filechooser_quartz_launch (FileChooserQuartzData *data)
|
||||
g_object_unref (filters);
|
||||
|
||||
if (current_filter_index != GTK_INVALID_LIST_POSITION)
|
||||
[data->filter_combo_box selectItemAtIndex:current_filter_index];
|
||||
[data->filter_popup_button selectItemAtIndex:current_filter_index];
|
||||
else
|
||||
[data->filter_combo_box selectItemAtIndex:0];
|
||||
[data->filter_popup_button selectItemAtIndex:0];
|
||||
}
|
||||
else
|
||||
{
|
||||
[data->filter_combo_box selectItemAtIndex:0];
|
||||
[data->filter_popup_button selectItemAtIndex:0];
|
||||
}
|
||||
[data->filter_combo_box setToolTip:[NSString stringWithUTF8String:_("Select which types of files are shown")]];
|
||||
[data->panel setAccessoryView:data->filter_combo_box];
|
||||
|
||||
[data->filter_popup_button popUpButtonSelectionChanged:NULL];
|
||||
[data->filter_popup_button setToolTip:[NSString stringWithUTF8String:_("Select which types of files are shown")]];
|
||||
[data->panel setAccessoryView:data->filter_popup_button];
|
||||
if ([data->panel isKindOfClass:[NSOpenPanel class]] && [data->panel respondsToSelector:@selector(setAccessoryViewDisclosed:)])
|
||||
{
|
||||
[(id<CanSetAccessoryViewDisclosed>) data->panel setAccessoryViewDisclosed:YES];
|
||||
@@ -578,4 +582,3 @@ gtk_file_chooser_native_quartz_hide (GtkFileChooserNative *self)
|
||||
}
|
||||
data->panel = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -758,8 +758,6 @@ gtk_file_filter_get_attributes (GtkFileFilter *filter)
|
||||
|
||||
#ifdef GDK_WINDOWING_MACOS
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NSArray * _gtk_file_filter_get_as_pattern_nsstrings (GtkFileFilter *filter)
|
||||
{
|
||||
NSMutableArray *array = [[NSMutableArray alloc] init];
|
||||
@@ -773,9 +771,8 @@ NSArray * _gtk_file_filter_get_as_pattern_nsstrings (GtkFileFilter *filter)
|
||||
{
|
||||
case FILTER_RULE_MIME_TYPE:
|
||||
{
|
||||
// convert mime-types to UTI
|
||||
NSString *mime_type_nsstring = [NSString stringWithUTF8String: rule->u.content_types[0]];
|
||||
NSString *uti_nsstring = (NSString *) UTTypeCreatePreferredIdentifierForTag (kUTTagClassMIMEType, (CFStringRef) mime_type_nsstring, NULL);
|
||||
// GContentType from GIO use UTI on macOS since glib version 2.51
|
||||
NSString *uti_nsstring = [NSString stringWithUTF8String: rule->u.content_types[0]];
|
||||
if (uti_nsstring == NULL)
|
||||
{
|
||||
[array release];
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtktypebuiltins.h"
|
||||
|
||||
|
||||
static void activated (GtkFontDialogButton *self);
|
||||
static void button_clicked (GtkFontDialogButton *self);
|
||||
static void update_button_sensitivity
|
||||
(GtkFontDialogButton *self);
|
||||
@@ -100,8 +100,17 @@ enum
|
||||
NUM_PROPERTIES
|
||||
};
|
||||
|
||||
/* Signals */
|
||||
enum
|
||||
{
|
||||
SIGNAL_ACTIVATE = 1,
|
||||
NUM_SIGNALS
|
||||
};
|
||||
|
||||
static GParamSpec *properties[NUM_PROPERTIES];
|
||||
|
||||
static unsigned int font_dialog_button_signals[NUM_SIGNALS] = { 0 };
|
||||
|
||||
G_DEFINE_TYPE (GtkFontDialogButton, gtk_font_dialog_button, GTK_TYPE_WIDGET)
|
||||
|
||||
static void
|
||||
@@ -110,6 +119,8 @@ gtk_font_dialog_button_init (GtkFontDialogButton *self)
|
||||
GtkWidget *box;
|
||||
PangoFontDescription *font_desc;
|
||||
|
||||
g_signal_connect_swapped (self, "activate", G_CALLBACK (activated), self);
|
||||
|
||||
self->button = gtk_button_new ();
|
||||
g_signal_connect_swapped (self->button, "clicked", G_CALLBACK (button_clicked), self);
|
||||
self->font_label = gtk_label_new (_("Font"));
|
||||
@@ -383,6 +394,27 @@ gtk_font_dialog_button_class_init (GtkFontDialogButtonClass *class)
|
||||
|
||||
g_object_class_install_properties (object_class, NUM_PROPERTIES, properties);
|
||||
|
||||
/**
|
||||
* FontDialogButton::activate:
|
||||
* @widget: The object which received the signal
|
||||
*
|
||||
* Emitted when the font dialog button is activated.
|
||||
*
|
||||
* The `::activate` signal on `GtkFontDialogButton` is an action signal
|
||||
* and emitting it causes the button to pop up its dialog.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
font_dialog_button_signals[SIGNAL_ACTIVATE] =
|
||||
g_signal_new (I_ ("activate"),
|
||||
G_TYPE_FROM_CLASS (class),
|
||||
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
|
||||
0,
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
gtk_widget_class_set_activate_signal (widget_class, font_dialog_button_signals[SIGNAL_ACTIVATE]);
|
||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
||||
gtk_widget_class_set_css_name (widget_class, "fontbutton");
|
||||
gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_GROUP);
|
||||
@@ -499,6 +531,12 @@ font_and_features_chosen (GObject *source,
|
||||
update_button_sensitivity (self);
|
||||
}
|
||||
|
||||
static void
|
||||
activated (GtkFontDialogButton *self)
|
||||
{
|
||||
gtk_widget_activate (self->button);
|
||||
}
|
||||
|
||||
static void
|
||||
button_clicked (GtkFontDialogButton *self)
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ static GParamSpec *properties[N_PROPS] = { NULL, };
|
||||
* @self: a `GtkListBase`
|
||||
* @across: position in pixels in the direction cross to the list
|
||||
* @along: position in pixels in the direction of the list
|
||||
* @pos: (out caller-allocates): set to the looked up position
|
||||
* @pos: (out): set to the looked up position
|
||||
* @area: (out caller-allocates) (optional): set to the area occupied
|
||||
* by the returned position
|
||||
*
|
||||
@@ -1519,7 +1519,7 @@ gtk_list_base_allocate_children (GtkListBase *self,
|
||||
GtkListBasePrivate *priv = gtk_list_base_get_instance_private (self);
|
||||
GtkListTile *tile;
|
||||
int dx, dy;
|
||||
|
||||
|
||||
gtk_list_base_get_adjustment_values (self, OPPOSITE_ORIENTATION (priv->orientation), &dx, NULL, NULL);
|
||||
gtk_list_base_get_adjustment_values (self, priv->orientation, &dy, NULL, NULL);
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ static gboolean do_setlocale = TRUE;
|
||||
/**
|
||||
* gtk_disable_setlocale:
|
||||
*
|
||||
* Prevents [id@gtk_init] and [id@gtk_init_check] from automatically calling
|
||||
* Prevents [func@Gtk.init] and [func@Gtk.init_check] from automatically calling
|
||||
* `setlocale (LC_ALL, "")`.
|
||||
*
|
||||
* You would want to use this function if you wanted to set the locale for
|
||||
|
||||
@@ -1510,8 +1510,8 @@ gtk_menu_button_set_child (GtkMenuButton *menu_button,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
(GtkGizmoFocusFunc)gtk_widget_focus_self,
|
||||
(GtkGizmoGrabFocusFunc)gtk_widget_grab_focus_self);
|
||||
(GtkGizmoFocusFunc)gtk_widget_focus_child,
|
||||
NULL);
|
||||
|
||||
gtk_widget_set_layout_manager (inner_widget, gtk_bin_layout_new ());
|
||||
gtk_widget_set_hexpand (inner_widget, TRUE);
|
||||
|
||||
@@ -70,30 +70,31 @@
|
||||
* # CSS nodes
|
||||
*
|
||||
* ```
|
||||
* popover[.menu]
|
||||
* popover.background[.menu]
|
||||
* ├── arrow
|
||||
* ╰── contents.background
|
||||
* ╰── contents
|
||||
* ╰── <child>
|
||||
* ```
|
||||
*
|
||||
* The contents child node always gets the .background style class
|
||||
* and the popover itself gets the .menu style class if the popover
|
||||
* is menu-like (i.e. `GtkPopoverMenu`).
|
||||
* `GtkPopover` has a main node with name `popover`, an arrow with name `arrow`,
|
||||
* and another node for the content named `contents`. The `popover` node always
|
||||
* gets the `.background` style class. It also gets the `.menu` style class
|
||||
* if the popover is menu-like, e.g. is a [class@Gtk.PopoverMenu].
|
||||
*
|
||||
* Particular uses of `GtkPopover`, such as touch selection popups or
|
||||
* magnifiers in `GtkEntry` or `GtkTextView` get style classes like
|
||||
* .touch-selection or .magnifier to differentiate from plain popovers.
|
||||
* `.touch-selection` or `.magnifier` to differentiate from plain popovers.
|
||||
*
|
||||
* When styling a popover directly, the popover node should usually
|
||||
* When styling a popover directly, the `popover` node should usually
|
||||
* not have any background. The visible part of the popover can have
|
||||
* a shadow. To specify it in CSS, set the box-shadow of the contents node.
|
||||
* a shadow. To specify it in CSS, set the box-shadow of the `contents` node.
|
||||
*
|
||||
* Note that, in order to accomplish appropriate arrow visuals, `GtkPopover`
|
||||
* uses custom drawing for the arrow node. This makes it possible for the
|
||||
* uses custom drawing for the `arrow` node. This makes it possible for the
|
||||
* arrow to change its shape dynamically, but it also limits the possibilities
|
||||
* of styling it using CSS. In particular, the arrow gets drawn over the
|
||||
* content node's border and shadow, so they look like one shape, which
|
||||
* means that the border width of the content node and the arrow node should
|
||||
* of styling it using CSS. In particular, the `arrow` gets drawn over the
|
||||
* `content` node's border and shadow, so they look like one shape, which
|
||||
* means that the border width of the `content` node and the `arrow` node should
|
||||
* be the same. The arrow also does not support any border shape other than
|
||||
* solid, no border-radius, only one border width (border-bottom-width is
|
||||
* used) and no box-shadow.
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "gtkscrolledwindow.h"
|
||||
#include "gtkviewport.h"
|
||||
|
||||
|
||||
/**
|
||||
* GtkPopoverMenu:
|
||||
*
|
||||
@@ -50,6 +49,7 @@
|
||||
* `GtkPopoverMenu` treats its children like menus and allows switching
|
||||
* between them. It can open submenus as traditional, nested submenus,
|
||||
* or in a more touch-friendly sliding fashion.
|
||||
* The property [property@Gtk.PopoverMenu:flags] controls this appearance.
|
||||
*
|
||||
* `GtkPopoverMenu` is meant to be used primarily with menu models,
|
||||
* using [ctor@Gtk.PopoverMenu.new_from_model]. If you need to put
|
||||
@@ -128,14 +128,21 @@
|
||||
*
|
||||
* Menu items will also show accelerators, which are usually associated
|
||||
* with actions via [method@Gtk.Application.set_accels_for_action],
|
||||
* [id@gtk_widget_class_add_binding_action] or
|
||||
* [method@WidgetClass.add_binding_action] or
|
||||
* [method@Gtk.ShortcutController.add_shortcut].
|
||||
*
|
||||
* # CSS Nodes
|
||||
*
|
||||
* `GtkPopoverMenu` is just a subclass of `GtkPopover` that adds custom content
|
||||
* to it, therefore it has the same CSS nodes. It is one of the cases that add
|
||||
* a .menu style class to the popover's main node.
|
||||
* a `.menu` style class to the main `popover` node.
|
||||
*
|
||||
* Menu items have nodes with name `button` and class `.model`. If a section
|
||||
* display-hint is set, the section gets a node `box` with class `horizontal`
|
||||
* plus a class with the same text as the display hint. Note that said box may
|
||||
* not be the direct ancestor of the item `button`s. Thus, for example, to style
|
||||
* items in an `inline-buttons` section, select `.inline-buttons button.model`.
|
||||
* Other things that may be of interest to style in menus include `label` nodes.
|
||||
*
|
||||
* # Accessibility
|
||||
*
|
||||
@@ -166,7 +173,8 @@ struct _GtkPopoverMenuClass
|
||||
|
||||
enum {
|
||||
PROP_VISIBLE_SUBMENU = 1,
|
||||
PROP_MENU_MODEL
|
||||
PROP_MENU_MODEL,
|
||||
PROP_FLAGS
|
||||
};
|
||||
|
||||
static void gtk_popover_menu_buildable_iface_init (GtkBuildableIface *iface);
|
||||
@@ -403,6 +411,10 @@ gtk_popover_menu_get_property (GObject *object,
|
||||
g_value_set_object (value, gtk_popover_menu_get_menu_model (menu));
|
||||
break;
|
||||
|
||||
case PROP_FLAGS:
|
||||
g_value_set_flags (value, gtk_popover_menu_get_flags (menu));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
@@ -427,6 +439,10 @@ gtk_popover_menu_set_property (GObject *object,
|
||||
gtk_popover_menu_set_menu_model (menu, g_value_get_object (value));
|
||||
break;
|
||||
|
||||
case PROP_FLAGS:
|
||||
gtk_popover_menu_set_flags (menu, g_value_get_flags (value));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
break;
|
||||
@@ -508,7 +524,6 @@ gtk_popover_menu_focus (GtkWidget *widget,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
add_tab_bindings (GtkWidgetClass *widget_class,
|
||||
GdkModifierType modifiers,
|
||||
@@ -528,7 +543,7 @@ add_arrow_bindings (GtkWidgetClass *widget_class,
|
||||
GtkDirectionType direction)
|
||||
{
|
||||
guint keypad_keysym = keysym - GDK_KEY_Left + GDK_KEY_KP_Left;
|
||||
|
||||
|
||||
gtk_widget_class_add_binding_signal (widget_class, keysym, 0,
|
||||
"move-focus",
|
||||
"(i)", direction);
|
||||
@@ -609,6 +624,23 @@ gtk_popover_menu_class_init (GtkPopoverMenuClass *klass)
|
||||
G_TYPE_MENU_MODEL,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
/**
|
||||
* GtkPopoverMenu:flags: (attributes org.gtk.Property.get=gtk_popover_menu_get_flags org.gtk.Property.set=gtk_popover_menu_set_flags)
|
||||
*
|
||||
* The flags that @popover uses to create/display a menu from its model.
|
||||
*
|
||||
* If a model is set and the flags change, contents are rebuilt, so if setting
|
||||
* properties individually, set flags before model to avoid a redundant rebuild.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_FLAGS,
|
||||
g_param_spec_flags ("flags", NULL, NULL,
|
||||
GTK_TYPE_POPOVER_MENU_FLAGS, 0,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS
|
||||
| G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
add_arrow_bindings (widget_class, GDK_KEY_Up, GTK_DIR_UP);
|
||||
add_arrow_bindings (widget_class, GDK_KEY_Down, GTK_DIR_DOWN);
|
||||
add_arrow_bindings (widget_class, GDK_KEY_Left, GTK_DIR_LEFT);
|
||||
@@ -658,6 +690,20 @@ gtk_popover_menu_buildable_iface_init (GtkBuildableIface *iface)
|
||||
iface->add_child = gtk_popover_menu_buildable_add_child;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_popover_menu_rebuild_contents (GtkPopoverMenu *popover)
|
||||
{
|
||||
GtkWidget *stack;
|
||||
GtkWidget *child;
|
||||
|
||||
stack = gtk_popover_menu_get_stack (popover);
|
||||
while ((child = gtk_widget_get_first_child (stack)))
|
||||
gtk_stack_remove (GTK_STACK (stack), child);
|
||||
|
||||
if (popover->model)
|
||||
gtk_menu_section_box_new_toplevel (popover, popover->model, popover->flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_popover_menu_new:
|
||||
*
|
||||
@@ -768,7 +814,7 @@ gtk_popover_menu_new_from_model_full (GMenuModel *model,
|
||||
g_return_val_if_fail (model == NULL || G_IS_MENU_MODEL (model), NULL);
|
||||
|
||||
popover = gtk_popover_menu_new ();
|
||||
GTK_POPOVER_MENU (popover)->flags = flags;
|
||||
gtk_popover_menu_set_flags (GTK_POPOVER_MENU (popover), flags);
|
||||
gtk_popover_menu_set_menu_model (GTK_POPOVER_MENU (popover), model);
|
||||
|
||||
return popover;
|
||||
@@ -794,20 +840,41 @@ gtk_popover_menu_set_menu_model (GtkPopoverMenu *popover,
|
||||
|
||||
if (g_set_object (&popover->model, model))
|
||||
{
|
||||
GtkWidget *stack;
|
||||
GtkWidget *child;
|
||||
|
||||
stack = gtk_popover_menu_get_stack (popover);
|
||||
while ((child = gtk_widget_get_first_child (stack)))
|
||||
gtk_stack_remove (GTK_STACK (stack), child);
|
||||
|
||||
if (model)
|
||||
gtk_menu_section_box_new_toplevel (popover, model, popover->flags);
|
||||
|
||||
gtk_popover_menu_rebuild_contents (popover);
|
||||
g_object_notify (G_OBJECT (popover), "menu-model");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_popover_menu_set_flags: (attributes org.gtk.Method.set_property=flags)
|
||||
* @popover: a `GtkPopoverMenu`
|
||||
* @flags: a set of `GtkPopoverMenuFlags`
|
||||
*
|
||||
* Sets the flags that @popover uses to create/display a menu from its model.
|
||||
*
|
||||
* If a model is set and the flags change, contents are rebuilt, so if setting
|
||||
* properties individually, set flags before model to avoid a redundant rebuild.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
gtk_popover_menu_set_flags (GtkPopoverMenu *popover,
|
||||
GtkPopoverMenuFlags flags)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_POPOVER_MENU (popover));
|
||||
|
||||
if (popover->flags == flags)
|
||||
return;
|
||||
|
||||
popover->flags = flags;
|
||||
|
||||
/* This shouldn’t happen IRL, but notify test unsets :child, so dodge error */
|
||||
if (gtk_popover_get_child (GTK_POPOVER (popover)) != NULL)
|
||||
gtk_popover_menu_rebuild_contents (popover);
|
||||
|
||||
g_object_notify (G_OBJECT (popover), "flags");
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_popover_menu_get_menu_model: (attributes org.gtk.Method.get_property=menu-model)
|
||||
* @popover: a `GtkPopoverMenu`
|
||||
@@ -824,6 +891,24 @@ gtk_popover_menu_get_menu_model (GtkPopoverMenu *popover)
|
||||
return popover->model;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_popover_menu_get_flags: (attributes org.gtk.Method.get_property=flags)
|
||||
* @popover: a `GtkPopoverMenu`
|
||||
*
|
||||
* Returns the flags that @popover uses to create/display a menu from its model.
|
||||
*
|
||||
* Returns: the `GtkPopoverMenuFlags`
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
GtkPopoverMenuFlags
|
||||
gtk_popover_menu_get_flags (GtkPopoverMenu *popover)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_POPOVER_MENU (popover), 0);
|
||||
|
||||
return popover->flags;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_popover_menu_add_child:
|
||||
* @popover: a `GtkPopoverMenu`
|
||||
|
||||
@@ -37,19 +37,6 @@ GType gtk_popover_menu_get_type (void) G_GNUC_CONST;
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkWidget * gtk_popover_menu_new_from_model (GMenuModel *model);
|
||||
|
||||
/**
|
||||
* GtkPopoverMenuFlags:
|
||||
* @GTK_POPOVER_MENU_NESTED: Create submenus as nested
|
||||
* popovers. Without this flag, submenus are created as
|
||||
* sliding pages that replace the main menu.
|
||||
*
|
||||
* Flags that affect how popover menus are created from
|
||||
* a menu model.
|
||||
*/
|
||||
typedef enum {
|
||||
GTK_POPOVER_MENU_NESTED = 1 << 0
|
||||
} GtkPopoverMenuFlags;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkWidget * gtk_popover_menu_new_from_model_full (GMenuModel *model,
|
||||
GtkPopoverMenuFlags flags);
|
||||
@@ -60,6 +47,12 @@ void gtk_popover_menu_set_menu_model (GtkPopoverMenu *popover,
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GMenuModel *gtk_popover_menu_get_menu_model (GtkPopoverMenu *popover);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
void gtk_popover_menu_set_flags (GtkPopoverMenu *popover,
|
||||
GtkPopoverMenuFlags flags);
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
GtkPopoverMenuFlags gtk_popover_menu_get_flags (GtkPopoverMenu *popover);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_popover_menu_add_child (GtkPopoverMenu *popover,
|
||||
GtkWidget *child,
|
||||
|
||||
@@ -113,10 +113,9 @@ gtk_section_model_default_init (GtkSectionModelInterface *iface)
|
||||
* gtk_section_model_get_section:
|
||||
* @self: a `GtkSectionModel`
|
||||
* @position: the position of the item to query
|
||||
* @out_start: (out caller-allocates): the position of the first
|
||||
* item in the section
|
||||
* @out_end: (out caller-allocates): the position of the first
|
||||
* item not part of the section anymore.
|
||||
* @out_start: (out): the position of the first item in the section
|
||||
* @out_end: (out): the position of the first item not part of the section
|
||||
* anymore.
|
||||
*
|
||||
* Query the section that covers the given position. The number of
|
||||
* items in the section can be computed by `out_end - out_start`.
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
* GtkSignalListItemFactory:
|
||||
*
|
||||
* `GtkSignalListItemFactory` is a `GtkListItemFactory` that emits signals
|
||||
* to to manage listitems.
|
||||
* to manage listitems.
|
||||
*
|
||||
* Signals are emitted for every listitem in the same order:
|
||||
*
|
||||
@@ -216,9 +216,9 @@ gtk_signal_list_item_factory_class_init (GtkSignalListItemFactoryClass *klass)
|
||||
* @self: The `GtkSignalListItemFactory`
|
||||
* @object: The `GObject` to unbind
|
||||
*
|
||||
* Emitted when a object has been unbound from its item, for example when
|
||||
* Emitted when an object has been unbound from its item, for example when
|
||||
* a listitem was removed from use in a list widget
|
||||
* and its new [property@Gtk.ListItem:item] is about to be unset.
|
||||
* and its [property@Gtk.ListItem:item] is about to be unset.
|
||||
*
|
||||
* This signal is the opposite of the [signal@Gtk.SignalListItemFactory::bind]
|
||||
* signal and should be used to undo everything done in that signal.
|
||||
|
||||
@@ -608,7 +608,7 @@ gtk_widget_get_request_mode (GtkWidget *widget)
|
||||
* the required height for the natural width is generally smaller than the
|
||||
* required height for the minimum width.
|
||||
*
|
||||
* Use [id@gtk_widget_measure] if you want to support baseline alignment.
|
||||
* Use [method@Gtk.Widget.measure] if you want to support baseline alignment.
|
||||
*/
|
||||
void
|
||||
gtk_widget_get_preferred_size (GtkWidget *widget,
|
||||
|
||||
@@ -567,29 +567,29 @@ merge_color_matrix_nodes (const graphene_matrix_t *matrix2,
|
||||
const graphene_vec4_t *offset2,
|
||||
GskRenderNode *child)
|
||||
{
|
||||
const graphene_matrix_t *mat1 = gsk_color_matrix_node_get_color_matrix (child);
|
||||
const graphene_matrix_t *matrix1 = gsk_color_matrix_node_get_color_matrix (child);
|
||||
const graphene_vec4_t *offset1 = gsk_color_matrix_node_get_color_offset (child);
|
||||
graphene_matrix_t mat2 = *matrix2;
|
||||
graphene_vec4_t off2 = *offset2;
|
||||
graphene_matrix_t matrix;
|
||||
graphene_vec4_t offset;
|
||||
GskRenderNode *result;
|
||||
|
||||
g_assert (gsk_render_node_get_node_type (child) == GSK_COLOR_MATRIX_NODE);
|
||||
|
||||
/* color matrix node: color = mat * p + offset; for a pixel p.
|
||||
* color = mat1 * (mat2 * p + offset2) + offset1;
|
||||
* = mat1 * mat2 * p + offset2 * mat1 + offset1
|
||||
* = (mat1 * mat2) * p + (offset2 * mat1 + offset1)
|
||||
/* color matrix node: color = trans(mat) * p + offset; for a pixel p.
|
||||
* color = trans(mat2) * (trans(mat1) * p + offset1) + offset2
|
||||
* = trans(mat2) * trans(mat1) * p + trans(mat2) * offset1 + offset2
|
||||
* = trans(mat1 * mat2) * p + (trans(mat2) * offset1 + offset2)
|
||||
* Which this code does.
|
||||
* mat1 and offset1 come from @child.
|
||||
*/
|
||||
|
||||
graphene_matrix_transform_vec4 (mat1, offset2, &off2);
|
||||
graphene_vec4_add (&off2, offset1, &off2);
|
||||
graphene_matrix_transform_vec4 (matrix2, offset1, &offset);
|
||||
graphene_vec4_add (&offset, offset2, &offset);
|
||||
|
||||
graphene_matrix_multiply (mat1, &mat2, &mat2);
|
||||
graphene_matrix_multiply (matrix1, matrix2, &matrix);
|
||||
|
||||
result = gsk_color_matrix_node_new (gsk_color_matrix_node_get_child (child),
|
||||
&mat2, &off2);
|
||||
&matrix, &offset);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -656,6 +656,13 @@ gtk_snapshot_collect_color_matrix (GtkSnapshot *snapshot,
|
||||
* Modifies the colors of an image by applying an affine transformation
|
||||
* in RGB space.
|
||||
*
|
||||
* In particular, the colors will be transformed by applying
|
||||
*
|
||||
* pixel = transpose(color_matrix) * pixel + color_offset
|
||||
*
|
||||
* for every pixel. The transformation operates on unpremultiplied
|
||||
* colors, with color components ordered R, G, B, A.
|
||||
*
|
||||
* The image is recorded until the next call to [method@Gtk.Snapshot.pop].
|
||||
*/
|
||||
void
|
||||
@@ -1151,6 +1158,9 @@ gtk_snapshot_clear_fill (GtkSnapshotState *state)
|
||||
*
|
||||
* The image is recorded until the next call to [method@Gtk.Snapshot.pop].
|
||||
*
|
||||
* If you want to fill the path with a color, [method@Gtk.Snapshot.append_fill]
|
||||
* may be more convenient.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
@@ -1171,6 +1181,35 @@ gtk_snapshot_push_fill (GtkSnapshot *snapshot,
|
||||
state->data.fill.fill_rule = fill_rule;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_snapshot_append_fill:
|
||||
* @snapshot: a `GtkSnapshot`
|
||||
* @path: The path describing the area to fill
|
||||
* @fill_rule: The fill rule to use
|
||||
* @color: the color to fill the path with
|
||||
*
|
||||
* A convenience method to fill a path with a color.
|
||||
*
|
||||
* See [method@Gtk.Snapshot.push_fill] if you need
|
||||
* to fill a path with more complex content than
|
||||
* a color.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
gtk_snapshot_append_fill (GtkSnapshot *snapshot,
|
||||
GskPath *path,
|
||||
GskFillRule fill_rule,
|
||||
const GdkRGBA *color)
|
||||
{
|
||||
graphene_rect_t bounds;
|
||||
|
||||
gsk_path_get_bounds (path, &bounds);
|
||||
gtk_snapshot_push_fill (snapshot, path, fill_rule);
|
||||
gtk_snapshot_append_color (snapshot, color, &bounds);
|
||||
gtk_snapshot_pop (snapshot);
|
||||
}
|
||||
|
||||
static GskRenderNode *
|
||||
gtk_snapshot_collect_stroke (GtkSnapshot *snapshot,
|
||||
GtkSnapshotState *state,
|
||||
@@ -1222,6 +1261,9 @@ gtk_snapshot_clear_stroke (GtkSnapshotState *state)
|
||||
* everything else, so uneven scaling will cause horizontal and vertical
|
||||
* strokes to have different widths.
|
||||
*
|
||||
* If you want to stroke the path with a color, [method@Gtk.Snapshot.append_stroke]
|
||||
* may be more convenient.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
@@ -1265,6 +1307,35 @@ gtk_snapshot_collect_shadow (GtkSnapshot *snapshot,
|
||||
return shadow_node;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_snapshot_append_stroke:
|
||||
* @snapshot: a `GtkSnapshot`
|
||||
* @path: The path describing the area to fill
|
||||
* @stroke: The stroke attributes
|
||||
* @color: the color to fill the path with
|
||||
*
|
||||
* A convenience method to stroke a path with a color.
|
||||
*
|
||||
* See [method@Gtk.Snapshot.push_stroke] if you need
|
||||
* to stroke a path with more complex content than
|
||||
* a color.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
gtk_snapshot_append_stroke (GtkSnapshot *snapshot,
|
||||
GskPath *path,
|
||||
const GskStroke *stroke,
|
||||
const GdkRGBA *color)
|
||||
{
|
||||
graphene_rect_t bounds;
|
||||
|
||||
gsk_path_get_stroke_bounds (path, stroke, &bounds);
|
||||
gtk_snapshot_push_stroke (snapshot, path, stroke);
|
||||
gtk_snapshot_append_color (snapshot, color, &bounds);
|
||||
gtk_snapshot_pop (snapshot);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_snapshot_clear_shadow (GtkSnapshotState *state)
|
||||
{
|
||||
|
||||
@@ -240,6 +240,16 @@ void gtk_snapshot_append_layout (GtkSnapshot
|
||||
PangoLayout *layout,
|
||||
const GdkRGBA *color);
|
||||
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
void gtk_snapshot_append_fill (GtkSnapshot *snapshot,
|
||||
GskPath *path,
|
||||
GskFillRule fill_rule,
|
||||
const GdkRGBA *color);
|
||||
GDK_AVAILABLE_IN_4_14
|
||||
void gtk_snapshot_append_stroke (GtkSnapshot *snapshot,
|
||||
GskPath *path,
|
||||
const GskStroke *stroke,
|
||||
const GdkRGBA *color);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@@ -3977,9 +3977,11 @@ gtk_text_insert_at_cursor (GtkText *self,
|
||||
|
||||
if (priv->editable)
|
||||
{
|
||||
begin_change (self);
|
||||
gtk_text_reset_im_context (self);
|
||||
gtk_editable_insert_text (GTK_EDITABLE (self), str, -1, &pos);
|
||||
gtk_text_set_selection_bounds (self, pos, pos);
|
||||
end_change (self);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3999,12 +4001,14 @@ gtk_text_delete_from_cursor (GtkText *self,
|
||||
return;
|
||||
}
|
||||
|
||||
begin_change (self);
|
||||
|
||||
if (priv->selection_bound != priv->current_pos)
|
||||
{
|
||||
gtk_text_delete_selection (self);
|
||||
gtk_text_schedule_im_reset (self);
|
||||
gtk_text_reset_im_context (self);
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
|
||||
switch (type)
|
||||
@@ -4074,6 +4078,8 @@ gtk_text_delete_from_cursor (GtkText *self,
|
||||
gtk_text_reset_im_context (self);
|
||||
}
|
||||
|
||||
done:
|
||||
end_change (self);
|
||||
gtk_text_pend_cursor_blink (self);
|
||||
}
|
||||
|
||||
@@ -4089,12 +4095,14 @@ gtk_text_backspace (GtkText *self)
|
||||
return;
|
||||
}
|
||||
|
||||
begin_change (self);
|
||||
|
||||
if (priv->selection_bound != priv->current_pos)
|
||||
{
|
||||
gtk_text_delete_selection (self);
|
||||
gtk_text_schedule_im_reset (self);
|
||||
gtk_text_reset_im_context (self);
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
|
||||
prev_pos = gtk_text_move_logically (self, priv->current_pos, -1);
|
||||
@@ -4147,6 +4155,8 @@ gtk_text_backspace (GtkText *self)
|
||||
gtk_widget_error_bell (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
done:
|
||||
end_change (self);
|
||||
gtk_text_pend_cursor_blink (self);
|
||||
}
|
||||
|
||||
@@ -4191,7 +4201,11 @@ gtk_text_cut_clipboard (GtkText *self)
|
||||
if (priv->editable)
|
||||
{
|
||||
if (priv->selection_bound != priv->current_pos)
|
||||
gtk_text_delete_selection (self);
|
||||
{
|
||||
begin_change (self);
|
||||
gtk_text_delete_selection (self);
|
||||
end_change (self);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4209,9 +4223,15 @@ gtk_text_paste_clipboard (GtkText *self)
|
||||
GtkTextPrivate *priv = gtk_text_get_instance_private (self);
|
||||
|
||||
if (priv->editable)
|
||||
gtk_text_paste (self, gtk_widget_get_clipboard (GTK_WIDGET (self)));
|
||||
{
|
||||
begin_change (self);
|
||||
gtk_text_paste (self, gtk_widget_get_clipboard (GTK_WIDGET (self)));
|
||||
end_change (self);
|
||||
}
|
||||
else
|
||||
gtk_widget_error_bell (GTK_WIDGET (self));
|
||||
{
|
||||
gtk_widget_error_bell (GTK_WIDGET (self));
|
||||
}
|
||||
|
||||
gtk_text_update_handles (self);
|
||||
}
|
||||
|
||||
@@ -1100,6 +1100,18 @@ gtk_text_history_modified_changed (GtkTextHistory *self,
|
||||
peek->is_modified_set = TRUE;
|
||||
}
|
||||
|
||||
if ((peek = g_queue_peek_head (&self->redo_queue)))
|
||||
{
|
||||
if (peek->kind == ACTION_KIND_BARRIER)
|
||||
{
|
||||
if (!(peek = peek->link.next->data))
|
||||
return;
|
||||
}
|
||||
|
||||
peek->is_modified = TRUE;
|
||||
peek->is_modified_set = TRUE;
|
||||
}
|
||||
|
||||
self->is_modified = !!modified;
|
||||
self->is_modified_set = TRUE;
|
||||
|
||||
|
||||
@@ -744,5 +744,7 @@ gtk_viewport_scroll_to (GtkViewport *viewport,
|
||||
|
||||
gtk_adjustment_animate_to_value (viewport->adjustment[GTK_ORIENTATION_HORIZONTAL], x);
|
||||
gtk_adjustment_animate_to_value (viewport->adjustment[GTK_ORIENTATION_VERTICAL], y);
|
||||
|
||||
g_clear_pointer (&scroll, gtk_scroll_info_unref);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,13 +126,13 @@
|
||||
* For example, when queried in the normal %GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH mode:
|
||||
*
|
||||
* First, the default minimum and natural width for each widget
|
||||
* in the interface will be computed using [id@gtk_widget_measure] with an
|
||||
* in the interface will be computed using [method@Gtk.Widget.measure] with an
|
||||
* orientation of %GTK_ORIENTATION_HORIZONTAL and a for_size of -1.
|
||||
* Because the preferred widths for each widget depend on the preferred
|
||||
* widths of their children, this information propagates up the hierarchy,
|
||||
* and finally a minimum and natural width is determined for the entire
|
||||
* toplevel. Next, the toplevel will use the minimum width to query for the
|
||||
* minimum height contextual to that width using [id@gtk_widget_measure] with an
|
||||
* minimum height contextual to that width using [method@Gtk.Widget.measure] with an
|
||||
* orientation of %GTK_ORIENTATION_VERTICAL and a for_size of the just computed
|
||||
* width. This will also be a highly recursive operation. The minimum height
|
||||
* for the minimum width is normally used to set the minimum size constraint
|
||||
@@ -223,7 +223,7 @@
|
||||
* to do it.
|
||||
*
|
||||
* Of course if you are getting the size request for another widget, such
|
||||
* as a child widget, you must use [id@gtk_widget_measure]; otherwise, you
|
||||
* as a child widget, you must use [method@Gtk.Widget.measure]; otherwise, you
|
||||
* would not properly consider widget margins, [class@Gtk.SizeGroup], and
|
||||
* so forth.
|
||||
*
|
||||
@@ -240,7 +240,7 @@
|
||||
*
|
||||
* If a widget ends up baseline aligned it will be allocated all the space in
|
||||
* the parent as if it was %GTK_ALIGN_FILL, but the selected baseline can be
|
||||
* found via [id@gtk_widget_get_baseline]. If the baseline has a
|
||||
* found via [method@Gtk.Widget.get_baseline]. If the baseline has a
|
||||
* value other than -1 you need to align the widget such that the baseline
|
||||
* appears at the position.
|
||||
*
|
||||
@@ -405,7 +405,7 @@
|
||||
* ```
|
||||
*
|
||||
* You can access widgets defined in the template using the
|
||||
* [id@gtk_widget_get_template_child] function, but you will typically declare
|
||||
* [method@Gtk.Widget.get_template_child] function, but you will typically declare
|
||||
* a pointer in the instance private data structure of your type using the same
|
||||
* name as the widget in the template definition, and call
|
||||
* [method@Gtk.WidgetClass.bind_template_child_full] (or one of its wrapper macros
|
||||
|
||||
@@ -1312,10 +1312,22 @@ gtk_inspector_object_tree_select_object (GtkInspectorObjectTree *wt,
|
||||
GTK_LIST_SCROLL_SELECT | GTK_LIST_SCROLL_FOCUS,
|
||||
NULL);
|
||||
|
||||
g_signal_emit (wt, signals[OBJECT_SELECTED], 0, object); // FIXME
|
||||
g_signal_emit (wt, signals[OBJECT_SELECTED], 0, object);
|
||||
g_object_unref (row_item);
|
||||
}
|
||||
|
||||
static void
|
||||
on_selected_item (GtkSingleSelection *selection,
|
||||
GParamSpec *pspec,
|
||||
GtkInspectorObjectTree *wt)
|
||||
{
|
||||
GObject *selected = gtk_single_selection_get_selected_item (selection);
|
||||
GtkTreeListRow *row = GTK_TREE_LIST_ROW (selected);
|
||||
GObject *object = gtk_tree_list_row_get_item (row);
|
||||
g_signal_emit (wt, signals[OBJECT_SELECTED], 0, object);
|
||||
g_object_unref (object);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_inspector_object_tree_set_display (GtkInspectorObjectTree *wt,
|
||||
GdkDisplay *display)
|
||||
@@ -1329,4 +1341,5 @@ gtk_inspector_object_tree_set_display (GtkInspectorObjectTree *wt,
|
||||
wt->priv->selection = gtk_single_selection_new (g_object_ref (G_LIST_MODEL (wt->priv->tree_model)));
|
||||
gtk_column_view_set_model (GTK_COLUMN_VIEW (wt->priv->list),
|
||||
GTK_SELECTION_MODEL (wt->priv->selection));
|
||||
g_signal_connect (wt->priv->selection, "notify::selected-item", G_CALLBACK (on_selected_item), wt);
|
||||
}
|
||||
|
||||
@@ -1075,7 +1075,6 @@ endif
|
||||
if macos_enabled
|
||||
gtk_macos_frameworks = [
|
||||
'AppKit',
|
||||
'Foundation',
|
||||
]
|
||||
gtk_deps += [dependency('appleframeworks', modules: gtk_macos_frameworks)]
|
||||
endif
|
||||
|
||||
@@ -817,28 +817,15 @@ endif
|
||||
gsk_packages = [ 'graphene-gobject-1.0 @0@'.format(graphene_req) ]
|
||||
gtk_packages = [ 'gio-2.0 @0@'.format(glib_req) ]
|
||||
|
||||
gio_pkgname = os_unix ? 'gio-unix-2.0' : 'gio-2.0'
|
||||
gdk_private_packages = [
|
||||
'@0@ @1@'.format(gio_pkgname, glib_req),
|
||||
'epoxy @0@'.format(epoxy_req),
|
||||
] + x11_pkgs + wayland_pkgs + cairo_backends
|
||||
gsk_private_packages = [] # all already in gdk_private_packages
|
||||
pangoft2_pkgs = (wayland_enabled or x11_enabled) ? ['pangoft2'] : []
|
||||
gtk_private_packages = pangoft2_pkgs
|
||||
|
||||
pkgs = []
|
||||
pkg_targets = []
|
||||
display_backends = []
|
||||
enabled_backends = []
|
||||
foreach backend: [ 'broadway', 'macos', 'wayland', 'win32', 'x11', ]
|
||||
if get_variable('@0@_enabled'.format(backend))
|
||||
pkgs += ['gtk4-@0@'.format(backend)]
|
||||
pkg_targets += backend
|
||||
display_backends += [ backend ]
|
||||
enabled_backends += backend
|
||||
endif
|
||||
endforeach
|
||||
|
||||
common_pc_variables = [
|
||||
'targets=@0@'.format(' '.join(pkg_targets)),
|
||||
'targets=@0@'.format(' '.join(enabled_backends)),
|
||||
'gtk_binary_version=@0@'.format(gtk_binary_version),
|
||||
'gtk_host=@0@-@1@'.format(host_machine.cpu_family(), host_machine.system()), # FIXME
|
||||
]
|
||||
@@ -853,13 +840,14 @@ pkg_config.generate(libgtk,
|
||||
)
|
||||
meson.override_dependency('gtk4', libgtk_dep)
|
||||
|
||||
foreach pkg: pkgs
|
||||
foreach backend: enabled_backends
|
||||
pkg = 'gtk4-@0@'.format(backend)
|
||||
pkg_config.generate(
|
||||
filebase: pkg,
|
||||
unescaped_variables: common_pc_variables,
|
||||
name: 'GTK',
|
||||
description: 'GTK Graphical UI Library',
|
||||
requires: 'gtk4',
|
||||
requires: ['gtk4', get_variable('@0@_public_deps'.format(backend), [])],
|
||||
)
|
||||
meson.override_dependency(pkg, libgtk_dep)
|
||||
endforeach
|
||||
@@ -904,7 +892,7 @@ endif
|
||||
|
||||
#### Summary ####
|
||||
|
||||
summary('Display backends', display_backends, section: 'Components')
|
||||
summary('Display backends', enabled_backends, section: 'Components')
|
||||
summary('Print backends', print_backends, section: 'Components')
|
||||
summary('Media backends', media_backends, section: 'Components')
|
||||
|
||||
|
||||
@@ -425,9 +425,15 @@ tools/gtk-builder-tool-screenshot.c
|
||||
tools/gtk-builder-tool-simplify.c
|
||||
tools/gtk-builder-tool-validate.c
|
||||
tools/gtk-launch.c
|
||||
tools/gtk-path-tool.c
|
||||
tools/gtk-path-tool-decompose.c
|
||||
tools/gtk-path-tool-info.c
|
||||
tools/gtk-path-tool-render.c
|
||||
tools/gtk-path-tool-show.c
|
||||
tools/gtk-path-tool-utils.c
|
||||
tools/gtk-rendernode-tool.c
|
||||
tools/gtk-rendernode-tool-info.c
|
||||
tools/gtk-rendernode-tool-show.c
|
||||
tools/gtk-rendernode-tool-render.c
|
||||
tools/gtk-rendernode-tool-show.c
|
||||
tools/gtk-rendernode-tool-utils.c
|
||||
tools/updateiconcache.c
|
||||
|
||||
@@ -12,8 +12,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+ 2.6\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2023-07-31 15:14+0000\n"
|
||||
"PO-Revision-Date: 2023-08-01 09:23+0330\n"
|
||||
"POT-Creation-Date: 2023-08-14 13:16+0000\n"
|
||||
"PO-Revision-Date: 2023-08-15 02:04+0330\n"
|
||||
"Last-Translator: Danial Behzadi <dani.behzi@ubuntu.com>\n"
|
||||
"Language-Team: Persian <>\n"
|
||||
"Language: fa\n"
|
||||
@@ -137,7 +137,7 @@ msgstr "برنامه از API مربوط به %s پشتبانی نمیکند"
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:1863
|
||||
#: gdk/gdkglcontext.c:1864
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "تلاش شد از %s استفاده شود، ولی %s از پیش در حال استفاده است"
|
||||
@@ -2182,7 +2182,7 @@ msgstr "یک پرونده با همان نام در حال حاضر وجود د
|
||||
#: gtk/gtkfiledialog.c:843 gtk/gtkmessagedialog.c:170 gtk/gtkmessagedialog.c:179
|
||||
#: gtk/gtkmountoperation.c:608 gtk/print/gtkpagesetupunixdialog.c:282
|
||||
#: gtk/print/gtkprintbackend.c:638 gtk/print/gtkprintunixdialog.c:682
|
||||
#: gtk/print/gtkprintunixdialog.c:839 gtk/gtkwindow.c:6238
|
||||
#: gtk/print/gtkprintunixdialog.c:839 gtk/gtkwindow.c:6242
|
||||
#: gtk/ui/gtkappchooserdialog.ui:48 gtk/ui/gtkassistant.ui:52
|
||||
#: gtk/ui/gtkcolorchooserdialog.ui:36 gtk/ui/gtkfontchooserdialog.ui:27
|
||||
msgid "_Cancel"
|
||||
@@ -2270,7 +2270,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "اگر موردی را پاک کنید، برای همیشه از دست خواهد رفت."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1185 gtk/gtkfilechooserwidget.c:1815
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6125 gtk/gtktextview.c:9018
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6145 gtk/gtktextview.c:9018
|
||||
msgid "_Delete"
|
||||
msgstr "_حذف"
|
||||
|
||||
@@ -2608,31 +2608,31 @@ msgstr "بستن"
|
||||
msgid "Close the infobar"
|
||||
msgstr "بستن نوار اطّلاعات"
|
||||
|
||||
#: gtk/gtklabel.c:5690 gtk/gtktext.c:6113 gtk/gtktextview.c:9006
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6133 gtk/gtktextview.c:9006
|
||||
msgid "Cu_t"
|
||||
msgstr "_برش"
|
||||
|
||||
#: gtk/gtklabel.c:5691 gtk/gtktext.c:6117 gtk/gtktextview.c:9010
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6137 gtk/gtktextview.c:9010
|
||||
msgid "_Copy"
|
||||
msgstr "_رونوشت"
|
||||
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6121 gtk/gtktextview.c:9014
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6141 gtk/gtktextview.c:9014
|
||||
msgid "_Paste"
|
||||
msgstr "_چسباندن"
|
||||
|
||||
#: gtk/gtklabel.c:5698 gtk/gtktext.c:6134 gtk/gtktextview.c:9039
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6154 gtk/gtktextview.c:9039
|
||||
msgid "Select _All"
|
||||
msgstr "انتخاب _همه"
|
||||
|
||||
#: gtk/gtklabel.c:5703
|
||||
#: gtk/gtklabel.c:5705
|
||||
msgid "_Open Link"
|
||||
msgstr "_گشودن پیوند"
|
||||
|
||||
#: gtk/gtklabel.c:5707
|
||||
#: gtk/gtklabel.c:5709
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "_رونوشت از نشانی پیوند"
|
||||
|
||||
#: gtk/gtklabel.c:5751 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
#: gtk/gtklabel.c:5753 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
msgid "Context menu"
|
||||
msgstr "فهرست بافتاری"
|
||||
|
||||
@@ -2703,7 +2703,7 @@ msgid "Play"
|
||||
msgstr "پخش"
|
||||
|
||||
#: gtk/gtkmessagedialog.c:162 gtk/gtkmessagedialog.c:180
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6239
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6243
|
||||
msgid "_OK"
|
||||
msgstr "_تأیید"
|
||||
|
||||
@@ -3557,7 +3557,7 @@ msgctxt "accessibility"
|
||||
msgid "Sidebar"
|
||||
msgstr "نوار کناری"
|
||||
|
||||
#: gtk/gtktext.c:6139 gtk/gtktextview.c:9044
|
||||
#: gtk/gtktext.c:6159 gtk/gtktextview.c:9044
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "درج _ایموجی"
|
||||
|
||||
@@ -3569,12 +3569,12 @@ msgstr "بر_گردان"
|
||||
msgid "_Redo"
|
||||
msgstr "_انجام دوباره"
|
||||
|
||||
#: gtk/gtkwindow.c:6227
|
||||
#: gtk/gtkwindow.c:6231
|
||||
#, c-format
|
||||
msgid "Do you want to use GTK Inspector?"
|
||||
msgstr "میخواهید از بازرس +GTK استفاده کنید؟"
|
||||
|
||||
#: gtk/gtkwindow.c:6229
|
||||
#: gtk/gtkwindow.c:6233
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK Inspector is an interactive debugger that lets you explore and modify the "
|
||||
@@ -3584,7 +3584,7 @@ msgstr ""
|
||||
"بازرس +GTK یک بازرس تعاملی است که به شما اجازه پیمایش و تغییر هسته برنامههای +GTK "
|
||||
"را میدهد. استفاده از آن ممکن است باعث شود که برنامهها قفل کنند یا از هم بپاشند."
|
||||
|
||||
#: gtk/gtkwindow.c:6234
|
||||
#: gtk/gtkwindow.c:6238
|
||||
msgid "Don’t show this message again"
|
||||
msgstr "این پیام را دوباره نشان نده"
|
||||
|
||||
@@ -3620,7 +3620,8 @@ msgstr "نقش"
|
||||
msgid "Description"
|
||||
msgstr "شرح"
|
||||
|
||||
#: gtk/inspector/a11y.ui:99 gtk/inspector/misc-info.ui:297
|
||||
#: gtk/inspector/a11y.ui:99 gtk/inspector/misc-info.ui:296
|
||||
#: tools/gtk-path-tool-info.c:72
|
||||
msgid "Bounds"
|
||||
msgstr "مزرها"
|
||||
|
||||
@@ -3925,61 +3926,61 @@ msgstr "حالت درخواست"
|
||||
msgid "Measure map"
|
||||
msgstr "نگاشت اندازه"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:254
|
||||
#: gtk/inspector/misc-info.ui:253
|
||||
msgid "Expand"
|
||||
msgstr "گسترش"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:322
|
||||
#: gtk/inspector/misc-info.ui:321
|
||||
msgid "Baseline"
|
||||
msgstr "خط مبنا"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:347
|
||||
#: gtk/inspector/misc-info.ui:346
|
||||
msgid "Surface"
|
||||
msgstr "سطح"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:366 gtk/inspector/misc-info.ui:401
|
||||
#: gtk/inspector/misc-info.ui:436 gtk/inspector/prop-editor.c:1150
|
||||
#: gtk/inspector/misc-info.ui:365 gtk/inspector/misc-info.ui:400
|
||||
#: gtk/inspector/misc-info.ui:435 gtk/inspector/prop-editor.c:1150
|
||||
#: gtk/inspector/prop-editor.c:1533 gtk/inspector/window.ui:396
|
||||
msgid "Properties"
|
||||
msgstr "ویژگیها"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:382
|
||||
#: gtk/inspector/misc-info.ui:381
|
||||
msgid "Renderer"
|
||||
msgstr "پرداختگر"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:417
|
||||
#: gtk/inspector/misc-info.ui:416
|
||||
msgid "Frame Clock"
|
||||
msgstr "دیدهبان فریم"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:452
|
||||
#: gtk/inspector/misc-info.ui:451
|
||||
msgid "Tick Callback"
|
||||
msgstr "بازخورد تیک"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:478
|
||||
#: gtk/inspector/misc-info.ui:477
|
||||
msgid "Frame Count"
|
||||
msgstr "تعداد قاب"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:503
|
||||
#: gtk/inspector/misc-info.ui:502
|
||||
msgid "Frame Rate"
|
||||
msgstr "آهنگ قاب"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:528
|
||||
#: gtk/inspector/misc-info.ui:527
|
||||
msgid "Scale"
|
||||
msgstr "مقیاس"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:553
|
||||
#: gtk/inspector/misc-info.ui:552
|
||||
msgid "Mapped"
|
||||
msgstr "متصل شده"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:579
|
||||
#: gtk/inspector/misc-info.ui:578
|
||||
msgid "Realized"
|
||||
msgstr "محقق شده"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:605
|
||||
#: gtk/inspector/misc-info.ui:604
|
||||
msgid "Is Toplevel"
|
||||
msgstr "سطح بالا (Toplevel) است"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:631
|
||||
#: gtk/inspector/misc-info.ui:630
|
||||
msgid "Child Visible"
|
||||
msgstr "فرزند قابل دیدن است"
|
||||
|
||||
@@ -4088,7 +4089,7 @@ msgstr "منبع:"
|
||||
msgid "Defined At"
|
||||
msgstr "تعریف شده در"
|
||||
|
||||
#: gtk/inspector/recorder.c:1865
|
||||
#: gtk/inspector/recorder.c:1922
|
||||
#, c-format
|
||||
msgid "Saving RenderNode failed"
|
||||
msgstr "ذخیرهٔ RenderNode شکست خورد"
|
||||
@@ -7124,7 +7125,8 @@ msgstr ""
|
||||
#: tools/gtk-builder-tool-enumerate.c:56 tools/gtk-builder-tool-preview.c:179
|
||||
#: tools/gtk-builder-tool-preview.c:180 tools/gtk-builder-tool-screenshot.c:360
|
||||
#: tools/gtk-builder-tool-simplify.c:2529 tools/gtk-builder-tool-validate.c:261
|
||||
#: tools/gtk-rendernode-tool-info.c:200 tools/gtk-rendernode-tool-show.c:102
|
||||
#: tools/gtk-path-tool-render.c:62 tools/gtk-rendernode-tool-info.c:208
|
||||
#: tools/gtk-rendernode-tool-show.c:102
|
||||
msgid "FILE"
|
||||
msgstr "پرونده"
|
||||
|
||||
@@ -7156,8 +7158,8 @@ msgid "Use style from CSS file"
|
||||
msgstr "استفادهٔ سبک از پروندهٔ CSS"
|
||||
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-show.c:109
|
||||
#: tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-rendernode-tool-show.c:109
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
msgstr "نتوانست سامانهٔ پنجره را راهاندازی کند\n"
|
||||
@@ -7380,6 +7382,213 @@ msgstr "%s: همچین برنامهای وجود ندارد %s"
|
||||
msgid "%s: error launching application: %s\n"
|
||||
msgstr "%s: خطا در اجرا برنامه: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage:\n"
|
||||
" gtk4-path-tool [COMMAND] [OPTION…] PATH\n"
|
||||
"\n"
|
||||
"Perform various tasks on paths.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" decompose Decompose the path\n"
|
||||
" show Display the path in a window\n"
|
||||
" render Render the path as an image\n"
|
||||
" info Print information about the path\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"استفاده:\n"
|
||||
" gtk4-path-tool [دستور] [گزینه…] FILE\n"
|
||||
"\n"
|
||||
"انجام وظایف مختلف روی مسیرها.\n"
|
||||
"\n"
|
||||
"\n"
|
||||
" decompose باز کردن مسیر\n"
|
||||
" show نمایش مسیر در یک پنجره\n"
|
||||
" render پرداخت مسیر به شکل یک عکس\n"
|
||||
" info چاپ اطّلاعات دربارهٔ مسیر\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:75
|
||||
msgid "Allow quadratic Bézier curves"
|
||||
msgstr "اجازه به منحیهای درجه دوم بزیه"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:76
|
||||
msgid "Allow cubic Bézier curves"
|
||||
msgstr "اجازه به منحیهای درجه سوم بزیه"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:77 tools/gtk-path-tool-info.c:34
|
||||
#: tools/gtk-path-tool-render.c:63 tools/gtk-path-tool-show.c:132
|
||||
msgid "PATH"
|
||||
msgstr "PATH"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:89
|
||||
msgid "Decompose a path."
|
||||
msgstr "باز کردن یک مسیر."
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:102 tools/gtk-path-tool-info.c:58
|
||||
msgid "No paths given."
|
||||
msgstr "مسیری داده نشده"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:128
|
||||
msgid "That didn't work out."
|
||||
msgstr "کار نکرد."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:45
|
||||
msgid "Print information about a path."
|
||||
msgstr "چاپ اطّلاعات دربارهٔ یک مسیر."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:65
|
||||
msgid "Path is empty."
|
||||
msgstr "مسیر خالی است."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:69
|
||||
msgid "Path is closed"
|
||||
msgstr "مسیر بسته است"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-show.c:122
|
||||
msgid "Fill rule (winding, even-odd)"
|
||||
msgstr "قاعدهٔ پر کردن (winding, even-odd)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-render.c:56
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-render.c:58
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-render.c:60
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:122
|
||||
#: tools/gtk-path-tool-show.c:126 tools/gtk-path-tool-show.c:127
|
||||
#: tools/gtk-path-tool-show.c:128 tools/gtk-path-tool-show.c:129
|
||||
#: tools/gtk-path-tool-show.c:130 tools/gtk-path-tool-show.c:131
|
||||
msgid "VALUE"
|
||||
msgstr "VALUE"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-show.c:123
|
||||
msgid "Foreground color"
|
||||
msgstr "رنگ پیشزمینه"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-render.c:54
|
||||
#: tools/gtk-path-tool-show.c:123 tools/gtk-path-tool-show.c:124
|
||||
msgid "COLOR"
|
||||
msgstr "COLOR"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:54 tools/gtk-path-tool-show.c:124
|
||||
msgid "Background color"
|
||||
msgstr "رنگ پسزمینه"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:55 tools/gtk-path-tool-show.c:125
|
||||
msgid "Stroke the path instead of filling it"
|
||||
msgstr "خطکشی دور مسیر به جای پر کردنش"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:56 tools/gtk-path-tool-show.c:126
|
||||
msgid "Line width (number)"
|
||||
msgstr "پهنای خط (عدد)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-show.c:127
|
||||
msgid "Line cap (butt, round, square)"
|
||||
msgstr "کلاهک خط (butt, round, square)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:58 tools/gtk-path-tool-show.c:128
|
||||
msgid "Line join (miter, miter-clip, round, bevel, arcs)"
|
||||
msgstr "پیوستن خط (miter, miter-clip, round, bevel, arcs)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-show.c:129
|
||||
msgid "Miter limit (number)"
|
||||
msgstr "کران تاج (عدد)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:60 tools/gtk-path-tool-show.c:130
|
||||
msgid "Dash pattern (comma-separated numbers)"
|
||||
msgstr "الگوی نقطهچین (عددهای جدا شده با کاما)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:131
|
||||
msgid "Dash offset (number)"
|
||||
msgstr "انحراف از مبدأ نقطهچین (عدد)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:62
|
||||
msgid "The output file"
|
||||
msgstr "پروندهٔ خروجی"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:81 tools/gtk-path-tool-show.c:145
|
||||
msgid "Could not initialize windowing system"
|
||||
msgstr "نتوانست سامانهٔ پنجره را راهاندازی کند"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:89
|
||||
msgid "Render the path to a png image."
|
||||
msgstr "پرداخت مسیر در یک تصویر png."
|
||||
|
||||
#: tools/gtk-path-tool-render.c:102 tools/gtk-path-tool-show.c:166
|
||||
msgid "No path specified"
|
||||
msgstr "مسیری مشخّص نشده"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:108
|
||||
msgid "Can only render a single path"
|
||||
msgstr "تنها میتواند یک تکمسیر را پرداخت کند"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:114 tools/gtk-path-tool-show.c:178
|
||||
msgid "fill rule"
|
||||
msgstr "قاعدهٔ پر کردن"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:118 tools/gtk-path-tool-show.c:182
|
||||
msgid "line cap"
|
||||
msgstr "کلاهک خط"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:119 tools/gtk-path-tool-show.c:183
|
||||
msgid "line join"
|
||||
msgstr "پیوستن خط"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:143 tools/gtk-path-tool-show.c:207
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as number"
|
||||
msgstr "شکست در تجزیهٔ «%s» به شکل عدد"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:187
|
||||
#, c-format
|
||||
msgid "Saving png to '%s' failed"
|
||||
msgstr "ذخیرهٔ png در «%s» شکست خورد"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:194
|
||||
#, c-format
|
||||
msgid "Output written to '%s'."
|
||||
msgstr "خروجی در «%s» نوشته شد."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:43 tools/gtk-path-tool-show.c:78
|
||||
msgid "Path Preview"
|
||||
msgstr "پیشنمایش مسیر"
|
||||
|
||||
#: tools/gtk-path-tool-show.c:153
|
||||
msgid "Display the path."
|
||||
msgstr "نمایش مسیر."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:172
|
||||
msgid "Can only show a single path"
|
||||
msgstr "تنها میتواند یک تکمسیر را نمایش دهد"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:58
|
||||
#, c-format
|
||||
msgid "Failed to read from standard input: %s\n"
|
||||
msgstr "شکست در خواندن از ورودی استاندارد: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:64
|
||||
#, c-format
|
||||
msgid "Error reading from standard input: %s\n"
|
||||
msgstr "خطا در خواندن از ورودی استاندارد: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:83
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as path.\n"
|
||||
msgstr "شکست در تجزیهٔ «%s» به شکل مسیر.\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:109
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as %s."
|
||||
msgstr "شکست در تجزیهٔ «%s» به شکل %s"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:111
|
||||
msgid "Possible values: "
|
||||
msgstr "مقدارهای ممکن: "
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:135
|
||||
#, c-format
|
||||
msgid "Could not parse '%s' as color"
|
||||
msgstr "نتوانست «%s» را به شکل رنگ تجزیه کند"
|
||||
|
||||
#: tools/gtk-rendernode-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7408,50 +7617,41 @@ msgstr ""
|
||||
" screenshot نماگرفت از پرونده\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:177
|
||||
#: tools/gtk-rendernode-tool-info.c:185
|
||||
#, c-format
|
||||
msgid "Number of nodes: %u\n"
|
||||
msgstr "شمار گرهها: %Iu\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:184
|
||||
#: tools/gtk-rendernode-tool-info.c:192
|
||||
#, c-format
|
||||
msgid "Depth: %u\n"
|
||||
msgstr "ژرفا: %Iu\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:187
|
||||
#: tools/gtk-rendernode-tool-info.c:195
|
||||
#, c-format
|
||||
msgid "Bounds: %g x %g\n"
|
||||
msgstr "مرزها: %g × %g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:188
|
||||
#: tools/gtk-rendernode-tool-info.c:196
|
||||
#, c-format
|
||||
msgid "Origin: %g %g\n"
|
||||
msgstr "خاستگاه: %g × %g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:209
|
||||
#: tools/gtk-rendernode-tool-info.c:217
|
||||
msgid "Provide information about the render node."
|
||||
msgstr "اطّلاعاتی دربارهٔ گره پرداختگر فراهم میکند."
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:222 tools/gtk-rendernode-tool-show.c:130
|
||||
#: tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-info.c:230 tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-show.c:130
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
msgstr "هیچ پروندهٔ .node ای مشخّص نشده\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:228
|
||||
#: tools/gtk-rendernode-tool-info.c:236
|
||||
#, c-format
|
||||
msgid "Can only accept a single .node file\n"
|
||||
msgstr "تنها میتواند یک تکپروندهٔ .node را بپذیرد\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "نمایش گره پرداختگر."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "تنها میتواند یک تکپروندهٔ .node را پیشنمایش دهد\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:123
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7483,6 +7683,15 @@ msgstr "پرداخت یک پروندهٔ .node در یک تصویر."
|
||||
msgid "Can only render a single .node file to a single output file\n"
|
||||
msgstr "تنها میتواند یک تکپروندهٔ .noide را در یک پروندهٔ خروحی پرداخت کند\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "نمایش گره پرداختگر."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "تنها میتواند یک تکپروندهٔ .node را پیشنمایش دهد\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:51
|
||||
#, c-format
|
||||
msgid "Error at %s: %s\n"
|
||||
@@ -8372,9 +8581,6 @@ msgstr ""
|
||||
#~ msgid "Can't parse “%s”\n"
|
||||
#~ msgstr "نمیتوان «%s» را تجزیه کرد\n"
|
||||
|
||||
#~ msgid "Failed to parse png image"
|
||||
#~ msgstr "شکست در تجزیهٔ تصویر png"
|
||||
|
||||
#~ msgid "Sandbox does not provide an OpenGL implementation"
|
||||
#~ msgstr "قرنطینه پیادهسازی OpenGLای را فراهم نمیکند"
|
||||
|
||||
@@ -8508,9 +8714,6 @@ msgstr ""
|
||||
#~ msgid "Size of the palette in 8 bit mode"
|
||||
#~ msgstr "اندازهٔ تختهرنگ در حالت ۸ بیتی"
|
||||
|
||||
#~ msgid "COLORS"
|
||||
#~ msgstr "COLORS"
|
||||
|
||||
#~ msgctxt "Action description"
|
||||
#~ msgid "Toggles the cell"
|
||||
#~ msgstr "تغییر وضعیت سلول"
|
||||
@@ -8739,10 +8942,6 @@ msgstr ""
|
||||
#~ msgid "_Print"
|
||||
#~ msgstr "_چاپ"
|
||||
|
||||
#~ msgctxt "Stock label"
|
||||
#~ msgid "Print Pre_view"
|
||||
#~ msgstr "_پیشنمایش چاپ"
|
||||
|
||||
#~ msgctxt "Stock label"
|
||||
#~ msgid "_Properties"
|
||||
#~ msgstr "_ویژگیها"
|
||||
@@ -9906,9 +10105,6 @@ msgstr ""
|
||||
#~ msgid "_Insert Unicode Control Character"
|
||||
#~ msgstr "_درج نویسهی کنترلی یونیکد"
|
||||
|
||||
#~ msgid "Could not add a bookmark"
|
||||
#~ msgstr "نمیتوان نشانکی اضافه کرد"
|
||||
|
||||
#~ msgid "Could not remove bookmark"
|
||||
#~ msgstr "نمیتوان نشانک را حذف کرد"
|
||||
|
||||
@@ -10099,9 +10295,6 @@ msgstr ""
|
||||
#~ msgid "Failed to open temporary file"
|
||||
#~ msgstr "باز کردن پروندهی موقت شکست خورد"
|
||||
|
||||
#~ msgid "Failed to read from temporary file"
|
||||
#~ msgstr "خواندن از پروندهی موقت شکست خورد"
|
||||
|
||||
#~ msgid "Failed to open '%s' for writing: %s"
|
||||
#~ msgstr "نمیتوان «%s» را برای نوشتن باز کرد: %s"
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+-master-po-gl-77922___.merged\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2023-08-08 15:17+0000\n"
|
||||
"PO-Revision-Date: 2023-08-11 02:35+0200\n"
|
||||
"POT-Creation-Date: 2023-08-15 19:28+0000\n"
|
||||
"PO-Revision-Date: 2023-08-16 01:39+0200\n"
|
||||
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
|
||||
"Language-Team: Galician <proxecto@trasno.gal>\n"
|
||||
"Language: gl\n"
|
||||
@@ -150,7 +150,7 @@ msgstr "A aplicación non admite a API de %s"
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:1863
|
||||
#: gdk/gdkglcontext.c:1864
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "Tentando usar %s, pero %s xa está en uso"
|
||||
@@ -1081,13 +1081,13 @@ msgid "Pick a Color"
|
||||
msgstr "Escolla unha cor"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:502 gtk/gtkcolorchooserwidget.c:313
|
||||
#: gtk/gtkcolordialogbutton.c:302
|
||||
#: gtk/gtkcolordialogbutton.c:335
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%, Alpha %d%%"
|
||||
msgstr "Vermello %d%%, verde %d%%, Azul %d%%, Alfa %d%%"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:508 gtk/gtkcolorchooserwidget.c:319
|
||||
#: gtk/gtkcolordialogbutton.c:308
|
||||
#: gtk/gtkcolordialogbutton.c:341
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%"
|
||||
msgstr "Vermello %d%%, Verde %d%%, Azul %d%%"
|
||||
@@ -1102,11 +1102,11 @@ msgid "Pick a Font"
|
||||
msgstr "Escolla un tipo de letra"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:597 gtk/gtkfilechooserwidget.c:3871
|
||||
#: gtk/gtkfontdialogbutton.c:115 gtk/inspector/visual.ui:169
|
||||
#: gtk/gtkfontdialogbutton.c:126 gtk/inspector/visual.ui:169
|
||||
msgid "Font"
|
||||
msgstr "Tipo de letra"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:1152 gtk/gtkfontdialogbutton.c:614
|
||||
#: gtk/deprecated/gtkfontbutton.c:1152 gtk/gtkfontdialogbutton.c:652
|
||||
msgctxt "font"
|
||||
msgid "None"
|
||||
msgstr "Ningún"
|
||||
@@ -2256,7 +2256,7 @@ msgstr "_Abrir"
|
||||
msgid "_Save"
|
||||
msgstr "_Gardar"
|
||||
|
||||
#: gtk/gtkfilechoosernativequartz.c:340 gtk/ui/gtkfilechooserwidget.ui:288
|
||||
#: gtk/gtkfilechoosernativequartz.c:344 gtk/ui/gtkfilechooserwidget.ui:288
|
||||
msgid "Select which types of files are shown"
|
||||
msgstr "Seleccione que tipos de ficheiros se mostran"
|
||||
|
||||
@@ -2331,7 +2331,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "Se elimina un elemento perderase para sempre."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1185 gtk/gtkfilechooserwidget.c:1815
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6125 gtk/gtktextview.c:9018
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6145 gtk/gtktextview.c:9018
|
||||
msgid "_Delete"
|
||||
msgstr "E_liminar"
|
||||
|
||||
@@ -2472,7 +2472,7 @@ msgstr "Programa"
|
||||
msgid "Audio"
|
||||
msgstr "Son"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3872 gtk/gtkfilefilter.c:1035
|
||||
#: gtk/gtkfilechooserwidget.c:3872 gtk/gtkfilefilter.c:1032
|
||||
msgid "Image"
|
||||
msgstr "Imaxe"
|
||||
|
||||
@@ -2582,7 +2582,7 @@ msgstr "Seleccionar cartafoles"
|
||||
msgid "Select a Folder"
|
||||
msgstr "Seleccione un cartafol"
|
||||
|
||||
#: gtk/gtkfilefilter.c:1048
|
||||
#: gtk/gtkfilefilter.c:1045
|
||||
msgid "Unspecified"
|
||||
msgstr "Non especificado"
|
||||
|
||||
@@ -2670,19 +2670,19 @@ msgstr "Pechar"
|
||||
msgid "Close the infobar"
|
||||
msgstr "Pecha a barra de información"
|
||||
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6113 gtk/gtktextview.c:9006
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6133 gtk/gtktextview.c:9006
|
||||
msgid "Cu_t"
|
||||
msgstr "Cor_tar"
|
||||
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6117 gtk/gtktextview.c:9010
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6137 gtk/gtktextview.c:9010
|
||||
msgid "_Copy"
|
||||
msgstr "_Copiar"
|
||||
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6121 gtk/gtktextview.c:9014
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6141 gtk/gtktextview.c:9014
|
||||
msgid "_Paste"
|
||||
msgstr "_Pegar"
|
||||
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6134 gtk/gtktextview.c:9039
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6154 gtk/gtktextview.c:9039
|
||||
msgid "Select _All"
|
||||
msgstr "Seleccionar _todo"
|
||||
|
||||
@@ -3632,7 +3632,7 @@ msgctxt "accessibility"
|
||||
msgid "Sidebar"
|
||||
msgstr "Barra lateral"
|
||||
|
||||
#: gtk/gtktext.c:6139 gtk/gtktextview.c:9044
|
||||
#: gtk/gtktext.c:6159 gtk/gtktextview.c:9044
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "Inserir _emoticono"
|
||||
|
||||
@@ -3697,6 +3697,7 @@ msgid "Description"
|
||||
msgstr "Descrición"
|
||||
|
||||
#: gtk/inspector/a11y.ui:99 gtk/inspector/misc-info.ui:296
|
||||
#: tools/gtk-path-tool-info.c:128
|
||||
msgid "Bounds"
|
||||
msgstr "Limiares"
|
||||
|
||||
@@ -5569,7 +5570,7 @@ msgstr "Sobre Choukei 40"
|
||||
#: gtk/print/paper_names_offsets.c:92
|
||||
msgctxt "paper size"
|
||||
msgid "hagaki (postcard)"
|
||||
msgstr "Hagaki (postal)"
|
||||
msgstr "hagaki (postal)"
|
||||
|
||||
#: gtk/print/paper_names_offsets.c:93
|
||||
msgctxt "paper size"
|
||||
@@ -7210,7 +7211,8 @@ msgstr ""
|
||||
#: tools/gtk-builder-tool-enumerate.c:56 tools/gtk-builder-tool-preview.c:179
|
||||
#: tools/gtk-builder-tool-preview.c:180 tools/gtk-builder-tool-screenshot.c:360
|
||||
#: tools/gtk-builder-tool-simplify.c:2529 tools/gtk-builder-tool-validate.c:261
|
||||
#: tools/gtk-rendernode-tool-info.c:208 tools/gtk-rendernode-tool-show.c:102
|
||||
#: tools/gtk-path-tool-render.c:62 tools/gtk-rendernode-tool-info.c:208
|
||||
#: tools/gtk-rendernode-tool-show.c:102
|
||||
msgid "FILE"
|
||||
msgstr "FICHEIRO"
|
||||
|
||||
@@ -7242,8 +7244,8 @@ msgid "Use style from CSS file"
|
||||
msgstr "Usar o estilo dun ficheiro CSS"
|
||||
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-show.c:109
|
||||
#: tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-rendernode-tool-show.c:109
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
msgstr "Non foi posíbel inicializar sistema de xanelas\n"
|
||||
@@ -7470,6 +7472,240 @@ msgstr "%s: non existe a aplicación %s"
|
||||
msgid "%s: error launching application: %s\n"
|
||||
msgstr "%s: produciuse un erro ao iniciar a aplicación: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage:\n"
|
||||
" gtk4-path-tool [COMMAND] [OPTION…] PATH\n"
|
||||
"\n"
|
||||
"Perform various tasks on paths.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" decompose Decompose the path\n"
|
||||
" show Display the path in a window\n"
|
||||
" render Render the path as an image\n"
|
||||
" info Print information about the path\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Uso:\n"
|
||||
" gtk4-path-tool [ORDE] FICHEIRO\n"
|
||||
"\n"
|
||||
"Leva a cabo varias tarefas en rutas.\n"
|
||||
"\n"
|
||||
"Ordes:\n"
|
||||
"\n"
|
||||
" decompose Descompoñer a ruta\n"
|
||||
" show Mostra a ruta nunha xanela\n"
|
||||
" render Renderiza a ruta como unha imaxe\n"
|
||||
"\n"
|
||||
" info Fornece información da ruta\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:75
|
||||
msgid "Allow quadratic Bézier curves"
|
||||
msgstr "Permitir curvas Bézier cuadráticas"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:76
|
||||
msgid "Allow cubic Bézier curves"
|
||||
msgstr "Permitir curvas Bézier cúbicas"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:77 tools/gtk-path-tool-info.c:88
|
||||
#: tools/gtk-path-tool-render.c:63 tools/gtk-path-tool-show.c:132
|
||||
msgid "PATH"
|
||||
msgstr "RUTA"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:89
|
||||
msgid "Decompose a path."
|
||||
msgstr "Descompoñer unha ruta."
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:102 tools/gtk-path-tool-info.c:112
|
||||
msgid "No paths given."
|
||||
msgstr "Non se forneceron rutas."
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:128
|
||||
msgid "That didn't work out."
|
||||
msgstr "Iso non funcionou."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:99
|
||||
msgid "Print information about a path."
|
||||
msgstr "Mostra a información sobre a ruta."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:119
|
||||
msgid "Path is empty."
|
||||
msgstr "A ruta está baleira."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:125
|
||||
msgid "Path is closed"
|
||||
msgstr "A ruta está pechada"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:134
|
||||
#, c-format
|
||||
msgid "%d contours"
|
||||
msgstr "%d contornos"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:136
|
||||
#, c-format
|
||||
msgid "%d operations"
|
||||
msgstr "%d operacións"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:140
|
||||
#, c-format
|
||||
msgid "%d lines"
|
||||
msgstr "%d liñas"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:145
|
||||
#, c-format
|
||||
msgid "%d quadratics"
|
||||
msgstr "%d cuadráticas"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:150
|
||||
#, c-format
|
||||
msgid "%d cubics"
|
||||
msgstr "%d cúbicas"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-show.c:122
|
||||
msgid "Fill rule (winding, even-odd)"
|
||||
msgstr "Regra de recheo (sinuoso, par-impar)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-render.c:56
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-render.c:58
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-render.c:60
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:122
|
||||
#: tools/gtk-path-tool-show.c:126 tools/gtk-path-tool-show.c:127
|
||||
#: tools/gtk-path-tool-show.c:128 tools/gtk-path-tool-show.c:129
|
||||
#: tools/gtk-path-tool-show.c:130 tools/gtk-path-tool-show.c:131
|
||||
msgid "VALUE"
|
||||
msgstr "VALOR"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-show.c:123
|
||||
msgid "Foreground color"
|
||||
msgstr "Cor do primeiro plano"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-render.c:54
|
||||
#: tools/gtk-path-tool-show.c:123 tools/gtk-path-tool-show.c:124
|
||||
msgid "COLOR"
|
||||
msgstr "COR"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:54 tools/gtk-path-tool-show.c:124
|
||||
msgid "Background color"
|
||||
msgstr "Cor do fondo"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:55 tools/gtk-path-tool-show.c:125
|
||||
msgid "Stroke the path instead of filling it"
|
||||
msgstr "Traza a ruta en lugar de enchela"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:56 tools/gtk-path-tool-show.c:126
|
||||
msgid "Line width (number)"
|
||||
msgstr "Anchura da liña (número)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-show.c:127
|
||||
msgid "Line cap (butt, round, square)"
|
||||
msgstr "Límite de liña (tope, redondo, cadrada)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:58 tools/gtk-path-tool-show.c:128
|
||||
msgid "Line join (miter, miter-clip, round, bevel, arcs)"
|
||||
msgstr "Unión de liña (inglete, inglete-clip, redondo, bisel, arcos)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-show.c:129
|
||||
msgid "Miter limit (number)"
|
||||
msgstr "Límite de inglete (número)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:60 tools/gtk-path-tool-show.c:130
|
||||
msgid "Dash pattern (comma-separated numbers)"
|
||||
msgstr "Patrón de guión (números separados por comas)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:131
|
||||
msgid "Dash offset (number)"
|
||||
msgstr "Desprazamento do guión (número)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:62
|
||||
msgid "The output file"
|
||||
msgstr "O ficheiro de saída"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:81 tools/gtk-path-tool-show.c:145
|
||||
msgid "Could not initialize windowing system"
|
||||
msgstr "Non foi posíbel inicializar sistema de xanelas"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:89
|
||||
msgid "Render the path to a png image."
|
||||
msgstr "Renderiza a ruta a unha imaxe png."
|
||||
|
||||
#: tools/gtk-path-tool-render.c:102 tools/gtk-path-tool-show.c:166
|
||||
msgid "No path specified"
|
||||
msgstr "Ruta non especificada"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:108
|
||||
msgid "Can only render a single path"
|
||||
msgstr "Só pode renderizar unha única ruta"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:114 tools/gtk-path-tool-show.c:178
|
||||
msgid "fill rule"
|
||||
msgstr "regra de recheo"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:118 tools/gtk-path-tool-show.c:182
|
||||
msgid "line cap"
|
||||
msgstr "límite de liña"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:119 tools/gtk-path-tool-show.c:183
|
||||
msgid "line join"
|
||||
msgstr "unión de liña"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:143 tools/gtk-path-tool-show.c:207
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as number"
|
||||
msgstr "Produciuse un erro ao analizar «%s» como un número"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:187
|
||||
#, c-format
|
||||
msgid "Saving png to '%s' failed"
|
||||
msgstr "Fallou o gardado do png en «%s»"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:194
|
||||
#, c-format
|
||||
msgid "Output written to '%s'."
|
||||
msgstr "Saída escrita en «%s»."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:43 tools/gtk-path-tool-show.c:78
|
||||
msgid "Path Preview"
|
||||
msgstr "Vista previa"
|
||||
|
||||
#: tools/gtk-path-tool-show.c:153
|
||||
msgid "Display the path."
|
||||
msgstr "Mostrar a ruta."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:172
|
||||
msgid "Can only show a single path"
|
||||
msgstr "Só pode mostrar unha única ruta"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:58
|
||||
#, c-format
|
||||
msgid "Failed to read from standard input: %s\n"
|
||||
msgstr "Produciuse un erro ao ler desde a entrada estándar: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:64
|
||||
#, c-format
|
||||
msgid "Error reading from standard input: %s\n"
|
||||
msgstr "Produciuse un erro ao ler desde a entrada estándar: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:83
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as path.\n"
|
||||
msgstr "Produciuse un erro ao analizar «%s» como unha ruta.\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:109
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as %s."
|
||||
msgstr "Produciuse un erro ao analizar «%s» como %s."
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:111
|
||||
msgid "Possible values: "
|
||||
msgstr "Valores posíbeis: "
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:135
|
||||
#, c-format
|
||||
msgid "Could not parse '%s' as color"
|
||||
msgstr "Non foi posíbel analizar «%s» como unha cor"
|
||||
|
||||
#: tools/gtk-rendernode-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7519,8 +7755,8 @@ msgstr "Orixe: %g %g\n"
|
||||
msgid "Provide information about the render node."
|
||||
msgstr "Fornece información sobre o nodo renderizado."
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:230 tools/gtk-rendernode-tool-show.c:130
|
||||
#: tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-info.c:230 tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-show.c:130
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
msgstr "Non se especificou ningún ficheiro .node\n"
|
||||
@@ -7530,15 +7766,6 @@ msgstr "Non se especificou ningún ficheiro .node\n"
|
||||
msgid "Can only accept a single .node file\n"
|
||||
msgstr "Só pode aceptar un ficheiro .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "Mostrar o nodo renderizado."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "Só se pode previsualizar un único ficheiro .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:123
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7571,6 +7798,15 @@ msgid "Can only render a single .node file to a single output file\n"
|
||||
msgstr ""
|
||||
"Só pode renderizar un ficheiro .node único nun ficheiro de saída único\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "Mostrar o nodo renderizado."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "Só se pode previsualizar un único ficheiro .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:51
|
||||
#, c-format
|
||||
msgid "Error at %s: %s\n"
|
||||
|
||||
@@ -11,8 +11,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2023-07-31 15:14+0000\n"
|
||||
"PO-Revision-Date: 2023-08-01 06:03+0200\n"
|
||||
"POT-Creation-Date: 2023-08-15 19:28+0000\n"
|
||||
"PO-Revision-Date: 2023-08-16 05:35+0200\n"
|
||||
"Last-Translator: Ekaterine Papava <papava.e@gtu.ge>\n"
|
||||
"Language-Team: Georgian <http://mail.gnome.org/mailman/listinfo/gnome-ge-"
|
||||
"list>\n"
|
||||
@@ -135,7 +135,7 @@ msgstr "აპლიკაციას %s-ის API-ის მხარდა
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:1863
|
||||
#: gdk/gdkglcontext.c:1864
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "%s გამოყენების მცდელობა, მაგრამ %s უკვე გამოიყენება"
|
||||
@@ -1068,13 +1068,13 @@ msgid "Pick a Color"
|
||||
msgstr "ფერის არჩევა"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:502 gtk/gtkcolorchooserwidget.c:313
|
||||
#: gtk/gtkcolordialogbutton.c:302
|
||||
#: gtk/gtkcolordialogbutton.c:335
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%, Alpha %d%%"
|
||||
msgstr "წითელი %d%%, მწვანე %d%%, ლურჯი %d%%, ალფა %d%%"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:508 gtk/gtkcolorchooserwidget.c:319
|
||||
#: gtk/gtkcolordialogbutton.c:308
|
||||
#: gtk/gtkcolordialogbutton.c:341
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%"
|
||||
msgstr "წითელი %d%%, მწვანე %d%%, ლურჯი %d%%"
|
||||
@@ -1089,11 +1089,11 @@ msgid "Pick a Font"
|
||||
msgstr "აირჩიეთ შრიფტი"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:597 gtk/gtkfilechooserwidget.c:3871
|
||||
#: gtk/gtkfontdialogbutton.c:115 gtk/inspector/visual.ui:169
|
||||
#: gtk/gtkfontdialogbutton.c:126 gtk/inspector/visual.ui:169
|
||||
msgid "Font"
|
||||
msgstr "შრიფტი"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:1152 gtk/gtkfontdialogbutton.c:614
|
||||
#: gtk/deprecated/gtkfontbutton.c:1152 gtk/gtkfontdialogbutton.c:652
|
||||
msgctxt "font"
|
||||
msgid "None"
|
||||
msgstr "არცერთი"
|
||||
@@ -2227,7 +2227,7 @@ msgstr "ფაილი ამ სახელით უკვე არსე
|
||||
#: gtk/gtkmessagedialog.c:179 gtk/gtkmountoperation.c:608
|
||||
#: gtk/print/gtkpagesetupunixdialog.c:282 gtk/print/gtkprintbackend.c:638
|
||||
#: gtk/print/gtkprintunixdialog.c:682 gtk/print/gtkprintunixdialog.c:839
|
||||
#: gtk/gtkwindow.c:6238 gtk/ui/gtkappchooserdialog.ui:48
|
||||
#: gtk/gtkwindow.c:6242 gtk/ui/gtkappchooserdialog.ui:48
|
||||
#: gtk/ui/gtkassistant.ui:52 gtk/ui/gtkcolorchooserdialog.ui:36
|
||||
#: gtk/ui/gtkfontchooserdialog.ui:27
|
||||
msgid "_Cancel"
|
||||
@@ -2243,7 +2243,7 @@ msgstr "გახსნა"
|
||||
msgid "_Save"
|
||||
msgstr "შენახვა"
|
||||
|
||||
#: gtk/gtkfilechoosernativequartz.c:340 gtk/ui/gtkfilechooserwidget.ui:288
|
||||
#: gtk/gtkfilechoosernativequartz.c:344 gtk/ui/gtkfilechooserwidget.ui:288
|
||||
msgid "Select which types of files are shown"
|
||||
msgstr "ფაილის ტიპების შერჩევა საჩვენებლად"
|
||||
|
||||
@@ -2315,7 +2315,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "თუ წაშლით ელემენტს, ის სამუდამოდ დაიკარგება."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1185 gtk/gtkfilechooserwidget.c:1815
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6125 gtk/gtktextview.c:9018
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6145 gtk/gtktextview.c:9018
|
||||
msgid "_Delete"
|
||||
msgstr "წაშლა"
|
||||
|
||||
@@ -2456,7 +2456,7 @@ msgstr "პროგრამა"
|
||||
msgid "Audio"
|
||||
msgstr "აუდიო"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3872 gtk/gtkfilefilter.c:1035
|
||||
#: gtk/gtkfilechooserwidget.c:3872 gtk/gtkfilefilter.c:1032
|
||||
msgid "Image"
|
||||
msgstr "გამოსახულება"
|
||||
|
||||
@@ -2566,7 +2566,7 @@ msgstr "მონიშნეთ საქაღალდეები"
|
||||
msgid "Select a Folder"
|
||||
msgstr "აირჩიეთ საქაღალდე"
|
||||
|
||||
#: gtk/gtkfilefilter.c:1048
|
||||
#: gtk/gtkfilefilter.c:1045
|
||||
msgid "Unspecified"
|
||||
msgstr "მიუთითებელი"
|
||||
|
||||
@@ -2654,31 +2654,31 @@ msgstr "დახურვა"
|
||||
msgid "Close the infobar"
|
||||
msgstr "საინფორმაციო ზოლის დახურვა"
|
||||
|
||||
#: gtk/gtklabel.c:5690 gtk/gtktext.c:6113 gtk/gtktextview.c:9006
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6133 gtk/gtktextview.c:9006
|
||||
msgid "Cu_t"
|
||||
msgstr "ამოჭრა"
|
||||
|
||||
#: gtk/gtklabel.c:5691 gtk/gtktext.c:6117 gtk/gtktextview.c:9010
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6137 gtk/gtktextview.c:9010
|
||||
msgid "_Copy"
|
||||
msgstr "ასლი"
|
||||
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6121 gtk/gtktextview.c:9014
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6141 gtk/gtktextview.c:9014
|
||||
msgid "_Paste"
|
||||
msgstr "ჩასმა"
|
||||
|
||||
#: gtk/gtklabel.c:5698 gtk/gtktext.c:6134 gtk/gtktextview.c:9039
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6154 gtk/gtktextview.c:9039
|
||||
msgid "Select _All"
|
||||
msgstr "ყველაფრის _მონიშვნა"
|
||||
|
||||
#: gtk/gtklabel.c:5703
|
||||
#: gtk/gtklabel.c:5705
|
||||
msgid "_Open Link"
|
||||
msgstr "_ბმულის გახსნა"
|
||||
|
||||
#: gtk/gtklabel.c:5707
|
||||
#: gtk/gtklabel.c:5709
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "დაა_კოპირე ბმულის მისამართი"
|
||||
|
||||
#: gtk/gtklabel.c:5751 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
#: gtk/gtklabel.c:5753 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
msgid "Context menu"
|
||||
msgstr "კონტექსტური მენიუ"
|
||||
|
||||
@@ -2749,7 +2749,7 @@ msgid "Play"
|
||||
msgstr "დაკვრა"
|
||||
|
||||
#: gtk/gtkmessagedialog.c:162 gtk/gtkmessagedialog.c:180
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6239
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6243
|
||||
msgid "_OK"
|
||||
msgstr "_დიახ"
|
||||
|
||||
@@ -3613,7 +3613,7 @@ msgctxt "accessibility"
|
||||
msgid "Sidebar"
|
||||
msgstr "გვერდითა ზოლი"
|
||||
|
||||
#: gtk/gtktext.c:6139 gtk/gtktextview.c:9044
|
||||
#: gtk/gtktext.c:6159 gtk/gtktextview.c:9044
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "ემოჯის _ჩასმა"
|
||||
|
||||
@@ -3625,12 +3625,12 @@ msgstr "_დაბრუნება"
|
||||
msgid "_Redo"
|
||||
msgstr "_გამეორება"
|
||||
|
||||
#: gtk/gtkwindow.c:6227
|
||||
#: gtk/gtkwindow.c:6231
|
||||
#, c-format
|
||||
msgid "Do you want to use GTK Inspector?"
|
||||
msgstr "გნებავთ GTK-ის ინსპექტორის გამოყენება?"
|
||||
|
||||
#: gtk/gtkwindow.c:6229
|
||||
#: gtk/gtkwindow.c:6233
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK Inspector is an interactive debugger that lets you explore and modify "
|
||||
@@ -3641,7 +3641,7 @@ msgstr ""
|
||||
"ნებისმიერი GTK აპლიკაციის შიდა პარამეტრები დაათვალიეროთ და შეცვალოთ. მისი "
|
||||
"გამოყენებით ასევე შეიძლება პროგრამა ავარიულად დასრულდეს."
|
||||
|
||||
#: gtk/gtkwindow.c:6234
|
||||
#: gtk/gtkwindow.c:6238
|
||||
msgid "Don’t show this message again"
|
||||
msgstr "მეტჯერ აღარ მაჩვენო ეს გაფრთხილება"
|
||||
|
||||
@@ -3677,7 +3677,8 @@ msgstr "როლი"
|
||||
msgid "Description"
|
||||
msgstr "აღწერა"
|
||||
|
||||
#: gtk/inspector/a11y.ui:99 gtk/inspector/misc-info.ui:297
|
||||
#: gtk/inspector/a11y.ui:99 gtk/inspector/misc-info.ui:296
|
||||
#: tools/gtk-path-tool-info.c:128
|
||||
msgid "Bounds"
|
||||
msgstr "საზღვრები"
|
||||
|
||||
@@ -3978,61 +3979,61 @@ msgstr "მოთხოვნის რეჟიმი"
|
||||
msgid "Measure map"
|
||||
msgstr "საზომი რუკა"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:254
|
||||
#: gtk/inspector/misc-info.ui:253
|
||||
msgid "Expand"
|
||||
msgstr "გაფართოება"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:322
|
||||
#: gtk/inspector/misc-info.ui:321
|
||||
msgid "Baseline"
|
||||
msgstr "საბაზისო ხაზი"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:347
|
||||
#: gtk/inspector/misc-info.ui:346
|
||||
msgid "Surface"
|
||||
msgstr "ზედაპირი"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:366 gtk/inspector/misc-info.ui:401
|
||||
#: gtk/inspector/misc-info.ui:436 gtk/inspector/prop-editor.c:1150
|
||||
#: gtk/inspector/misc-info.ui:365 gtk/inspector/misc-info.ui:400
|
||||
#: gtk/inspector/misc-info.ui:435 gtk/inspector/prop-editor.c:1150
|
||||
#: gtk/inspector/prop-editor.c:1533 gtk/inspector/window.ui:396
|
||||
msgid "Properties"
|
||||
msgstr "თვისებები"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:382
|
||||
#: gtk/inspector/misc-info.ui:381
|
||||
msgid "Renderer"
|
||||
msgstr "რენდერერი"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:417
|
||||
#: gtk/inspector/misc-info.ui:416
|
||||
msgid "Frame Clock"
|
||||
msgstr "კადრების საათი"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:452
|
||||
#: gtk/inspector/misc-info.ui:451
|
||||
msgid "Tick Callback"
|
||||
msgstr "რბილი უკუგამოძახება"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:478
|
||||
#: gtk/inspector/misc-info.ui:477
|
||||
msgid "Frame Count"
|
||||
msgstr "კადრების რაოდენობა"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:503
|
||||
#: gtk/inspector/misc-info.ui:502
|
||||
msgid "Frame Rate"
|
||||
msgstr "კადრების სიხშირე"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:528
|
||||
#: gtk/inspector/misc-info.ui:527
|
||||
msgid "Scale"
|
||||
msgstr "მასშტაბი"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:553
|
||||
#: gtk/inspector/misc-info.ui:552
|
||||
msgid "Mapped"
|
||||
msgstr "მიმაგრებულია"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:579
|
||||
#: gtk/inspector/misc-info.ui:578
|
||||
msgid "Realized"
|
||||
msgstr "რეალიზებულია"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:605
|
||||
#: gtk/inspector/misc-info.ui:604
|
||||
msgid "Is Toplevel"
|
||||
msgstr "თავშია"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:631
|
||||
#: gtk/inspector/misc-info.ui:630
|
||||
msgid "Child Visible"
|
||||
msgstr "ხილული შვილი"
|
||||
|
||||
@@ -4140,7 +4141,7 @@ msgstr "წყარო:"
|
||||
msgid "Defined At"
|
||||
msgstr "აღწერის წერტილი"
|
||||
|
||||
#: gtk/inspector/recorder.c:1865
|
||||
#: gtk/inspector/recorder.c:1922
|
||||
#, c-format
|
||||
msgid "Saving RenderNode failed"
|
||||
msgstr "RenderNode-ის შენახვის შეცდომა"
|
||||
@@ -6820,7 +6821,7 @@ msgstr "ავტომატური არჩევა"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4616
|
||||
msgctxt "printing option value"
|
||||
msgid "Printer Default"
|
||||
msgstr "ნაგულისხმევი პრინტერი"
|
||||
msgstr "ნაგულისხმები პრინტერი"
|
||||
|
||||
#. Translators: this is an option of "GhostScript"
|
||||
#: modules/printbackends/gtkprintbackendcups.c:4618
|
||||
@@ -6965,7 +6966,7 @@ msgstr "თარო %d"
|
||||
|
||||
#: modules/printbackends/gtkprintbackendcups.c:5198
|
||||
msgid "Printer Default"
|
||||
msgstr "ნაგულისხმევი პრინტერი"
|
||||
msgstr "ნაგულისხმები პრინტერი"
|
||||
|
||||
#. Translators, this string is used to label the job priority option
|
||||
#. * in the print dialog
|
||||
@@ -7183,7 +7184,8 @@ msgstr ""
|
||||
#: tools/gtk-builder-tool-enumerate.c:56 tools/gtk-builder-tool-preview.c:179
|
||||
#: tools/gtk-builder-tool-preview.c:180 tools/gtk-builder-tool-screenshot.c:360
|
||||
#: tools/gtk-builder-tool-simplify.c:2529 tools/gtk-builder-tool-validate.c:261
|
||||
#: tools/gtk-rendernode-tool-info.c:200 tools/gtk-rendernode-tool-show.c:102
|
||||
#: tools/gtk-path-tool-render.c:62 tools/gtk-rendernode-tool-info.c:208
|
||||
#: tools/gtk-rendernode-tool-show.c:102
|
||||
msgid "FILE"
|
||||
msgstr "FILE"
|
||||
|
||||
@@ -7215,8 +7217,8 @@ msgid "Use style from CSS file"
|
||||
msgstr "სტილის CSS ფაილიდან გამოყენება"
|
||||
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-show.c:109
|
||||
#: tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-rendernode-tool-show.c:109
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
msgstr "ფანჯრული სისტემის ინიციალიზაციის შეცდომა\n"
|
||||
@@ -7441,6 +7443,238 @@ msgstr "%s: ასეთი აპლიკაცია არ არსებ
|
||||
msgid "%s: error launching application: %s\n"
|
||||
msgstr "%s: აპლიკაციის გაშვების შეცდომა: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage:\n"
|
||||
" gtk4-path-tool [COMMAND] [OPTION…] PATH\n"
|
||||
"\n"
|
||||
"Perform various tasks on paths.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" decompose Decompose the path\n"
|
||||
" show Display the path in a window\n"
|
||||
" render Render the path as an image\n"
|
||||
" info Print information about the path\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Usage:\n"
|
||||
" gtk4-path-tool [ბრძანება] [პარამეტრი…] ბილიკი\n"
|
||||
"\n"
|
||||
"სხვადასხვა დავალებების შესრულება ბილიკებზე.\n"
|
||||
"\n"
|
||||
"ბრძანებები:\n"
|
||||
" decompose ბილიკის დაშლა\n"
|
||||
" show ბილიკის ფანჯარაში ჩვენება\n"
|
||||
" render ბილიკის რენდერი გამოსახულების სახით\n"
|
||||
" info ბილიკის შესახებ ინფორმაციის გამოტანა\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:75
|
||||
msgid "Allow quadratic Bézier curves"
|
||||
msgstr "კვადრატული ბეზიეს მრუდების დაშვება"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:76
|
||||
msgid "Allow cubic Bézier curves"
|
||||
msgstr "კუბური ბეზიეს მრუდების დაშვება"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:77 tools/gtk-path-tool-info.c:88
|
||||
#: tools/gtk-path-tool-render.c:63 tools/gtk-path-tool-show.c:132
|
||||
msgid "PATH"
|
||||
msgstr "ბილიკი"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:89
|
||||
msgid "Decompose a path."
|
||||
msgstr "ბილიკის დაშლა."
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:102 tools/gtk-path-tool-info.c:112
|
||||
msgid "No paths given."
|
||||
msgstr "ბილიკები მითითებული არაა."
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:128
|
||||
msgid "That didn't work out."
|
||||
msgstr "ამან არ იმუშავა."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:99
|
||||
msgid "Print information about a path."
|
||||
msgstr "ბილიკის შესახებ ინფორმაციის ჩვენება."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:119
|
||||
msgid "Path is empty."
|
||||
msgstr "ბილიკი ცარიელია."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:125
|
||||
msgid "Path is closed"
|
||||
msgstr "ბილიკი დახურულია"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:134
|
||||
#, c-format
|
||||
msgid "%d contours"
|
||||
msgstr "%d მოხაზულობა"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:136
|
||||
#, c-format
|
||||
msgid "%d operations"
|
||||
msgstr "%d ოპერაცია"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:140
|
||||
#, c-format
|
||||
msgid "%d lines"
|
||||
msgstr "%d ხაზი"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:145
|
||||
#, c-format
|
||||
msgid "%d quadratics"
|
||||
msgstr "%d კვადრატი"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:150
|
||||
#, c-format
|
||||
msgid "%d cubics"
|
||||
msgstr "%d კუბი"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-show.c:122
|
||||
msgid "Fill rule (winding, even-odd)"
|
||||
msgstr "შევსების წესი (winding, even-odd)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-render.c:56
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-render.c:58
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-render.c:60
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:122
|
||||
#: tools/gtk-path-tool-show.c:126 tools/gtk-path-tool-show.c:127
|
||||
#: tools/gtk-path-tool-show.c:128 tools/gtk-path-tool-show.c:129
|
||||
#: tools/gtk-path-tool-show.c:130 tools/gtk-path-tool-show.c:131
|
||||
msgid "VALUE"
|
||||
msgstr "მნიშვნელობა"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-show.c:123
|
||||
msgid "Foreground color"
|
||||
msgstr "წინა პლანის ფერი"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-render.c:54
|
||||
#: tools/gtk-path-tool-show.c:123 tools/gtk-path-tool-show.c:124
|
||||
msgid "COLOR"
|
||||
msgstr "ფერი"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:54 tools/gtk-path-tool-show.c:124
|
||||
msgid "Background color"
|
||||
msgstr "ფონის ფერი"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:55 tools/gtk-path-tool-show.c:125
|
||||
msgid "Stroke the path instead of filling it"
|
||||
msgstr "ბილიკის შემოვლება მისი შევსების მაგიერ"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:56 tools/gtk-path-tool-show.c:126
|
||||
msgid "Line width (number)"
|
||||
msgstr "ხაზის სიგანე (რიცხვი)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-show.c:127
|
||||
msgid "Line cap (butt, round, square)"
|
||||
msgstr "ხაზის თავი (ისარი, მრგვალი, კვადრატი)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:58 tools/gtk-path-tool-show.c:128
|
||||
msgid "Line join (miter, miter-clip, round, bevel, arcs)"
|
||||
msgstr "ხაზების შეერთება (miter, miter-clip, round, bevel, arcs)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-show.c:129
|
||||
msgid "Miter limit (number)"
|
||||
msgstr "Miter-ის ლიმიტი (რიცხვი)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:60 tools/gtk-path-tool-show.c:130
|
||||
msgid "Dash pattern (comma-separated numbers)"
|
||||
msgstr "პუნქტირის ნიმუში (მძიმით გამოყოფილი რიცხვები)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:131
|
||||
msgid "Dash offset (number)"
|
||||
msgstr "პუნქტირის წანაცვლება (რიცხვი)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:62
|
||||
msgid "The output file"
|
||||
msgstr "გამოტანის ფაილი"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:81 tools/gtk-path-tool-show.c:145
|
||||
msgid "Could not initialize windowing system"
|
||||
msgstr "ფანჯრული სისტემის ინიციალიზაციის შეცდომა"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:89
|
||||
msgid "Render the path to a png image."
|
||||
msgstr "ბილიკის რენდერი png გამოსახულებაში."
|
||||
|
||||
#: tools/gtk-path-tool-render.c:102 tools/gtk-path-tool-show.c:166
|
||||
msgid "No path specified"
|
||||
msgstr "ბილიკი მითითებული არაა"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:108
|
||||
msgid "Can only render a single path"
|
||||
msgstr "შესაძლებელია მხოლოდ ერთ ბილიკის რენდერი"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:114 tools/gtk-path-tool-show.c:178
|
||||
msgid "fill rule"
|
||||
msgstr "შევსების წესი"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:118 tools/gtk-path-tool-show.c:182
|
||||
msgid "line cap"
|
||||
msgstr "ხაზის თავი"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:119 tools/gtk-path-tool-show.c:183
|
||||
msgid "line join"
|
||||
msgstr "ხაზების შეერთება"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:143 tools/gtk-path-tool-show.c:207
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as number"
|
||||
msgstr "'%s'-ის რიცხვის სახით წაკითხვა შეუძლებელია"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:187
|
||||
#, c-format
|
||||
msgid "Saving png to '%s' failed"
|
||||
msgstr "PNG-ის '%s'-ში შენახვა შეუძლებელია"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:194
|
||||
#, c-format
|
||||
msgid "Output written to '%s'."
|
||||
msgstr "გამოტანილი ინფორმაცია ჩაწერილია %s-ში."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:43 tools/gtk-path-tool-show.c:78
|
||||
msgid "Path Preview"
|
||||
msgstr "ბილიკის მინიატურა"
|
||||
|
||||
#: tools/gtk-path-tool-show.c:153
|
||||
msgid "Display the path."
|
||||
msgstr "ბილიკის ჩვენება."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:172
|
||||
msgid "Can only show a single path"
|
||||
msgstr "შესაძლებელია მხოლოდ ერთი ბილიკის ჩვენება"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:58
|
||||
#, c-format
|
||||
msgid "Failed to read from standard input: %s\n"
|
||||
msgstr "სტანდარტული შეყვანიდან წაკითხვა ჩავარდა: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:64
|
||||
#, c-format
|
||||
msgid "Error reading from standard input: %s\n"
|
||||
msgstr "სტანდარტული შეყვანიდან წაკითხვის შეცდომა: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:83
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as path.\n"
|
||||
msgstr "'%s'-ის ბილიკად დამუშავება შეუძლებელია.\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:109
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as %s."
|
||||
msgstr "'%s'-ის '%s'-ად დამუშავება შეუძლებელია."
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:111
|
||||
msgid "Possible values: "
|
||||
msgstr "შესაძლო მნიშვნელობები: "
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:135
|
||||
#, c-format
|
||||
msgid "Could not parse '%s' as color"
|
||||
msgstr "'%s'-ის ფერის სახით დამუშავება შეუძლებელია"
|
||||
|
||||
#: tools/gtk-rendernode-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7466,50 +7700,41 @@ msgstr ""
|
||||
" render კვანძის ეკრანის ანაბეჭდის აღება\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:177
|
||||
#: tools/gtk-rendernode-tool-info.c:185
|
||||
#, c-format
|
||||
msgid "Number of nodes: %u\n"
|
||||
msgstr "კვანძების რიცხვი: %u\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:184
|
||||
#: tools/gtk-rendernode-tool-info.c:192
|
||||
#, c-format
|
||||
msgid "Depth: %u\n"
|
||||
msgstr "სიღრმე: %u\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:187
|
||||
#: tools/gtk-rendernode-tool-info.c:195
|
||||
#, c-format
|
||||
msgid "Bounds: %g x %g\n"
|
||||
msgstr "საზღვრები: %g x %g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:188
|
||||
#: tools/gtk-rendernode-tool-info.c:196
|
||||
#, c-format
|
||||
msgid "Origin: %g %g\n"
|
||||
msgstr "საწყისი: %g %g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:209
|
||||
#: tools/gtk-rendernode-tool-info.c:217
|
||||
msgid "Provide information about the render node."
|
||||
msgstr "შეიყვანეთ ინფორმაცია რენდერის კვანძის შესახებ."
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:222 tools/gtk-rendernode-tool-show.c:130
|
||||
#: tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-info.c:230 tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-show.c:130
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
msgstr ".ui ფაილი მითითებული არაა\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:228
|
||||
#: tools/gtk-rendernode-tool-info.c:236
|
||||
#, c-format
|
||||
msgid "Can only accept a single .node file\n"
|
||||
msgstr "შეგიძლიათ მხოლოდ ერთი .node ფაილის მიღება\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "რენდერის კვანძის ჩვენება."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "შეგიძლიათ მხოლოდ ერთი .node ფაილის გადახედვა\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:123
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7542,6 +7767,15 @@ msgstr ".ui ფაილის რენდერი გამოსახულ
|
||||
msgid "Can only render a single .node file to a single output file\n"
|
||||
msgstr "ერთი .node ფაილის მხოლოდ ერთ გამოტანის ფაილში რენდერი შეგიძლიათ\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "რენდერის კვანძის ჩვენება."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "შეგიძლიათ მხოლოდ ერთი .node ფაილის გადახედვა\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:51
|
||||
#, c-format
|
||||
msgid "Error at %s: %s\n"
|
||||
@@ -8475,9 +8709,6 @@ msgstr ""
|
||||
#~ msgid "Num Lock is on"
|
||||
#~ msgstr "_მისამართის ასლი"
|
||||
|
||||
#~ msgid "Could not add a bookmark"
|
||||
#~ msgstr "სანიშნის დამატება ვერ ხერხდება"
|
||||
|
||||
#~ msgid "Could not remove bookmark"
|
||||
#~ msgstr "სანიშნის ამოშლა ვერ ხერხდება"
|
||||
|
||||
@@ -8878,9 +9109,6 @@ msgstr ""
|
||||
#~ msgid "Could not get information for file '%s': %s"
|
||||
#~ msgstr "ვერ მივიღე ინფორმაცია ფაილზე \"%s\": %s"
|
||||
|
||||
#~ msgid "Failed to open file '%s': %s"
|
||||
#~ msgstr "ვერ გაიხსნა ფაილი \"%s\": %s"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Failed to load image '%s': reason not known, probably a corrupt image file"
|
||||
#~ msgstr ""
|
||||
@@ -8933,9 +9161,6 @@ msgstr ""
|
||||
#~ msgid "Failed to open temporary file"
|
||||
#~ msgstr "დროებითი ფაილი ვერ იხსნება"
|
||||
|
||||
#~ msgid "Failed to read from temporary file"
|
||||
#~ msgstr "დროებითი ფაილი ვერ იკითხება"
|
||||
|
||||
#~ msgid "Failed to open '%s' for writing: %s"
|
||||
#~ msgstr "ვერ იხსნება ფაილი \"%s\" ჩასაწერად: %s"
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2023-08-05 15:54+0000\n"
|
||||
"PO-Revision-Date: 2023-08-06 14:20+0200\n"
|
||||
"POT-Creation-Date: 2023-08-19 01:57+0000\n"
|
||||
"PO-Revision-Date: 2023-08-19 17:17+0200\n"
|
||||
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
|
||||
"Language-Team: Polish <community-poland@mozilla.org>\n"
|
||||
"Language: pl\n"
|
||||
@@ -141,7 +141,7 @@ msgstr "Program nie obsługuje API %s"
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:1863
|
||||
#: gdk/gdkglcontext.c:1864
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "Próbowanie użycia %s, ale %s jest już używane"
|
||||
@@ -1073,13 +1073,13 @@ msgid "Pick a Color"
|
||||
msgstr "Wybór koloru"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:502 gtk/gtkcolorchooserwidget.c:313
|
||||
#: gtk/gtkcolordialogbutton.c:302
|
||||
#: gtk/gtkcolordialogbutton.c:335
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%, Alpha %d%%"
|
||||
msgstr "Czerwony %d%%, zielony %d%%, niebieski %d%%, alfa %d%%"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:508 gtk/gtkcolorchooserwidget.c:319
|
||||
#: gtk/gtkcolordialogbutton.c:308
|
||||
#: gtk/gtkcolordialogbutton.c:341
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%"
|
||||
msgstr "Czerwony %d%%, zielony %d%%, niebieski %d%%"
|
||||
@@ -1094,11 +1094,11 @@ msgid "Pick a Font"
|
||||
msgstr "Wybór czcionki"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:597 gtk/gtkfilechooserwidget.c:3871
|
||||
#: gtk/gtkfontdialogbutton.c:115 gtk/inspector/visual.ui:169
|
||||
#: gtk/gtkfontdialogbutton.c:126 gtk/inspector/visual.ui:169
|
||||
msgid "Font"
|
||||
msgstr "Czcionka"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:1152 gtk/gtkfontdialogbutton.c:614
|
||||
#: gtk/deprecated/gtkfontbutton.c:1152 gtk/gtkfontdialogbutton.c:652
|
||||
msgctxt "font"
|
||||
msgid "None"
|
||||
msgstr "Brak"
|
||||
@@ -2249,7 +2249,7 @@ msgstr "_Otwórz"
|
||||
msgid "_Save"
|
||||
msgstr "_Zapisz"
|
||||
|
||||
#: gtk/gtkfilechoosernativequartz.c:340 gtk/ui/gtkfilechooserwidget.ui:288
|
||||
#: gtk/gtkfilechoosernativequartz.c:344 gtk/ui/gtkfilechooserwidget.ui:288
|
||||
msgid "Select which types of files are shown"
|
||||
msgstr "Wybór typów wyświetlanych plików"
|
||||
|
||||
@@ -2322,7 +2322,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "Jeśli element zostanie usunięty, to zostanie on bezpowrotnie utracony."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1185 gtk/gtkfilechooserwidget.c:1815
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6125 gtk/gtktextview.c:9018
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6145 gtk/gtktextview.c:9018
|
||||
msgid "_Delete"
|
||||
msgstr "_Usuń"
|
||||
|
||||
@@ -2463,7 +2463,7 @@ msgstr "Program"
|
||||
msgid "Audio"
|
||||
msgstr "Dźwięk"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3872 gtk/gtkfilefilter.c:1035
|
||||
#: gtk/gtkfilechooserwidget.c:3872 gtk/gtkfilefilter.c:1032
|
||||
msgid "Image"
|
||||
msgstr "Obraz"
|
||||
|
||||
@@ -2574,7 +2574,7 @@ msgstr "Wybór katalogów"
|
||||
msgid "Select a Folder"
|
||||
msgstr "Wybór katalogu"
|
||||
|
||||
#: gtk/gtkfilefilter.c:1048
|
||||
#: gtk/gtkfilefilter.c:1045
|
||||
msgid "Unspecified"
|
||||
msgstr "Nieokreślone"
|
||||
|
||||
@@ -2662,19 +2662,19 @@ msgstr "Zamknij"
|
||||
msgid "Close the infobar"
|
||||
msgstr "Zamknij pasek informacyjny"
|
||||
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6113 gtk/gtktextview.c:9006
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6133 gtk/gtktextview.c:9006
|
||||
msgid "Cu_t"
|
||||
msgstr "_Wytnij"
|
||||
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6117 gtk/gtktextview.c:9010
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6137 gtk/gtktextview.c:9010
|
||||
msgid "_Copy"
|
||||
msgstr "S_kopiuj"
|
||||
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6121 gtk/gtktextview.c:9014
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6141 gtk/gtktextview.c:9014
|
||||
msgid "_Paste"
|
||||
msgstr "Wk_lej"
|
||||
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6134 gtk/gtktextview.c:9039
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6154 gtk/gtktextview.c:9039
|
||||
msgid "Select _All"
|
||||
msgstr "Z_aznacz wszystko"
|
||||
|
||||
@@ -3626,7 +3626,7 @@ msgctxt "accessibility"
|
||||
msgid "Sidebar"
|
||||
msgstr "Panel boczny"
|
||||
|
||||
#: gtk/gtktext.c:6139 gtk/gtktextview.c:9044
|
||||
#: gtk/gtktext.c:6159 gtk/gtktextview.c:9044
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "Wstaw _emoji"
|
||||
|
||||
@@ -3691,6 +3691,7 @@ msgid "Description"
|
||||
msgstr "Opis"
|
||||
|
||||
#: gtk/inspector/a11y.ui:99 gtk/inspector/misc-info.ui:296
|
||||
#: tools/gtk-path-tool-info.c:128
|
||||
msgid "Bounds"
|
||||
msgstr "Granice"
|
||||
|
||||
@@ -4154,7 +4155,7 @@ msgstr "Źródło:"
|
||||
msgid "Defined At"
|
||||
msgstr "Określone w"
|
||||
|
||||
#: gtk/inspector/recorder.c:1865
|
||||
#: gtk/inspector/recorder.c:1922
|
||||
#, c-format
|
||||
msgid "Saving RenderNode failed"
|
||||
msgstr "Zapisanie węzła rysowania się nie powiodło"
|
||||
@@ -7199,7 +7200,8 @@ msgstr ""
|
||||
#: tools/gtk-builder-tool-enumerate.c:56 tools/gtk-builder-tool-preview.c:179
|
||||
#: tools/gtk-builder-tool-preview.c:180 tools/gtk-builder-tool-screenshot.c:360
|
||||
#: tools/gtk-builder-tool-simplify.c:2529 tools/gtk-builder-tool-validate.c:261
|
||||
#: tools/gtk-rendernode-tool-info.c:200 tools/gtk-rendernode-tool-show.c:102
|
||||
#: tools/gtk-path-tool-render.c:62 tools/gtk-rendernode-tool-info.c:208
|
||||
#: tools/gtk-rendernode-tool-show.c:102
|
||||
msgid "FILE"
|
||||
msgstr "PLIK"
|
||||
|
||||
@@ -7231,8 +7233,8 @@ msgid "Use style from CSS file"
|
||||
msgstr "Używa stylu z pliku CSS"
|
||||
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-show.c:109
|
||||
#: tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-rendernode-tool-show.c:109
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
msgstr "Nie można zainicjować systemu okien\n"
|
||||
@@ -7459,6 +7461,238 @@ msgstr "%s: program „%s” nie istnieje"
|
||||
msgid "%s: error launching application: %s\n"
|
||||
msgstr "%s: błąd podczas uruchamiania programu: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage:\n"
|
||||
" gtk4-path-tool [COMMAND] [OPTION…] PATH\n"
|
||||
"\n"
|
||||
"Perform various tasks on paths.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" decompose Decompose the path\n"
|
||||
" show Display the path in a window\n"
|
||||
" render Render the path as an image\n"
|
||||
" info Print information about the path\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Użycie:\n"
|
||||
" gtk4-path-tool [POLECENIE] [OPCJA…] ŚCIEŻKA\n"
|
||||
"\n"
|
||||
"Wykonuje różne zadania na ścieżkach.\n"
|
||||
"\n"
|
||||
"Polecenia:\n"
|
||||
" decompose Rozkłada ścieżkę\n"
|
||||
" show Wyświetla ścieżkę w oknie\n"
|
||||
" render Rysuje ścieżkę jako obraz\n"
|
||||
" info Wyświetla informacje o ścieżce\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:75
|
||||
msgid "Allow quadratic Bézier curves"
|
||||
msgstr "Zezwala na kwadratowe krzywe Béziera"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:76
|
||||
msgid "Allow cubic Bézier curves"
|
||||
msgstr "Zezwala na sześcienne krzywe Béziera"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:77 tools/gtk-path-tool-info.c:88
|
||||
#: tools/gtk-path-tool-render.c:63 tools/gtk-path-tool-show.c:132
|
||||
msgid "PATH"
|
||||
msgstr "ŚCIEŻKA"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:89
|
||||
msgid "Decompose a path."
|
||||
msgstr "Rozkłada ścieżkę."
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:102 tools/gtk-path-tool-info.c:112
|
||||
msgid "No paths given."
|
||||
msgstr "Nie podano ścieżek."
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:128
|
||||
msgid "That didn't work out."
|
||||
msgstr "To nie zadziałało."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:99
|
||||
msgid "Print information about a path."
|
||||
msgstr "Wyświetla informacje o ścieżce."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:119
|
||||
msgid "Path is empty."
|
||||
msgstr "Ścieżka jest pusta."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:125
|
||||
msgid "Path is closed"
|
||||
msgstr "Ścieżka jest zamknięta"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:134
|
||||
#, c-format
|
||||
msgid "%d contours"
|
||||
msgstr "Obrysy: %d"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:136
|
||||
#, c-format
|
||||
msgid "%d operations"
|
||||
msgstr "Działania: %d"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:140
|
||||
#, c-format
|
||||
msgid "%d lines"
|
||||
msgstr "Linie: %d"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:145
|
||||
#, c-format
|
||||
msgid "%d quadratics"
|
||||
msgstr "Równania kwadratowe: %d"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:150
|
||||
#, c-format
|
||||
msgid "%d cubics"
|
||||
msgstr "Równania sześcienne: %d"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-show.c:122
|
||||
msgid "Fill rule (winding, even-odd)"
|
||||
msgstr "Reguła wypełniania (kręcona, parzysta-nieparzysta)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-render.c:56
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-render.c:58
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-render.c:60
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:122
|
||||
#: tools/gtk-path-tool-show.c:126 tools/gtk-path-tool-show.c:127
|
||||
#: tools/gtk-path-tool-show.c:128 tools/gtk-path-tool-show.c:129
|
||||
#: tools/gtk-path-tool-show.c:130 tools/gtk-path-tool-show.c:131
|
||||
msgid "VALUE"
|
||||
msgstr "WARTOŚĆ"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-show.c:123
|
||||
msgid "Foreground color"
|
||||
msgstr "Kolor pierwszego planu"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-render.c:54
|
||||
#: tools/gtk-path-tool-show.c:123 tools/gtk-path-tool-show.c:124
|
||||
msgid "COLOR"
|
||||
msgstr "KOLOR"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:54 tools/gtk-path-tool-show.c:124
|
||||
msgid "Background color"
|
||||
msgstr "Kolor tła"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:55 tools/gtk-path-tool-show.c:125
|
||||
msgid "Stroke the path instead of filling it"
|
||||
msgstr "Pociąga ścieżkę zamiast ją wypełniać"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:56 tools/gtk-path-tool-show.c:126
|
||||
msgid "Line width (number)"
|
||||
msgstr "Szerokość linii (liczba)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-show.c:127
|
||||
msgid "Line cap (butt, round, square)"
|
||||
msgstr "Koniec linii (grubszy koniec, okrągły, kwadratowy)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:58 tools/gtk-path-tool-show.c:128
|
||||
msgid "Line join (miter, miter-clip, round, bevel, arcs)"
|
||||
msgstr "Złącze linii (kątowe, kątowe przycięte, okrągłe, skośne, łuki)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-show.c:129
|
||||
msgid "Miter limit (number)"
|
||||
msgstr "Ograniczenie kątowych (liczba)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:60 tools/gtk-path-tool-show.c:130
|
||||
msgid "Dash pattern (comma-separated numbers)"
|
||||
msgstr "Wzór kresek (liczby oddzielone przecinkami)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:131
|
||||
msgid "Dash offset (number)"
|
||||
msgstr "Wyrównanie kresek (liczba)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:62
|
||||
msgid "The output file"
|
||||
msgstr "Plik wyjściowy"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:81 tools/gtk-path-tool-show.c:145
|
||||
msgid "Could not initialize windowing system"
|
||||
msgstr "Nie można zainicjować systemu okien"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:89
|
||||
msgid "Render the path to a png image."
|
||||
msgstr "Rysuje ścieżkę do obrazu PNG."
|
||||
|
||||
#: tools/gtk-path-tool-render.c:102 tools/gtk-path-tool-show.c:166
|
||||
msgid "No path specified"
|
||||
msgstr "Nie podano ścieżki"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:108
|
||||
msgid "Can only render a single path"
|
||||
msgstr "Można narysować tylko jedną ścieżkę"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:114 tools/gtk-path-tool-show.c:178
|
||||
msgid "fill rule"
|
||||
msgstr "reguła wypełniania"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:118 tools/gtk-path-tool-show.c:182
|
||||
msgid "line cap"
|
||||
msgstr "koniec linii"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:119 tools/gtk-path-tool-show.c:183
|
||||
msgid "line join"
|
||||
msgstr "złącze linii"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:143 tools/gtk-path-tool-show.c:207
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as number"
|
||||
msgstr "Przetworzenie „%s” jako liczby się nie powiodło"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:187
|
||||
#, c-format
|
||||
msgid "Saving png to '%s' failed"
|
||||
msgstr "Zapisanie obrazu PNG do „%s” się nie powiodło"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:194
|
||||
#, c-format
|
||||
msgid "Output written to '%s'."
|
||||
msgstr "Wyjście zapisano do „%s”."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:43 tools/gtk-path-tool-show.c:78
|
||||
msgid "Path Preview"
|
||||
msgstr "Podgląd ścieżki"
|
||||
|
||||
#: tools/gtk-path-tool-show.c:153
|
||||
msgid "Display the path."
|
||||
msgstr "Wyświetla ścieżkę."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:172
|
||||
msgid "Can only show a single path"
|
||||
msgstr "Można wyświetlić tylko jedną ścieżkę"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:58
|
||||
#, c-format
|
||||
msgid "Failed to read from standard input: %s\n"
|
||||
msgstr "Odczytanie ze standardowego wejścia się nie powiodło: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:64
|
||||
#, c-format
|
||||
msgid "Error reading from standard input: %s\n"
|
||||
msgstr "Błąd podczas odczytywania ze standardowego wejścia: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:83
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as path.\n"
|
||||
msgstr "Przetworzenie „%s” jako ścieżki się nie powiodło.\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:109
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as %s."
|
||||
msgstr "Przetworzenie „%s” jako %s się nie powiodło."
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:111
|
||||
msgid "Possible values: "
|
||||
msgstr "Możliwe wartości: "
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:135
|
||||
#, c-format
|
||||
msgid "Could not parse '%s' as color"
|
||||
msgstr "Nie można przetworzyć „%s” jako kolor"
|
||||
|
||||
#: tools/gtk-rendernode-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7484,50 +7718,41 @@ msgstr ""
|
||||
" render Wykonuje zrzut ekranu węzła\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:177
|
||||
#: tools/gtk-rendernode-tool-info.c:185
|
||||
#, c-format
|
||||
msgid "Number of nodes: %u\n"
|
||||
msgstr "Liczba węzłów: %u\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:184
|
||||
#: tools/gtk-rendernode-tool-info.c:192
|
||||
#, c-format
|
||||
msgid "Depth: %u\n"
|
||||
msgstr "Głębokość: %u\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:187
|
||||
#: tools/gtk-rendernode-tool-info.c:195
|
||||
#, c-format
|
||||
msgid "Bounds: %g x %g\n"
|
||||
msgstr "Granice: %g×%g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:188
|
||||
#: tools/gtk-rendernode-tool-info.c:196
|
||||
#, c-format
|
||||
msgid "Origin: %g %g\n"
|
||||
msgstr "Punkt początkowy: %g %g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:209
|
||||
#: tools/gtk-rendernode-tool-info.c:217
|
||||
msgid "Provide information about the render node."
|
||||
msgstr "Podaje informacje o węźle rysowania."
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:222 tools/gtk-rendernode-tool-show.c:130
|
||||
#: tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-info.c:230 tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-show.c:130
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
msgstr "Nie podano pliku .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:228
|
||||
#: tools/gtk-rendernode-tool-info.c:236
|
||||
#, c-format
|
||||
msgid "Can only accept a single .node file\n"
|
||||
msgstr "Może przyjąć tylko jeden plik .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "Wyświetla węzeł rysowania."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "Można wyświetlić podgląd tylko jednego pliku .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:123
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7559,6 +7784,15 @@ msgstr "Rysuje plik .node do obrazu."
|
||||
msgid "Can only render a single .node file to a single output file\n"
|
||||
msgstr "Można narysować tylko jeden plik .node do jednego pliku wyjściowego\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "Wyświetla węzeł rysowania."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "Można wyświetlić podgląd tylko jednego pliku .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:51
|
||||
#, c-format
|
||||
msgid "Error at %s: %s\n"
|
||||
|
||||
@@ -9,8 +9,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2023-07-31 15:14+0000\n"
|
||||
"PO-Revision-Date: 2023-08-04 22:43+0300\n"
|
||||
"POT-Creation-Date: 2023-08-15 19:28+0000\n"
|
||||
"PO-Revision-Date: 2023-08-16 14:37+0300\n"
|
||||
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
|
||||
"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
|
||||
"Language: uk\n"
|
||||
@@ -139,7 +139,7 @@ msgstr "У програмі не передбачено підтримки пр
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:1863
|
||||
#: gdk/gdkglcontext.c:1864
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "Намагаємося скористатися %s, але %s вже використано"
|
||||
@@ -1077,13 +1077,13 @@ msgid "Pick a Color"
|
||||
msgstr "Вибір кольору"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:502 gtk/gtkcolorchooserwidget.c:313
|
||||
#: gtk/gtkcolordialogbutton.c:302
|
||||
#: gtk/gtkcolordialogbutton.c:335
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%, Alpha %d%%"
|
||||
msgstr "Червоний %d%%, Зелений %d%%, Синій %d%%, Альфа %d%%"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:508 gtk/gtkcolorchooserwidget.c:319
|
||||
#: gtk/gtkcolordialogbutton.c:308
|
||||
#: gtk/gtkcolordialogbutton.c:341
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%"
|
||||
msgstr "Червоний %d%%, Зелений %d%%, Синій %d%%"
|
||||
@@ -1098,11 +1098,11 @@ msgid "Pick a Font"
|
||||
msgstr "Виберіть шрифт"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:597 gtk/gtkfilechooserwidget.c:3871
|
||||
#: gtk/gtkfontdialogbutton.c:115 gtk/inspector/visual.ui:169
|
||||
#: gtk/gtkfontdialogbutton.c:126 gtk/inspector/visual.ui:169
|
||||
msgid "Font"
|
||||
msgstr "Шрифт"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:1152 gtk/gtkfontdialogbutton.c:614
|
||||
#: gtk/deprecated/gtkfontbutton.c:1152 gtk/gtkfontdialogbutton.c:652
|
||||
msgctxt "font"
|
||||
msgid "None"
|
||||
msgstr "Немає"
|
||||
@@ -2238,7 +2238,7 @@ msgstr "Файл з такою назвою вже існує"
|
||||
#: gtk/gtkmessagedialog.c:179 gtk/gtkmountoperation.c:608
|
||||
#: gtk/print/gtkpagesetupunixdialog.c:282 gtk/print/gtkprintbackend.c:638
|
||||
#: gtk/print/gtkprintunixdialog.c:682 gtk/print/gtkprintunixdialog.c:839
|
||||
#: gtk/gtkwindow.c:6238 gtk/ui/gtkappchooserdialog.ui:48
|
||||
#: gtk/gtkwindow.c:6242 gtk/ui/gtkappchooserdialog.ui:48
|
||||
#: gtk/ui/gtkassistant.ui:52 gtk/ui/gtkcolorchooserdialog.ui:36
|
||||
#: gtk/ui/gtkfontchooserdialog.ui:27
|
||||
msgid "_Cancel"
|
||||
@@ -2254,7 +2254,7 @@ msgstr "_Відкрити"
|
||||
msgid "_Save"
|
||||
msgstr "З_берегти"
|
||||
|
||||
#: gtk/gtkfilechoosernativequartz.c:340 gtk/ui/gtkfilechooserwidget.ui:288
|
||||
#: gtk/gtkfilechoosernativequartz.c:344 gtk/ui/gtkfilechooserwidget.ui:288
|
||||
msgid "Select which types of files are shown"
|
||||
msgstr "Виберіть типи файлів, які слід показувати"
|
||||
|
||||
@@ -2326,7 +2326,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "Якщо вилучити об'єкт, його буде втрачено назавжди."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1185 gtk/gtkfilechooserwidget.c:1815
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6125 gtk/gtktextview.c:9018
|
||||
#: gtk/gtklabel.c:5695 gtk/gtktext.c:6145 gtk/gtktextview.c:9018
|
||||
msgid "_Delete"
|
||||
msgstr "В_илучити"
|
||||
|
||||
@@ -2467,7 +2467,7 @@ msgstr "Програма"
|
||||
msgid "Audio"
|
||||
msgstr "Звук"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3872 gtk/gtkfilefilter.c:1035
|
||||
#: gtk/gtkfilechooserwidget.c:3872 gtk/gtkfilefilter.c:1032
|
||||
msgid "Image"
|
||||
msgstr "Картинка"
|
||||
|
||||
@@ -2576,7 +2576,7 @@ msgstr "Вибір тек"
|
||||
msgid "Select a Folder"
|
||||
msgstr "Вибір теки"
|
||||
|
||||
#: gtk/gtkfilefilter.c:1048
|
||||
#: gtk/gtkfilefilter.c:1045
|
||||
msgid "Unspecified"
|
||||
msgstr "Не визначено"
|
||||
|
||||
@@ -2664,31 +2664,31 @@ msgstr "Закрити"
|
||||
msgid "Close the infobar"
|
||||
msgstr "Закрити панель відомостей"
|
||||
|
||||
#: gtk/gtklabel.c:5690 gtk/gtktext.c:6113 gtk/gtktextview.c:9006
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6133 gtk/gtktextview.c:9006
|
||||
msgid "Cu_t"
|
||||
msgstr "Ви_різати"
|
||||
|
||||
#: gtk/gtklabel.c:5691 gtk/gtktext.c:6117 gtk/gtktextview.c:9010
|
||||
#: gtk/gtklabel.c:5693 gtk/gtktext.c:6137 gtk/gtktextview.c:9010
|
||||
msgid "_Copy"
|
||||
msgstr "_Копіювати"
|
||||
|
||||
#: gtk/gtklabel.c:5692 gtk/gtktext.c:6121 gtk/gtktextview.c:9014
|
||||
#: gtk/gtklabel.c:5694 gtk/gtktext.c:6141 gtk/gtktextview.c:9014
|
||||
msgid "_Paste"
|
||||
msgstr "Вст_авити"
|
||||
|
||||
#: gtk/gtklabel.c:5698 gtk/gtktext.c:6134 gtk/gtktextview.c:9039
|
||||
#: gtk/gtklabel.c:5700 gtk/gtktext.c:6154 gtk/gtktextview.c:9039
|
||||
msgid "Select _All"
|
||||
msgstr "Виді_лити все"
|
||||
|
||||
#: gtk/gtklabel.c:5703
|
||||
#: gtk/gtklabel.c:5705
|
||||
msgid "_Open Link"
|
||||
msgstr "_Відкрити посилання"
|
||||
|
||||
#: gtk/gtklabel.c:5707
|
||||
#: gtk/gtklabel.c:5709
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "Копіювати _адресу посилання"
|
||||
|
||||
#: gtk/gtklabel.c:5751 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
#: gtk/gtklabel.c:5753 gtk/gtktext.c:2716 gtk/gtktextview.c:9088
|
||||
msgid "Context menu"
|
||||
msgstr "Контекстне меню"
|
||||
|
||||
@@ -2759,7 +2759,7 @@ msgid "Play"
|
||||
msgstr "Пуск"
|
||||
|
||||
#: gtk/gtkmessagedialog.c:162 gtk/gtkmessagedialog.c:180
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6239
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6243
|
||||
msgid "_OK"
|
||||
msgstr "_Гаразд"
|
||||
|
||||
@@ -3628,7 +3628,7 @@ msgctxt "accessibility"
|
||||
msgid "Sidebar"
|
||||
msgstr "Бічна панель"
|
||||
|
||||
#: gtk/gtktext.c:6139 gtk/gtktextview.c:9044
|
||||
#: gtk/gtktext.c:6159 gtk/gtktextview.c:9044
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "Вставити _емодзі"
|
||||
|
||||
@@ -3640,12 +3640,12 @@ msgstr "_Скасувати"
|
||||
msgid "_Redo"
|
||||
msgstr "Пов_торити"
|
||||
|
||||
#: gtk/gtkwindow.c:6227
|
||||
#: gtk/gtkwindow.c:6231
|
||||
#, c-format
|
||||
msgid "Do you want to use GTK Inspector?"
|
||||
msgstr "Бажаєте використовувати інспектор GTK?"
|
||||
|
||||
#: gtk/gtkwindow.c:6229
|
||||
#: gtk/gtkwindow.c:6233
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK Inspector is an interactive debugger that lets you explore and modify "
|
||||
@@ -3656,7 +3656,7 @@ msgstr ""
|
||||
"редагувати внутрішні частини будь-які програми GTK. Його використання може "
|
||||
"спричинити збої в програмі."
|
||||
|
||||
#: gtk/gtkwindow.c:6234
|
||||
#: gtk/gtkwindow.c:6238
|
||||
msgid "Don’t show this message again"
|
||||
msgstr "Не показувати це повідомлення надалі"
|
||||
|
||||
@@ -3692,7 +3692,8 @@ msgstr "Роль"
|
||||
msgid "Description"
|
||||
msgstr "Опис"
|
||||
|
||||
#: gtk/inspector/a11y.ui:99 gtk/inspector/misc-info.ui:297
|
||||
#: gtk/inspector/a11y.ui:99 gtk/inspector/misc-info.ui:296
|
||||
#: tools/gtk-path-tool-info.c:128
|
||||
msgid "Bounds"
|
||||
msgstr "Межі"
|
||||
|
||||
@@ -3992,61 +3993,61 @@ msgstr "Режим запиту"
|
||||
msgid "Measure map"
|
||||
msgstr "Мапа вимірювання"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:254
|
||||
#: gtk/inspector/misc-info.ui:253
|
||||
msgid "Expand"
|
||||
msgstr "Розгорнути"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:322
|
||||
#: gtk/inspector/misc-info.ui:321
|
||||
msgid "Baseline"
|
||||
msgstr "Базова лінія"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:347
|
||||
#: gtk/inspector/misc-info.ui:346
|
||||
msgid "Surface"
|
||||
msgstr "Поверхня"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:366 gtk/inspector/misc-info.ui:401
|
||||
#: gtk/inspector/misc-info.ui:436 gtk/inspector/prop-editor.c:1150
|
||||
#: gtk/inspector/misc-info.ui:365 gtk/inspector/misc-info.ui:400
|
||||
#: gtk/inspector/misc-info.ui:435 gtk/inspector/prop-editor.c:1150
|
||||
#: gtk/inspector/prop-editor.c:1533 gtk/inspector/window.ui:396
|
||||
msgid "Properties"
|
||||
msgstr "Властивості"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:382
|
||||
#: gtk/inspector/misc-info.ui:381
|
||||
msgid "Renderer"
|
||||
msgstr "Відтворювач"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:417
|
||||
#: gtk/inspector/misc-info.ui:416
|
||||
msgid "Frame Clock"
|
||||
msgstr "Годинник кадрів"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:452
|
||||
#: gtk/inspector/misc-info.ui:451
|
||||
msgid "Tick Callback"
|
||||
msgstr "Позначити зворотний виклик"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:478
|
||||
#: gtk/inspector/misc-info.ui:477
|
||||
msgid "Frame Count"
|
||||
msgstr "Підрахунок кадрів"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:503
|
||||
#: gtk/inspector/misc-info.ui:502
|
||||
msgid "Frame Rate"
|
||||
msgstr "Частота кадрів"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:528
|
||||
#: gtk/inspector/misc-info.ui:527
|
||||
msgid "Scale"
|
||||
msgstr "Масштаб"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:553
|
||||
#: gtk/inspector/misc-info.ui:552
|
||||
msgid "Mapped"
|
||||
msgstr "Відображення"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:579
|
||||
#: gtk/inspector/misc-info.ui:578
|
||||
msgid "Realized"
|
||||
msgstr "Спостереження"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:605
|
||||
#: gtk/inspector/misc-info.ui:604
|
||||
msgid "Is Toplevel"
|
||||
msgstr "На верхньому рівні"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:631
|
||||
#: gtk/inspector/misc-info.ui:630
|
||||
msgid "Child Visible"
|
||||
msgstr "Видимі діти"
|
||||
|
||||
@@ -4154,7 +4155,7 @@ msgstr "Джерело:"
|
||||
msgid "Defined At"
|
||||
msgstr "Визначено в"
|
||||
|
||||
#: gtk/inspector/recorder.c:1865
|
||||
#: gtk/inspector/recorder.c:1922
|
||||
#, c-format
|
||||
msgid "Saving RenderNode failed"
|
||||
msgstr "Не вдалося зберегти RenderNode"
|
||||
@@ -7201,7 +7202,8 @@ msgstr ""
|
||||
#: tools/gtk-builder-tool-enumerate.c:56 tools/gtk-builder-tool-preview.c:179
|
||||
#: tools/gtk-builder-tool-preview.c:180 tools/gtk-builder-tool-screenshot.c:360
|
||||
#: tools/gtk-builder-tool-simplify.c:2529 tools/gtk-builder-tool-validate.c:261
|
||||
#: tools/gtk-rendernode-tool-info.c:200 tools/gtk-rendernode-tool-show.c:102
|
||||
#: tools/gtk-path-tool-render.c:62 tools/gtk-rendernode-tool-info.c:208
|
||||
#: tools/gtk-rendernode-tool-show.c:102
|
||||
msgid "FILE"
|
||||
msgstr "ФАЙЛ"
|
||||
|
||||
@@ -7233,8 +7235,8 @@ msgid "Use style from CSS file"
|
||||
msgstr "Використати стиль з файла CSS"
|
||||
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-show.c:109
|
||||
#: tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-builder-tool-validate.c:268 tools/gtk-rendernode-tool-render.c:204
|
||||
#: tools/gtk-rendernode-tool-show.c:109
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
msgstr "Не вдалося ініціалізувати систему вікон\n"
|
||||
@@ -7463,6 +7465,243 @@ msgstr "%s: нема такої програми %s"
|
||||
msgid "%s: error launching application: %s\n"
|
||||
msgstr "%s: помилка запускання програми: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Usage:\n"
|
||||
" gtk4-path-tool [COMMAND] [OPTION…] PATH\n"
|
||||
"\n"
|
||||
"Perform various tasks on paths.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" decompose Decompose the path\n"
|
||||
" show Display the path in a window\n"
|
||||
" render Render the path as an image\n"
|
||||
" info Print information about the path\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Користування:\n"
|
||||
" gtk4-path-tool [КОМАНДА] [ПАРАМЕТР…] КОНТУР\n"
|
||||
"\n"
|
||||
"Виконати різноманітні завдання щодо контурів.\n"
|
||||
"\n"
|
||||
"Команди:\n"
|
||||
" decompose розкласти контур на частини\n"
|
||||
" show показати контур у вікні\n"
|
||||
" render обробити контур до зображення\n"
|
||||
" info вивести відомості щодо контура\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:75
|
||||
msgid "Allow quadratic Bézier curves"
|
||||
msgstr "Дозволити квадратичні криві Безьє"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:76
|
||||
msgid "Allow cubic Bézier curves"
|
||||
msgstr "Дозволити кубічні криві Безьє"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:77 tools/gtk-path-tool-info.c:88
|
||||
#: tools/gtk-path-tool-render.c:63 tools/gtk-path-tool-show.c:132
|
||||
msgid "PATH"
|
||||
msgstr "КОНТУР"
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:89
|
||||
msgid "Decompose a path."
|
||||
msgstr "Розкласти шлях."
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:102 tools/gtk-path-tool-info.c:112
|
||||
msgid "No paths given."
|
||||
msgstr "Не задано контурів."
|
||||
|
||||
#: tools/gtk-path-tool-decompose.c:128
|
||||
msgid "That didn't work out."
|
||||
msgstr "Не спрацювало."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:99
|
||||
msgid "Print information about a path."
|
||||
msgstr "Вивести відомості щодо контура."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:119
|
||||
msgid "Path is empty."
|
||||
msgstr "Порожній шлях."
|
||||
|
||||
#: tools/gtk-path-tool-info.c:125
|
||||
msgid "Path is closed"
|
||||
msgstr "Контур замкнено"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:134
|
||||
#, c-format
|
||||
msgid "%d contours"
|
||||
msgstr "%d контурів"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:136
|
||||
#, c-format
|
||||
#| msgid "Fractions"
|
||||
msgid "%d operations"
|
||||
msgstr "%d дій"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:140
|
||||
#, c-format
|
||||
#| msgctxt "Script"
|
||||
#| msgid "Balinese"
|
||||
msgid "%d lines"
|
||||
msgstr "%d ліній"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:145
|
||||
#, c-format
|
||||
msgid "%d quadratics"
|
||||
msgstr "%d квадратних апроксимацій"
|
||||
|
||||
#: tools/gtk-path-tool-info.c:150
|
||||
#, c-format
|
||||
msgid "%d cubics"
|
||||
msgstr "%d кубічних апроксимацій"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-show.c:122
|
||||
msgid "Fill rule (winding, even-odd)"
|
||||
msgstr "Правило заповнення (віконне, парне-непарне)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:52 tools/gtk-path-tool-render.c:56
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-render.c:58
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-render.c:60
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:122
|
||||
#: tools/gtk-path-tool-show.c:126 tools/gtk-path-tool-show.c:127
|
||||
#: tools/gtk-path-tool-show.c:128 tools/gtk-path-tool-show.c:129
|
||||
#: tools/gtk-path-tool-show.c:130 tools/gtk-path-tool-show.c:131
|
||||
msgid "VALUE"
|
||||
msgstr "ЗНАЧЕННЯ"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-show.c:123
|
||||
msgid "Foreground color"
|
||||
msgstr "Колір переднього плану"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:53 tools/gtk-path-tool-render.c:54
|
||||
#: tools/gtk-path-tool-show.c:123 tools/gtk-path-tool-show.c:124
|
||||
msgid "COLOR"
|
||||
msgstr "КОЛІР"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:54 tools/gtk-path-tool-show.c:124
|
||||
msgid "Background color"
|
||||
msgstr "Колір тла"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:55 tools/gtk-path-tool-show.c:125
|
||||
msgid "Stroke the path instead of filling it"
|
||||
msgstr "Заштрихувати контур, а не заповнювати його"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:56 tools/gtk-path-tool-show.c:126
|
||||
msgid "Line width (number)"
|
||||
msgstr "Товщина лінії (число)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:57 tools/gtk-path-tool-show.c:127
|
||||
msgid "Line cap (butt, round, square)"
|
||||
msgstr "Кінець лінії (торець, заокруглення, квадрат)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:58 tools/gtk-path-tool-show.c:128
|
||||
msgid "Line join (miter, miter-clip, round, bevel, arcs)"
|
||||
msgstr ""
|
||||
"З'єднання лінії (під кутом, під кутом з обрізанням, заокруглення, "
|
||||
"загострення, дуги)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:59 tools/gtk-path-tool-show.c:129
|
||||
msgid "Miter limit (number)"
|
||||
msgstr "Обмеження зрізу (число)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:60 tools/gtk-path-tool-show.c:130
|
||||
msgid "Dash pattern (comma-separated numbers)"
|
||||
msgstr "Взірець штриха (числа, які відокремлено комами)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:61 tools/gtk-path-tool-show.c:131
|
||||
msgid "Dash offset (number)"
|
||||
msgstr "Відступ штриха (число)"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:62
|
||||
msgid "The output file"
|
||||
msgstr "Файл результатів"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:81 tools/gtk-path-tool-show.c:145
|
||||
msgid "Could not initialize windowing system"
|
||||
msgstr "Не вдалося ініціалізувати систему вікон"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:89
|
||||
msgid "Render the path to a png image."
|
||||
msgstr "Обробити контур до зображення png."
|
||||
|
||||
#: tools/gtk-path-tool-render.c:102 tools/gtk-path-tool-show.c:166
|
||||
msgid "No path specified"
|
||||
msgstr "Не вказано контур"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:108
|
||||
msgid "Can only render a single path"
|
||||
msgstr "Можлива обробка для показу лише одного контура"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:114 tools/gtk-path-tool-show.c:178
|
||||
msgid "fill rule"
|
||||
msgstr "правило заповнення"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:118 tools/gtk-path-tool-show.c:182
|
||||
msgid "line cap"
|
||||
msgstr "кінчик лінії"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:119 tools/gtk-path-tool-show.c:183
|
||||
msgid "line join"
|
||||
msgstr "об'єднання рядків"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:143 tools/gtk-path-tool-show.c:207
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as number"
|
||||
msgstr "Не вдалося обробити «%s» як число"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:187
|
||||
#, c-format
|
||||
msgid "Saving png to '%s' failed"
|
||||
msgstr "Не вдалося зберегти png до «%s»"
|
||||
|
||||
#: tools/gtk-path-tool-render.c:194
|
||||
#, c-format
|
||||
msgid "Output written to '%s'."
|
||||
msgstr "Результати записано до «%s»."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:43 tools/gtk-path-tool-show.c:78
|
||||
msgid "Path Preview"
|
||||
msgstr "Перегляд контура"
|
||||
|
||||
#: tools/gtk-path-tool-show.c:153
|
||||
msgid "Display the path."
|
||||
msgstr "Показати контур."
|
||||
|
||||
#: tools/gtk-path-tool-show.c:172
|
||||
msgid "Can only show a single path"
|
||||
msgstr "Можливий показ лише одного контура"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:58
|
||||
#, c-format
|
||||
msgid "Failed to read from standard input: %s\n"
|
||||
msgstr "Не вдалося прочитати дані зі стандартного джерела даних: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:64
|
||||
#, c-format
|
||||
msgid "Error reading from standard input: %s\n"
|
||||
msgstr "Помилка під час спроби читання зі стандартного джерела даних: %s\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:83
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as path.\n"
|
||||
msgstr "Не вдалося обробити «%s» як контур.\n"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:109
|
||||
#, c-format
|
||||
msgid "Failed to parse '%s' as %s."
|
||||
msgstr "Не вдалося обробити «%s» як %s."
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:111
|
||||
msgid "Possible values: "
|
||||
msgstr "Можливі значення:"
|
||||
|
||||
#: tools/gtk-path-tool-utils.c:135
|
||||
#, c-format
|
||||
msgid "Could not parse '%s' as color"
|
||||
msgstr "Не вдалося обробити «%s» як колір"
|
||||
|
||||
#: tools/gtk-rendernode-tool.c:35
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7488,50 +7727,41 @@ msgstr ""
|
||||
" render Створити знімок вікна вузла\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:177
|
||||
#: tools/gtk-rendernode-tool-info.c:185
|
||||
#, c-format
|
||||
msgid "Number of nodes: %u\n"
|
||||
msgstr "Кількість вузлів: %u\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:184
|
||||
#: tools/gtk-rendernode-tool-info.c:192
|
||||
#, c-format
|
||||
msgid "Depth: %u\n"
|
||||
msgstr "Глибина: %u\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:187
|
||||
#: tools/gtk-rendernode-tool-info.c:195
|
||||
#, c-format
|
||||
msgid "Bounds: %g x %g\n"
|
||||
msgstr "Межі: %g x %g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:188
|
||||
#: tools/gtk-rendernode-tool-info.c:196
|
||||
#, c-format
|
||||
msgid "Origin: %g %g\n"
|
||||
msgstr "Початок координат: %g %g\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:209
|
||||
#: tools/gtk-rendernode-tool-info.c:217
|
||||
msgid "Provide information about the render node."
|
||||
msgstr "Надати дані щодо вузла обробки."
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:222 tools/gtk-rendernode-tool-show.c:130
|
||||
#: tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-info.c:230 tools/gtk-rendernode-tool-render.c:225
|
||||
#: tools/gtk-rendernode-tool-show.c:130
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
msgstr "Не вказано файл .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-info.c:228
|
||||
#: tools/gtk-rendernode-tool-info.c:236
|
||||
#, c-format
|
||||
msgid "Can only accept a single .node file\n"
|
||||
msgstr "Можлива одночасна обробка лише одного файла .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "Показати вузол обробки."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "Можливий попередній перегляд лише одного файла .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:123
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -7543,7 +7773,6 @@ msgstr ""
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:137
|
||||
#, c-format
|
||||
#| msgid "Failed to save %s: %s\n"
|
||||
msgid "Failed to generate SVG: %s\n"
|
||||
msgstr "Не вдалося створити SVG: %s\n"
|
||||
|
||||
@@ -7566,6 +7795,15 @@ msgstr ""
|
||||
"Одночасно можливе створення лише одного знімка вікна файла .node і виведення "
|
||||
"даних лише до одного файла\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:117
|
||||
msgid "Show the render node."
|
||||
msgstr "Показати вузол обробки."
|
||||
|
||||
#: tools/gtk-rendernode-tool-show.c:136
|
||||
#, c-format
|
||||
msgid "Can only preview a single .node file\n"
|
||||
msgstr "Можливий попередній перегляд лише одного файла .node\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-utils.c:51
|
||||
#, c-format
|
||||
msgid "Error at %s: %s\n"
|
||||
@@ -8074,10 +8312,6 @@ msgstr ""
|
||||
#~ msgid "Unknown"
|
||||
#~ msgstr "невідома"
|
||||
|
||||
#~ msgctxt "Script"
|
||||
#~ msgid "Balinese"
|
||||
#~ msgstr "балійська"
|
||||
|
||||
#~ msgctxt "Script"
|
||||
#~ msgid "Cuneiform"
|
||||
#~ msgstr "клинопис"
|
||||
@@ -8460,10 +8694,6 @@ msgstr ""
|
||||
#~ msgid "Can't parse “%s”\n"
|
||||
#~ msgstr "Не вдалося обробити «%s»\n"
|
||||
|
||||
#~| msgid "Failed to write header\n"
|
||||
#~ msgid "Failed to parse png image"
|
||||
#~ msgstr "Не вдалося обробити дані зображення png"
|
||||
|
||||
#~ msgid "Sandbox does not provide an OpenGL implementation"
|
||||
#~ msgstr "Пісочниця не надає реалізації OpenGL"
|
||||
|
||||
|
||||
@@ -465,10 +465,10 @@ test_path_point (void)
|
||||
g_assert_true (rp->idx == 2);
|
||||
g_assert_true (rp->t == 1);
|
||||
|
||||
gsk_path_point_get_position (path, &point, &pos);
|
||||
gsk_path_point_get_tangent (path, &point, GSK_PATH_START, &t1);
|
||||
gsk_path_point_get_tangent (path, &point, GSK_PATH_END, &t2);
|
||||
curvature = gsk_path_point_get_curvature (path, &point, ¢er);
|
||||
gsk_path_point_get_position (&point, path, &pos);
|
||||
gsk_path_point_get_tangent (&point, path, GSK_PATH_FROM_START, &t1);
|
||||
gsk_path_point_get_tangent (&point, path, GSK_PATH_TO_END, &t2);
|
||||
curvature = gsk_path_point_get_curvature (&point, path, ¢er);
|
||||
|
||||
g_assert_true (graphene_point_equal (&pos, &GRAPHENE_POINT_INIT (100, 100)));
|
||||
g_assert_true (graphene_vec2_equal (&t1, graphene_vec2_y_axis ()));
|
||||
|
||||
@@ -635,6 +635,35 @@ test_issue_4575 (void)
|
||||
run_test (commands, G_N_ELEMENTS (commands), 0);
|
||||
}
|
||||
|
||||
static void
|
||||
test_issue_5777 (void)
|
||||
{
|
||||
static const Command commands[] = {
|
||||
{ MODIFIED, -1, -1, NULL, NULL, UNSET, UNSET, SET },
|
||||
{ INSERT_SEQ, 0, -1, "this is a test\nmore", "this is a test\nmore", SET, UNSET, SET },
|
||||
{ UNDO, -1, -1, NULL, "this is a test\n", SET, SET, SET },
|
||||
{ UNMODIFIED, -1, -1, NULL, NULL, SET, SET, UNSET },
|
||||
{ REDO, -1, -1, NULL, "this is a test\nmore", SET, UNSET, SET },
|
||||
{ UNDO, -1, -1, NULL, "this is a test\n", SET, SET, UNSET },
|
||||
{ REDO, -1, -1, NULL, "this is a test\nmore", SET, UNSET, SET },
|
||||
{ UNDO, -1, -1, NULL, "this is a test\n", SET, SET, UNSET },
|
||||
{ MODIFIED, -1, -1, NULL, NULL, SET, SET, SET },
|
||||
{ REDO, -1, -1, NULL, "this is a test\nmore", SET, UNSET, SET },
|
||||
{ UNMODIFIED, -1, -1, NULL, NULL, SET, UNSET, UNSET },
|
||||
{ UNDO, -1, -1, NULL, "this is a test\n", SET, SET, SET },
|
||||
{ REDO, -1, -1, NULL, "this is a test\nmore", SET, UNSET, UNSET },
|
||||
{ UNDO, -1, -1, NULL, "this is a test\n", SET, SET, SET },
|
||||
{ UNDO, -1, -1, NULL, "this is a test", SET, SET, SET },
|
||||
{ UNMODIFIED, -1, -1, NULL, NULL, SET, SET, UNSET },
|
||||
{ UNDO, -1, -1, NULL, "this is a", SET, SET, SET },
|
||||
{ REDO, -1, -1, NULL, "this is a test", SET, SET, UNSET },
|
||||
{ REDO, -1, -1, NULL, "this is a test\n", SET, SET, SET },
|
||||
{ REDO, -1, -1, NULL, "this is a test\nmore", SET, UNSET, SET },
|
||||
};
|
||||
|
||||
run_test (commands, G_N_ELEMENTS (commands), 4);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
@@ -657,6 +686,7 @@ main (int argc,
|
||||
g_test_add_func ("/Gtk/TextHistory/test14", test14);
|
||||
g_test_add_func ("/Gtk/TextHistory/issue_4276", test_issue_4276);
|
||||
g_test_add_func ("/Gtk/TextHistory/issue_4575", test_issue_4575);
|
||||
g_test_add_func ("/Gtk/TextHistory/issue_5777", test_issue_5777);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/* Copyright 2023 Red Hat, Inc.
|
||||
*
|
||||
* GTK+ is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GTK+; see the file COPYING. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk-path-tool.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
static gboolean
|
||||
foreach_cb (GskPathOperation op,
|
||||
const graphene_point_t *pts,
|
||||
gsize n_pts,
|
||||
gpointer user_data)
|
||||
{
|
||||
GskPathBuilder *builder = user_data;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case GSK_PATH_MOVE:
|
||||
gsk_path_builder_move_to (builder, pts[0].x, pts[0].y);
|
||||
break;
|
||||
|
||||
case GSK_PATH_CLOSE:
|
||||
gsk_path_builder_close (builder);
|
||||
break;
|
||||
|
||||
case GSK_PATH_LINE:
|
||||
gsk_path_builder_line_to (builder, pts[1].x, pts[1].y);
|
||||
break;
|
||||
|
||||
case GSK_PATH_QUAD:
|
||||
gsk_path_builder_quad_to (builder, pts[1].x, pts[1].y, pts[2].x, pts[2].y);
|
||||
break;
|
||||
|
||||
case GSK_PATH_CUBIC:
|
||||
gsk_path_builder_cubic_to (builder, pts[1].x, pts[1].y,
|
||||
pts[2].x, pts[2].y,
|
||||
pts[3].x, pts[3].y);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
do_decompose (int *argc, const char ***argv)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gboolean allow_quad = FALSE;
|
||||
gboolean allow_curve = FALSE;
|
||||
char **args = NULL;
|
||||
GOptionContext *context;
|
||||
GOptionEntry entries[] = {
|
||||
{ "allow-quad", 0, 0, G_OPTION_ARG_NONE, &allow_quad, N_("Allow quadratic Bézier curves"), NULL },
|
||||
{ "allow-cubic", 0, 0, G_OPTION_ARG_NONE, &allow_curve, N_("Allow cubic Bézier curves"), NULL },
|
||||
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &args, NULL, N_("PATH") },
|
||||
{ NULL, },
|
||||
};
|
||||
GskPathForeachFlags flags;
|
||||
GskPath *path, *result;
|
||||
GskPathBuilder *builder;
|
||||
|
||||
g_set_prgname ("gtk4-path-tool decompose");
|
||||
|
||||
context = g_option_context_new (NULL);
|
||||
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
|
||||
g_option_context_add_main_entries (context, entries, NULL);
|
||||
g_option_context_set_summary (context, _("Decompose a path."));
|
||||
|
||||
if (!g_option_context_parse (context, argc, (char ***)argv, &error))
|
||||
{
|
||||
g_printerr ("%s\n", error->message);
|
||||
g_error_free (error);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_option_context_free (context);
|
||||
|
||||
if (args == NULL)
|
||||
{
|
||||
g_printerr ("%s\n", _("No paths given."));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
path = get_path (args[0]);
|
||||
|
||||
flags = 0;
|
||||
if (allow_quad)
|
||||
flags |= GSK_PATH_FOREACH_ALLOW_QUAD;
|
||||
if (allow_curve)
|
||||
flags |= GSK_PATH_FOREACH_ALLOW_CUBIC;
|
||||
|
||||
builder = gsk_path_builder_new ();
|
||||
|
||||
gsk_path_foreach (path, flags, foreach_cb, builder);
|
||||
|
||||
result = gsk_path_builder_free_to_path (builder);
|
||||
|
||||
if (result)
|
||||
{
|
||||
char *str = gsk_path_to_string (result);
|
||||
g_print ("%s\n", str);
|
||||
g_free (str);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printerr ("%s\n", _("That didn't work out."));
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
/* Copyright 2023 Red Hat, Inc.
|
||||
*
|
||||
* GTK+ is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GTK+; see the file COPYING. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk-path-tool.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int contours;
|
||||
int ops;
|
||||
int lines;
|
||||
int quads;
|
||||
int cubics;
|
||||
} Statistics;
|
||||
|
||||
static gboolean
|
||||
stats_cb (GskPathOperation op,
|
||||
const graphene_point_t *pts,
|
||||
gsize n_pts,
|
||||
gpointer user_data)
|
||||
{
|
||||
Statistics *stats = user_data;
|
||||
|
||||
stats->ops++;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case GSK_PATH_MOVE:
|
||||
stats->contours++;
|
||||
break;
|
||||
case GSK_PATH_CLOSE:
|
||||
case GSK_PATH_LINE:
|
||||
stats->lines++;
|
||||
break;
|
||||
case GSK_PATH_QUAD:
|
||||
stats->quads++;
|
||||
break;
|
||||
case GSK_PATH_CUBIC:
|
||||
stats->cubics++;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
collect_statistics (GskPath *path,
|
||||
Statistics *stats)
|
||||
{
|
||||
stats->contours = 0;
|
||||
stats->ops = 0;
|
||||
stats->lines = 0;
|
||||
stats->quads = 0;
|
||||
stats->cubics = 0;
|
||||
|
||||
gsk_path_foreach (path, -1, stats_cb, stats);
|
||||
}
|
||||
|
||||
void
|
||||
do_info (int *argc, const char ***argv)
|
||||
{
|
||||
GError *error = NULL;
|
||||
char **args = NULL;
|
||||
GOptionContext *context;
|
||||
GOptionEntry entries[] = {
|
||||
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &args, NULL, N_("PATH") },
|
||||
{ NULL, },
|
||||
};
|
||||
GskPath *path;
|
||||
graphene_rect_t bounds;
|
||||
|
||||
g_set_prgname ("gtk4-path-tool info");
|
||||
|
||||
context = g_option_context_new (NULL);
|
||||
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
|
||||
g_option_context_add_main_entries (context, entries, NULL);
|
||||
g_option_context_set_summary (context, _("Print information about a path."));
|
||||
|
||||
if (!g_option_context_parse (context, argc, (char ***)argv, &error))
|
||||
{
|
||||
g_printerr ("%s\n", error->message);
|
||||
g_error_free (error);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_option_context_free (context);
|
||||
|
||||
if (args == NULL)
|
||||
{
|
||||
g_printerr ("%s\n", _("No paths given."));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
path = get_path (args[0]);
|
||||
|
||||
if (gsk_path_is_empty (path))
|
||||
g_print ("%s\n", _("Path is empty."));
|
||||
else
|
||||
{
|
||||
Statistics stats;
|
||||
|
||||
if (gsk_path_is_closed (path))
|
||||
g_print ("%s\n", _("Path is closed"));
|
||||
|
||||
if (gsk_path_get_bounds (path, &bounds))
|
||||
g_print ("%s: %g %g %g %g\n", _("Bounds"),
|
||||
bounds.origin.x, bounds.origin.y,
|
||||
bounds.size.width, bounds.size.height);
|
||||
|
||||
collect_statistics (path, &stats);
|
||||
|
||||
g_print (_("%d contours"), stats.contours);
|
||||
g_print ("\n");
|
||||
g_print (_("%d operations"), stats.ops);
|
||||
g_print ("\n");
|
||||
if (stats.lines)
|
||||
{
|
||||
g_print (_("%d lines"), stats.lines);
|
||||
g_print ("\n");
|
||||
}
|
||||
if (stats.quads)
|
||||
{
|
||||
g_print (_("%d quadratics"), stats.quads);
|
||||
g_print ("\n");
|
||||
}
|
||||
if (stats.cubics)
|
||||
{
|
||||
g_print (_("%d cubics"), stats.cubics);
|
||||
g_print ("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
/* Copyright 2023 Red Hat, Inc.
|
||||
*
|
||||
* GTK+ is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GTK+; see the file COPYING. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <glib/gprintf.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk-path-tool.h"
|
||||
|
||||
|
||||
void
|
||||
do_render (int *argc,
|
||||
const char ***argv)
|
||||
{
|
||||
GError *error = NULL;
|
||||
const char *fill = "winding";
|
||||
const char *fg_color = "black";
|
||||
const char *bg_color = "white";
|
||||
gboolean do_stroke = FALSE;
|
||||
double line_width = 1;
|
||||
const char *cap = "butt";
|
||||
const char *join = "miter";
|
||||
double miter_limit = 4;
|
||||
const char *dashes = NULL;
|
||||
double dash_offset = 0;
|
||||
const char *output_file = NULL;
|
||||
char **args = NULL;
|
||||
GOptionContext *context;
|
||||
const GOptionEntry entries[] = {
|
||||
{ "fill-rule", 0, 0, G_OPTION_ARG_STRING, &fill, N_("Fill rule (winding, even-odd)"), N_("VALUE") },
|
||||
{ "fg-color", 0, 0, G_OPTION_ARG_STRING, &fg_color, N_("Foreground color"), N_("COLOR") },
|
||||
{ "bg-color", 0, 0, G_OPTION_ARG_STRING, &bg_color, N_("Background color"), N_("COLOR") },
|
||||
{ "stroke", 0, 0, G_OPTION_ARG_NONE, &do_stroke, N_("Stroke the path instead of filling it"), NULL },
|
||||
{ "line-width", 0, 0, G_OPTION_ARG_DOUBLE, &line_width, N_("Line width (number)"), N_("VALUE") },
|
||||
{ "line-cap", 0, 0, G_OPTION_ARG_STRING, &cap, N_("Line cap (butt, round, square)"), N_("VALUE") },
|
||||
{ "line-join", 0, 0, G_OPTION_ARG_STRING, &join, N_("Line join (miter, miter-clip, round, bevel, arcs)"), N_("VALUE") },
|
||||
{ "miter-limit", 0, 0, G_OPTION_ARG_DOUBLE, &miter_limit, N_("Miter limit (number)"), N_("VALUE") },
|
||||
{ "dashes", 0, 0, G_OPTION_ARG_STRING, &dashes, N_("Dash pattern (comma-separated numbers)"), N_("VALUE") },
|
||||
{ "dash-offset", 0, 0, G_OPTION_ARG_DOUBLE, &dash_offset, N_("Dash offset (number)"), N_("VALUE") },
|
||||
{ "output", 0, 0, G_OPTION_ARG_FILENAME, &output_file, N_("The output file"), N_("FILE") },
|
||||
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &args, NULL, N_("PATH") },
|
||||
{ NULL, }
|
||||
};
|
||||
GskPath *path;
|
||||
GskFillRule fill_rule;
|
||||
GdkRGBA fg, bg;
|
||||
graphene_rect_t bounds;
|
||||
GskRenderNode *fg_node, *nodes[2], *node;
|
||||
GdkSurface *surface;
|
||||
GskRenderer *renderer;
|
||||
GdkTexture *texture;
|
||||
const char *filename;
|
||||
GskLineCap line_cap;
|
||||
GskLineJoin line_join;
|
||||
GskStroke *stroke;
|
||||
|
||||
if (gdk_display_get_default () == NULL)
|
||||
{
|
||||
g_printerr ("%s\n", _("Could not initialize windowing system"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_set_prgname ("gtk4-path-tool render");
|
||||
context = g_option_context_new (NULL);
|
||||
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
|
||||
g_option_context_add_main_entries (context, entries, NULL);
|
||||
g_option_context_set_summary (context, _("Render the path to a png image."));
|
||||
|
||||
if (!g_option_context_parse (context, argc, (char ***)argv, &error))
|
||||
{
|
||||
g_printerr ("%s\n", error->message);
|
||||
g_error_free (error);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_option_context_free (context);
|
||||
|
||||
if (args == NULL)
|
||||
{
|
||||
g_printerr ("%s\n", _("No path specified"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (g_strv_length (args) > 1)
|
||||
{
|
||||
g_printerr ("%s\n", _("Can only render a single path"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
path = get_path (args[0]);
|
||||
|
||||
fill_rule = get_enum_value (GSK_TYPE_FILL_RULE, _("fill rule"), fill);
|
||||
get_color (&fg, fg_color);
|
||||
get_color (&bg, bg_color);
|
||||
|
||||
line_cap = get_enum_value (GSK_TYPE_LINE_CAP, _("line cap"), cap);
|
||||
line_join = get_enum_value (GSK_TYPE_LINE_JOIN, _("line join"), join);
|
||||
|
||||
stroke = gsk_stroke_new (line_width);
|
||||
gsk_stroke_set_line_cap (stroke, line_cap);
|
||||
gsk_stroke_set_line_join (stroke, line_join);
|
||||
|
||||
gsk_stroke_set_miter_limit (stroke, miter_limit);
|
||||
|
||||
if (dashes != NULL)
|
||||
{
|
||||
GArray *d = g_array_new (FALSE, FALSE, sizeof (float));
|
||||
char **strings;
|
||||
|
||||
strings = g_strsplit (dashes, ",", 0);
|
||||
|
||||
for (unsigned int i = 0; strings[i]; i++)
|
||||
{
|
||||
char *end = NULL;
|
||||
float f;
|
||||
|
||||
f = (float) g_ascii_strtod (strings[i], &end);
|
||||
|
||||
if (*end != '\0')
|
||||
{
|
||||
char *msg = g_strdup_printf (_("Failed to parse '%s' as number"), strings[i]);
|
||||
g_printerr ("%s\n", msg);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_array_append_val (d, f);
|
||||
}
|
||||
|
||||
g_strfreev (strings);
|
||||
|
||||
gsk_stroke_set_dash (stroke, (const float *)d->data, d->len);
|
||||
|
||||
g_array_unref (d);
|
||||
}
|
||||
|
||||
gsk_stroke_set_dash_offset (stroke, dash_offset);
|
||||
|
||||
if (do_stroke)
|
||||
gsk_path_get_stroke_bounds (path, stroke, &bounds);
|
||||
else
|
||||
gsk_path_get_bounds (path, &bounds);
|
||||
graphene_rect_inset (&bounds, -10, -10);
|
||||
|
||||
nodes[0] = gsk_color_node_new (&bg, &bounds);
|
||||
fg_node = gsk_color_node_new (&fg, &bounds);
|
||||
if (do_stroke)
|
||||
nodes[1] = gsk_stroke_node_new (fg_node, path, stroke);
|
||||
else
|
||||
nodes[1] = gsk_fill_node_new (fg_node, path, fill_rule);
|
||||
|
||||
node = gsk_container_node_new (nodes, 2);
|
||||
|
||||
gsk_render_node_unref (fg_node);
|
||||
gsk_render_node_unref (nodes[0]);
|
||||
gsk_render_node_unref (nodes[1]);
|
||||
|
||||
surface = gdk_surface_new_toplevel (gdk_display_get_default ());
|
||||
renderer = gsk_renderer_new_for_surface (surface);
|
||||
|
||||
texture = gsk_renderer_render_texture (renderer, node, &bounds);
|
||||
|
||||
filename = output_file ? output_file : "path.png";
|
||||
if (!gdk_texture_save_to_png (texture, filename))
|
||||
{
|
||||
char *msg = g_strdup_printf (_("Saving png to '%s' failed"), filename);
|
||||
g_printerr ("%s\n", msg);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (output_file == NULL)
|
||||
{
|
||||
char *msg = g_strdup_printf (_("Output written to '%s'."), filename);
|
||||
g_print ("%s\n", msg);
|
||||
g_free (msg);
|
||||
}
|
||||
|
||||
g_object_unref (texture);
|
||||
gsk_renderer_unrealize (renderer);
|
||||
g_object_unref (renderer);
|
||||
g_object_unref (surface);
|
||||
gsk_render_node_unref (node);
|
||||
|
||||
gsk_path_unref (path);
|
||||
|
||||
g_strfreev (args);
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
/* Copyright 2023 Red Hat, Inc.
|
||||
*
|
||||
* GTK+ is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GTK+; see the file COPYING. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <glib/gprintf.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk-path-tool.h"
|
||||
|
||||
#include "path-view.h"
|
||||
|
||||
static void
|
||||
show_path_fill (GskPath *path,
|
||||
GskFillRule fill_rule,
|
||||
const GdkRGBA *fg_color,
|
||||
const GdkRGBA *bg_color)
|
||||
{
|
||||
GtkWidget *window, *sw, *child;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (window), _("Path Preview"));
|
||||
|
||||
// gtk_window_set_default_size (GTK_WINDOW (window), 700, 500);
|
||||
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_propagate_natural_width (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_scrolled_window_set_propagate_natural_height (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
|
||||
child = path_view_new (path);
|
||||
g_object_set (child,
|
||||
"do-fill", TRUE,
|
||||
"fill-rule", fill_rule,
|
||||
"fg-color", fg_color,
|
||||
"bg-color", bg_color,
|
||||
NULL);
|
||||
gtk_widget_set_hexpand (child, TRUE);
|
||||
gtk_widget_set_vexpand (child, TRUE);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), child);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
|
||||
while (g_list_model_get_n_items (gtk_window_get_toplevels ()) > 0)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
show_path_stroke (GskPath *path,
|
||||
GskStroke *stroke,
|
||||
const GdkRGBA *fg_color,
|
||||
const GdkRGBA *bg_color)
|
||||
{
|
||||
GtkWidget *window, *sw, *child;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (window), _("Path Preview"));
|
||||
|
||||
// gtk_window_set_default_size (GTK_WINDOW (window), 700, 500);
|
||||
|
||||
sw = gtk_scrolled_window_new ();
|
||||
gtk_scrolled_window_set_propagate_natural_width (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_scrolled_window_set_propagate_natural_height (GTK_SCROLLED_WINDOW (sw), TRUE);
|
||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
||||
|
||||
child = path_view_new (path);
|
||||
g_object_set (child,
|
||||
"do-fill", FALSE,
|
||||
"stroke", stroke,
|
||||
"fg-color", fg_color,
|
||||
"bg-color", bg_color,
|
||||
NULL);
|
||||
gtk_widget_set_hexpand (child, TRUE);
|
||||
gtk_widget_set_vexpand (child, TRUE);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), child);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (window));
|
||||
|
||||
while (g_list_model_get_n_items (gtk_window_get_toplevels ()) > 0)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
do_show (int *argc,
|
||||
const char ***argv)
|
||||
{
|
||||
GError *error = NULL;
|
||||
gboolean do_stroke = FALSE;
|
||||
const char *fill = "winding";
|
||||
const char *fg_color = "black";
|
||||
const char *bg_color = "white";
|
||||
double line_width = 1;
|
||||
const char *cap = "butt";
|
||||
const char *join = "miter";
|
||||
double miter_limit = 4;
|
||||
const char *dashes = NULL;
|
||||
double dash_offset = 0;
|
||||
char **args = NULL;
|
||||
GOptionContext *context;
|
||||
const GOptionEntry entries[] = {
|
||||
{ "fill-rule", 0, 0, G_OPTION_ARG_STRING, &fill, N_("Fill rule (winding, even-odd)"), N_("VALUE") },
|
||||
{ "fg-color", 0, 0, G_OPTION_ARG_STRING, &fg_color, N_("Foreground color"), N_("COLOR") },
|
||||
{ "bg-color", 0, 0, G_OPTION_ARG_STRING, &bg_color, N_("Background color"), N_("COLOR") },
|
||||
{ "stroke", 0, 0, G_OPTION_ARG_NONE, &do_stroke, N_("Stroke the path instead of filling it"), NULL },
|
||||
{ "line-width", 0, 0, G_OPTION_ARG_DOUBLE, &line_width, N_("Line width (number)"), N_("VALUE") },
|
||||
{ "line-cap", 0, 0, G_OPTION_ARG_STRING, &cap, N_("Line cap (butt, round, square)"), N_("VALUE") },
|
||||
{ "line-join", 0, 0, G_OPTION_ARG_STRING, &join, N_("Line join (miter, miter-clip, round, bevel, arcs)"), N_("VALUE") },
|
||||
{ "miter-limit", 0, 0, G_OPTION_ARG_DOUBLE, &miter_limit, N_("Miter limit (number)"), N_("VALUE") },
|
||||
{ "dashes", 0, 0, G_OPTION_ARG_STRING, &dashes, N_("Dash pattern (comma-separated numbers)"), N_("VALUE") },
|
||||
{ "dash-offset", 0, 0, G_OPTION_ARG_DOUBLE, &dash_offset, N_("Dash offset (number)"), N_("VALUE") },
|
||||
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &args, NULL, N_("PATH") },
|
||||
{ NULL, }
|
||||
};
|
||||
GskPath *path;
|
||||
GskFillRule fill_rule;
|
||||
GdkRGBA fg;
|
||||
GdkRGBA bg;
|
||||
GskLineCap line_cap;
|
||||
GskLineJoin line_join;
|
||||
GskStroke *stroke;
|
||||
|
||||
if (gdk_display_get_default () == NULL)
|
||||
{
|
||||
g_printerr ("%s\n", _("Could not initialize windowing system"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_set_prgname ("gtk4-path-tool show");
|
||||
context = g_option_context_new (NULL);
|
||||
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
|
||||
g_option_context_add_main_entries (context, entries, NULL);
|
||||
g_option_context_set_summary (context, _("Display the path."));
|
||||
|
||||
if (!g_option_context_parse (context, argc, (char ***)argv, &error))
|
||||
{
|
||||
g_printerr ("%s\n", error->message);
|
||||
g_error_free (error);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_option_context_free (context);
|
||||
|
||||
if (args == NULL)
|
||||
{
|
||||
g_printerr ("%s\n", _("No path specified"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (g_strv_length (args) > 1)
|
||||
{
|
||||
g_printerr ("%s\n", _("Can only show a single path"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
path = get_path (args[0]);
|
||||
|
||||
fill_rule = get_enum_value (GSK_TYPE_FILL_RULE, _("fill rule"), fill);
|
||||
get_color (&fg, fg_color);
|
||||
get_color (&bg, bg_color);
|
||||
|
||||
line_cap = get_enum_value (GSK_TYPE_LINE_CAP, _("line cap"), cap);
|
||||
line_join = get_enum_value (GSK_TYPE_LINE_JOIN, _("line join"), join);
|
||||
|
||||
stroke = gsk_stroke_new (line_width);
|
||||
gsk_stroke_set_line_cap (stroke, line_cap);
|
||||
gsk_stroke_set_line_join (stroke, line_join);
|
||||
|
||||
gsk_stroke_set_miter_limit (stroke, miter_limit);
|
||||
|
||||
if (dashes != NULL)
|
||||
{
|
||||
GArray *d = g_array_new (FALSE, FALSE, sizeof (float));
|
||||
char **strings;
|
||||
|
||||
strings = g_strsplit (dashes, ",", 0);
|
||||
|
||||
for (unsigned int i = 0; strings[i]; i++)
|
||||
{
|
||||
char *end = NULL;
|
||||
float f;
|
||||
|
||||
f = (float) g_ascii_strtod (strings[i], &end);
|
||||
|
||||
if (*end != '\0')
|
||||
{
|
||||
char *msg = g_strdup_printf (_("Failed to parse '%s' as number"), strings[i]);
|
||||
g_printerr ("%s\n", msg);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_array_append_val (d, f);
|
||||
}
|
||||
|
||||
g_strfreev (strings);
|
||||
|
||||
gsk_stroke_set_dash (stroke, (const float *)d->data, d->len);
|
||||
|
||||
g_array_unref (d);
|
||||
}
|
||||
|
||||
gsk_stroke_set_dash_offset (stroke, dash_offset);
|
||||
|
||||
if (do_stroke)
|
||||
show_path_stroke (path, stroke, &fg, &bg);
|
||||
else
|
||||
show_path_fill (path, fill_rule, &fg, &bg);
|
||||
|
||||
gsk_path_unref (path);
|
||||
|
||||
g_strfreev (args);
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
/* Copyright 2023 Red Hat, Inc.
|
||||
*
|
||||
* GTK+ is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GTK+; see the file COPYING. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gio/gio.h>
|
||||
#ifdef G_OS_UNIX
|
||||
#include <gio/gunixinputstream.h>
|
||||
#endif
|
||||
#include "gtk-path-tool.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
GskPath *
|
||||
get_path (const char *arg)
|
||||
{
|
||||
char *buffer = NULL;
|
||||
gsize len;
|
||||
GError *error = NULL;
|
||||
GskPath *path;
|
||||
|
||||
if (arg[0] == '.' || arg[0] == '/')
|
||||
{
|
||||
if (!g_file_get_contents (arg, &buffer, &len, &error))
|
||||
{
|
||||
g_printerr ("%s\n", error->message);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
#ifdef G_OS_UNIX
|
||||
else if (strcmp (arg, "-") == 0)
|
||||
{
|
||||
GInputStream *in;
|
||||
GOutputStream *out;
|
||||
|
||||
in = g_unix_input_stream_new (0, FALSE);
|
||||
out = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
|
||||
|
||||
if (g_output_stream_splice (out, in, 0, NULL, &error) < 0)
|
||||
{
|
||||
g_printerr (_("Failed to read from standard input: %s\n"), error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
if (!g_output_stream_close (out, NULL, &error))
|
||||
{
|
||||
g_printerr (_("Error reading from standard input: %s\n"), error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
buffer = g_memory_output_stream_steal_data (G_MEMORY_OUTPUT_STREAM (out));
|
||||
|
||||
g_object_unref (out);
|
||||
g_object_unref (in);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
buffer = g_strdup (arg);
|
||||
|
||||
g_strstrip (buffer);
|
||||
|
||||
path = gsk_path_parse (buffer);
|
||||
|
||||
if (path == NULL)
|
||||
{
|
||||
g_printerr (_("Failed to parse '%s' as path.\n"), arg);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_free (buffer);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
int
|
||||
get_enum_value (GType type,
|
||||
const char *type_nick,
|
||||
const char *str)
|
||||
{
|
||||
GEnumClass *class = g_type_class_ref (type);
|
||||
GEnumValue *value;
|
||||
int val;
|
||||
|
||||
value = g_enum_get_value_by_nick (class, str);
|
||||
if (value)
|
||||
val = value->value;
|
||||
else
|
||||
{
|
||||
GString *s;
|
||||
|
||||
s = g_string_new ("");
|
||||
g_string_append_printf (s, _("Failed to parse '%s' as %s."), str, type_nick);
|
||||
g_string_append (s, "\n");
|
||||
g_string_append (s, _("Possible values: "));
|
||||
|
||||
for (unsigned int i = 0; i < class->n_values; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
g_string_append (s, ", ");
|
||||
g_string_append (s, class->values[i].value_nick);
|
||||
}
|
||||
g_printerr ("%s\n", s->str);
|
||||
g_string_free (s, TRUE);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_type_class_unref (class);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
void
|
||||
get_color (GdkRGBA *rgba,
|
||||
const char *str)
|
||||
{
|
||||
if (!gdk_rgba_parse (rgba, str))
|
||||
{
|
||||
char *msg = g_strdup_printf (_("Could not parse '%s' as color"), str);
|
||||
g_printerr ("%s\n", msg);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
/* Copyright 2023 Red Hat, Inc.
|
||||
*
|
||||
* GTK+ is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GTK+; see the file COPYING. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <glib/gprintf.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk-path-tool.h"
|
||||
|
||||
static void G_GNUC_NORETURN
|
||||
usage (void)
|
||||
{
|
||||
g_print (_("Usage:\n"
|
||||
" gtk4-path-tool [COMMAND] [OPTION…] PATH\n"
|
||||
"\n"
|
||||
"Perform various tasks on paths.\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" decompose Decompose the path\n"
|
||||
" show Display the path in a window\n"
|
||||
" render Render the path as an image\n"
|
||||
" info Print information about the path\n"
|
||||
"\n"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/* A simplified version of g_log_writer_default_would_drop(), to avoid
|
||||
* bumping up the required version of GLib to 2.68
|
||||
*/
|
||||
static gboolean
|
||||
would_drop (GLogLevelFlags level,
|
||||
const char *domain)
|
||||
{
|
||||
#if GLIB_CHECK_VERSION (2, 68, 0)
|
||||
return g_log_writer_default_would_drop (level, domain);
|
||||
#else
|
||||
return (level & (G_LOG_LEVEL_ERROR |
|
||||
G_LOG_LEVEL_CRITICAL |
|
||||
G_LOG_LEVEL_WARNING)) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static GLogWriterOutput
|
||||
log_writer_func (GLogLevelFlags level,
|
||||
const GLogField *fields,
|
||||
gsize n_fields,
|
||||
gpointer user_data)
|
||||
{
|
||||
gsize i;
|
||||
const char *domain = NULL;
|
||||
const char *message = NULL;
|
||||
|
||||
for (i = 0; i < n_fields; i++)
|
||||
{
|
||||
if (g_strcmp0 (fields[i].key, "GLIB_DOMAIN") == 0)
|
||||
domain = fields[i].value;
|
||||
else if (g_strcmp0 (fields[i].key, "MESSAGE") == 0)
|
||||
message = fields[i].value;
|
||||
}
|
||||
|
||||
if (message != NULL && !would_drop (level, domain))
|
||||
{
|
||||
const char *prefix;
|
||||
switch (level & G_LOG_LEVEL_MASK)
|
||||
{
|
||||
case G_LOG_LEVEL_ERROR:
|
||||
prefix = "ERROR";
|
||||
break;
|
||||
case G_LOG_LEVEL_CRITICAL:
|
||||
prefix = "CRITICAL";
|
||||
break;
|
||||
case G_LOG_LEVEL_WARNING:
|
||||
prefix = "WARNING";
|
||||
break;
|
||||
default:
|
||||
prefix = "INFO";
|
||||
break;
|
||||
}
|
||||
g_printerr ("%s-%s: %s\n", domain, prefix, message);
|
||||
}
|
||||
|
||||
return G_LOG_WRITER_HANDLED;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, const char *argv[])
|
||||
{
|
||||
g_set_prgname ("gtk4-path-tool");
|
||||
|
||||
g_log_set_writer_func (log_writer_func, NULL, NULL);
|
||||
|
||||
gtk_init_check ();
|
||||
|
||||
gtk_test_register_all_types ();
|
||||
|
||||
if (argc < 2)
|
||||
usage ();
|
||||
|
||||
if (strcmp (argv[1], "--help") == 0)
|
||||
usage ();
|
||||
|
||||
argv++;
|
||||
argc--;
|
||||
|
||||
if (strcmp (argv[0], "decompose") == 0)
|
||||
do_decompose (&argc, &argv);
|
||||
else if (strcmp (argv[0], "info") == 0)
|
||||
do_info (&argc, &argv);
|
||||
else if (strcmp (argv[0], "render") == 0)
|
||||
do_render (&argc, &argv);
|
||||
else if (strcmp (argv[0], "show") == 0)
|
||||
do_show (&argc, &argv);
|
||||
else
|
||||
usage ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
void do_info (int *argc, const char ***argv);
|
||||
void do_decompose (int *argc, const char ***argv);
|
||||
void do_render (int *argc, const char ***argv);
|
||||
void do_show (int *argc, const char ***argv);
|
||||
|
||||
GskPath *get_path (const char *arg);
|
||||
int get_enum_value (GType type,
|
||||
const char *type_nick,
|
||||
const char *str);
|
||||
void get_color (GdkRGBA *rgba,
|
||||
const char *str);
|
||||
@@ -23,6 +23,13 @@ if win32_enabled
|
||||
endif
|
||||
|
||||
gtk_tools = [
|
||||
['gtk4-path-tool', ['gtk-path-tool.c',
|
||||
'gtk-path-tool-decompose.c',
|
||||
'gtk-path-tool-info.c',
|
||||
'gtk-path-tool-render.c',
|
||||
'gtk-path-tool-show.c',
|
||||
'gtk-path-tool-utils.c',
|
||||
'path-view.c'], [libgtk_dep]],
|
||||
['gtk4-query-settings', ['gtk-query-settings.c'], [libgtk_dep]],
|
||||
['gtk4-builder-tool', ['gtk-builder-tool.c',
|
||||
'gtk-builder-tool-simplify.c',
|
||||
|
||||
@@ -0,0 +1,271 @@
|
||||
/* Copyright 2023 Red Hat, Inc.
|
||||
*
|
||||
* GTK+ is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GTK+; see the file COPYING. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Matthias Clasen
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "path-view.h"
|
||||
|
||||
struct _PathView
|
||||
{
|
||||
GtkWidget parent_instance;
|
||||
|
||||
GskPath *path;
|
||||
GskStroke *stroke;
|
||||
graphene_rect_t bounds;
|
||||
GskFillRule fill_rule;
|
||||
GdkRGBA fg;
|
||||
GdkRGBA bg;
|
||||
int padding;
|
||||
gboolean do_fill;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_PATH = 1,
|
||||
PROP_DO_FILL,
|
||||
PROP_STROKE,
|
||||
PROP_FILL_RULE,
|
||||
PROP_FG_COLOR,
|
||||
PROP_BG_COLOR,
|
||||
N_PROPERTIES
|
||||
};
|
||||
|
||||
static GParamSpec *properties[N_PROPERTIES] = { NULL, };
|
||||
|
||||
struct _PathViewClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (PathView, path_view, GTK_TYPE_WIDGET)
|
||||
|
||||
static void
|
||||
path_view_init (PathView *self)
|
||||
{
|
||||
self->do_fill = TRUE;
|
||||
self->stroke = gsk_stroke_new (1);
|
||||
self->fill_rule = GSK_FILL_RULE_WINDING;
|
||||
self->fg = (GdkRGBA) { 0, 0, 0, 1};
|
||||
self->bg = (GdkRGBA) { 1, 1, 1, 1};
|
||||
self->padding = 10;
|
||||
}
|
||||
|
||||
static void
|
||||
path_view_dispose (GObject *object)
|
||||
{
|
||||
PathView *self = PATH_VIEW (object);
|
||||
|
||||
g_clear_pointer (&self->path, gsk_path_unref);
|
||||
g_clear_pointer (&self->stroke, gsk_stroke_free);
|
||||
|
||||
G_OBJECT_CLASS (path_view_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
path_view_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
PathView *self = PATH_VIEW (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_PATH:
|
||||
g_value_set_boxed (value, self->path);
|
||||
break;
|
||||
|
||||
case PROP_DO_FILL:
|
||||
g_value_set_boolean (value, self->do_fill);
|
||||
break;
|
||||
|
||||
case PROP_STROKE:
|
||||
g_value_set_boxed (value, self->stroke);
|
||||
break;
|
||||
|
||||
case PROP_FILL_RULE:
|
||||
g_value_set_enum (value, self->fill_rule);
|
||||
break;
|
||||
|
||||
case PROP_FG_COLOR:
|
||||
g_value_set_boxed (value, &self->fg);
|
||||
break;
|
||||
|
||||
case PROP_BG_COLOR:
|
||||
g_value_set_boxed (value, &self->bg);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
update_bounds (PathView *self)
|
||||
{
|
||||
if (self->do_fill)
|
||||
gsk_path_get_bounds (self->path, &self->bounds);
|
||||
else
|
||||
gsk_path_get_stroke_bounds (self->path, self->stroke, &self->bounds);
|
||||
}
|
||||
|
||||
static void
|
||||
path_view_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
PathView *self = PATH_VIEW (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
|
||||
case PROP_PATH:
|
||||
g_clear_pointer (&self->path, gsk_path_unref);
|
||||
self->path = g_value_dup_boxed (value);
|
||||
update_bounds (self);
|
||||
gtk_widget_queue_resize (GTK_WIDGET (self));
|
||||
break;
|
||||
|
||||
case PROP_DO_FILL:
|
||||
self->do_fill = g_value_get_boolean (value);
|
||||
update_bounds (self);
|
||||
gtk_widget_queue_resize (GTK_WIDGET (self));
|
||||
break;
|
||||
|
||||
case PROP_STROKE:
|
||||
gsk_stroke_free (self->stroke);
|
||||
self->stroke = g_value_get_boxed (value);
|
||||
update_bounds (self);
|
||||
gtk_widget_queue_resize (GTK_WIDGET (self));
|
||||
break;
|
||||
|
||||
case PROP_FILL_RULE:
|
||||
self->fill_rule = g_value_get_enum (value);
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
break;
|
||||
|
||||
case PROP_FG_COLOR:
|
||||
self->fg = *(GdkRGBA *) g_value_get_boxed (value);
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
break;
|
||||
|
||||
case PROP_BG_COLOR:
|
||||
self->bg = *(GdkRGBA *) g_value_get_boxed (value);
|
||||
gtk_widget_queue_draw (GTK_WIDGET (self));
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
path_view_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
int for_size,
|
||||
int *minimum,
|
||||
int *natural,
|
||||
int *minimum_baseline,
|
||||
int *natural_baseline)
|
||||
{
|
||||
PathView *self = PATH_VIEW (widget);
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
*minimum = *natural = (int) ceilf (self->bounds.size.width) + 2 * self->padding;
|
||||
else
|
||||
*minimum = *natural = (int) ceilf (self->bounds.size.height) + 2 * self->padding;
|
||||
}
|
||||
|
||||
static void
|
||||
path_view_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
PathView *self = PATH_VIEW (widget);
|
||||
graphene_rect_t bounds = self->bounds;
|
||||
|
||||
graphene_rect_inset (&bounds, - self->padding, - self->padding);
|
||||
|
||||
gtk_snapshot_save (snapshot);
|
||||
gtk_snapshot_append_color (snapshot, &self->bg, &self->bounds);
|
||||
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (self->padding, self->padding));
|
||||
if (self->do_fill)
|
||||
gtk_snapshot_push_fill (snapshot, self->path, self->fill_rule);
|
||||
else
|
||||
gtk_snapshot_push_stroke (snapshot, self->path, self->stroke);
|
||||
gtk_snapshot_append_color (snapshot, &self->fg, &self->bounds);
|
||||
gtk_snapshot_pop (snapshot);
|
||||
gtk_snapshot_restore (snapshot);
|
||||
}
|
||||
|
||||
static void
|
||||
path_view_class_init (PathViewClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||
|
||||
object_class->dispose = path_view_dispose;
|
||||
object_class->get_property = path_view_get_property;
|
||||
object_class->set_property = path_view_set_property;
|
||||
|
||||
widget_class->measure = path_view_measure;
|
||||
widget_class->snapshot = path_view_snapshot;
|
||||
|
||||
properties[PROP_PATH]
|
||||
= g_param_spec_boxed ("path", NULL, NULL,
|
||||
GSK_TYPE_PATH,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
properties[PROP_DO_FILL]
|
||||
= g_param_spec_boolean ("do-fill", NULL, NULL,
|
||||
TRUE,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
properties[PROP_STROKE]
|
||||
= g_param_spec_boxed ("stroke", NULL, NULL,
|
||||
GSK_TYPE_STROKE,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
properties[PROP_FILL_RULE]
|
||||
= g_param_spec_enum ("fill-rule", NULL, NULL,
|
||||
GSK_TYPE_FILL_RULE,
|
||||
GSK_FILL_RULE_WINDING,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
properties[PROP_FG_COLOR]
|
||||
= g_param_spec_boxed ("fg-color", NULL, NULL,
|
||||
GDK_TYPE_RGBA,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
properties[PROP_BG_COLOR]
|
||||
= g_param_spec_boxed ("bg-color", NULL, NULL,
|
||||
GDK_TYPE_RGBA,
|
||||
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||
|
||||
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
path_view_new (GskPath *path)
|
||||
{
|
||||
return g_object_new (PATH_TYPE_VIEW,
|
||||
"path", path,
|
||||
NULL);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define PATH_TYPE_VIEW (path_view_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (PathView, path_view, PATH, VIEW, GtkWidget)
|
||||
|
||||
GtkWidget * path_view_new (GskPath *path);
|
||||