[goocanvas/new-api: 6/7] Updated ChangeLog and fixed bug with unscaled lines. Unscaled lines should not be affected if both s
- From: Damon Chaplin <damon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goocanvas/new-api: 6/7] Updated ChangeLog and fixed bug with unscaled lines. Unscaled lines should not be affected if both s
- Date: Thu, 24 Jun 2010 14:54:47 +0000 (UTC)
commit 9e167a6c8c306c02880d9384cd74db1c0bcad3ff
Author: Damon Chaplin <damon gnome org>
Date: Thu Jun 24 15:48:17 2010 +0100
Updated ChangeLog and fixed bug with unscaled lines.
Unscaled lines should not be affected if both scales are < 1.
ChangeLog | 35 +++++++++++++++++++++++++++++++++++
src/goocanvasitemsimple.c | 6 +++++-
2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f30075d..5625c18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,38 @@
+2010-06-24 Damon Chaplin <damon gnome org>
+
+ * Added "line-width-is-unscaled" property to GooCanvasItemSimple
+ to specify that the line does not grow larger as the canvas is
+ zoomed in (though it does shrink when the canvas is shrunk).
+
+ To do this it multiplies the line width by (1 / canvas scale).
+ If the canvas has different x & y scales it uses the maximum, which
+ seems to work OK.
+
+ GnomeCanvas had a similar feature. See also #573456.
+
+2010-06-24 Damon Chaplin <damon gnome org>
+
+ * Added "line-width-tolerance" property to GooCanvasItemSimple.
+ It is added to the line width when doing hit-testing to make it
+ easier to select narrow lines. (It is also added to the line width
+ when calculating the item bounds, since the item bounds must include
+ the area for hit-testing.) #603769
+
+2010-06-24 Damon Chaplin <damon gnome org>
+
+ * Changed from using a cascading style sheet to a simple style object,
+ as the style code was a bit complicated and not that useful.
+
+2010-06-24 Damon Chaplin <damon gnome org>
+
+ * Changed GooCanvasItem from an interface to an abstract base class.
+ Interfaces are a bit awkward to use and a bit slower.
+
+2010-06-24 Damon Chaplin <damon gnome org>
+
+ * Removed the model/view option, as it made the canvas item code
+ too complicated.
+
2010-06-21 Damon Chaplin <damon gnome org>
* Released GooCanvas 1.90.0
diff --git a/src/goocanvasitemsimple.c b/src/goocanvasitemsimple.c
index b042d88..ca51a9b 100644
--- a/src/goocanvasitemsimple.c
+++ b/src/goocanvasitemsimple.c
@@ -1320,7 +1320,11 @@ goo_canvas_item_simple_set_stroke_options (GooCanvasItemSimple *simple,
if (style->line_width_is_unscaled && simple->canvas)
{
scale = MAX (simple->canvas->scale_x, simple->canvas->scale_y);
- line_width /= scale;
+
+ /* We only want to shrink the lines as the canvas is scaled up.
+ We don't want to affect the line width when the scales are < 1. */
+ if (scale > 1.0)
+ line_width /= scale;
}
/* Set the line width. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]