[goocanvas] Fixed goo_canvas_line_dash_newv introspection flags, added demos
- From: Damon Chaplin <damon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goocanvas] Fixed goo_canvas_line_dash_newv introspection flags, added demos
- Date: Fri, 27 Sep 2013 21:43:58 +0000 (UTC)
commit aaa2cd5edaa3c903d6078f3f75673dc6d4100ec1
Author: Damon Chaplin <damon gnome org>
Date: Fri Sep 27 22:43:08 2013 +0100
Fixed goo_canvas_line_dash_newv introspection flags, added demos
bindings/python/demo.py | 1 +
demo/demo.c | 4 ++++
src/goocanvasutils.c | 4 ++--
3 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/bindings/python/demo.py b/bindings/python/demo.py
index d641e21..6b9e547 100755
--- a/bindings/python/demo.py
+++ b/bindings/python/demo.py
@@ -78,6 +78,7 @@ def setup_canvas(c):
#Test the bezier curve commands: CcSsQqTt. */
GooCanvas.CanvasPath (parent=root,
data="M20,100 C20,50 100,50 100,100 S180,150 180,100",
+ line_dash=GooCanvas.CanvasLineDash.newv((10.0, 10.0)),
)
GooCanvas.CanvasPath (parent=root,
diff --git a/demo/demo.c b/demo/demo.c
index 0a640da..1ec2d05 100644
--- a/demo/demo.c
+++ b/demo/demo.c
@@ -849,6 +849,7 @@ setup_rectangles (GooCanvasItem *root)
static guchar stipple_data[16] = {
0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255
};
+ GooCanvasLineDash *dash;
item = goo_canvas_rect_new (root, 20, 30, 50, 30,
"stroke-color", "red",
@@ -874,12 +875,15 @@ setup_rectangles (GooCanvasItem *root)
NULL);
setup_item_signals (item);
+ dash = goo_canvas_line_dash_new (2, 5.0, 2.0);
item = goo_canvas_rect_new (root, 20, 90, 70, 60,
"fill-color-rgba", 0x3cb37180,
+ "line-dash", dash,
"stroke-color", "blue",
"line-width", 2.0,
"tooltip", "Partially transparent rectangle",
NULL);
+ goo_canvas_line_dash_unref (dash);
setup_item_signals (item);
item = goo_canvas_rect_new (root, 110, 80, 50, 30,
diff --git a/src/goocanvasutils.c b/src/goocanvasutils.c
index 4c831a6..5a49b41 100644
--- a/src/goocanvasutils.c
+++ b/src/goocanvasutils.c
@@ -413,8 +413,8 @@ goo_canvas_line_dash_new (gint num_dashes,
/**
* goo_canvas_line_dash_newv:
* @num_dashes: the number of dashes and gaps in the pattern.
- * @dashes: a g_new-allocated vector of doubles, the length of each
- * dash and gap.
+ * @dashes: (array length=num_dashes) (transfer full): a g_new-allocated vector
+ * of doubles, the length of each dash and gap.
*
* Creates a new dash pattern. Takes ownership of the @dashes vector.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]