summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2014-09-02 12:17:40 +0000
committer~suv <suv-sf@users.sourceforge.net>2014-09-02 12:17:40 +0000
commit78ff0bee3e358adf1051d4037c4043cc223d5afe (patch)
treea23ed22cc7a5272585141a60afce42e2654458e1 /src
parentupdate to trunk (r13532) (diff)
parentconfigure.ac: Quell warnings about AM_PROG_AR when using automake 1.12 (diff)
downloadinkscape-78ff0bee3e358adf1051d4037c4043cc223d5afe.tar.gz
inkscape-78ff0bee3e358adf1051d4037c4043cc223d5afe.zip
update to trunk (r13540)
(bzr r13398.1.9)
Diffstat (limited to 'src')
-rw-r--r--src/prefix.cpp2
-rw-r--r--src/prefix.h2
-rw-r--r--src/sp-item.cpp20
-rw-r--r--src/ui/dialog/aboutbox.cpp18
-rw-r--r--src/ui/dialog/document-properties.cpp10
-rw-r--r--src/ui/tools/node-tool.cpp38
6 files changed, 55 insertions, 35 deletions
diff --git a/src/prefix.cpp b/src/prefix.cpp
index 126d16a72..dd8872a1d 100644
--- a/src/prefix.cpp
+++ b/src/prefix.cpp
@@ -192,7 +192,7 @@ br_locate_prefix (void *symbol)
* br_prepend_prefix (&argc, "/share/foo/data.png"); --> Returns "/usr/share/foo/data.png"
*/
char *
-br_prepend_prefix (void *symbol, char *path)
+br_prepend_prefix (void *symbol, char const *path)
{
char *tmp, *newpath;
diff --git a/src/prefix.h b/src/prefix.h
index af96fa746..7c5a1fd3c 100644
--- a/src/prefix.h
+++ b/src/prefix.h
@@ -80,7 +80,7 @@ extern "C" {
const char *br_thread_local_store (char *str);
char *br_locate (void *symbol);
char *br_locate_prefix (void *symbol);
-char *br_prepend_prefix (void *symbol, char *path);
+char *br_prepend_prefix (void *symbol, char const *path);
#endif /* ENABLE_BINRELOC */
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index 428f9555e..19dc71785 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -234,9 +234,13 @@ void SPItem::setCenter(Geom::Point const &object_centre) {
document->ensureUpToDate();
// Copied from DocumentProperties::onDocUnitChange()
- gdouble viewscale_w = this->document->getWidth().value("px") / this->document->getRoot()->viewBox.width();
- gdouble viewscale_h = this->document->getHeight().value("px")/ this->document->getRoot()->viewBox.height();
- gdouble viewscale = std::min(viewscale_h, viewscale_w);
+ gdouble viewscale = 1.0;
+ Geom::Rect vb = this->document->getRoot()->viewBox;
+ if ( !vb.hasZeroArea() ) {
+ gdouble viewscale_w = this->document->getWidth().value("px") / vb.width();
+ gdouble viewscale_h = this->document->getHeight().value("px")/ vb.height();
+ viewscale = std::min(viewscale_h, viewscale_w);
+ }
// FIXME this is seriously wrong
Geom::OptRect bbox = desktopGeometricBounds();
@@ -267,9 +271,13 @@ Geom::Point SPItem::getCenter() const {
document->ensureUpToDate();
// Copied from DocumentProperties::onDocUnitChange()
- gdouble viewscale_w = this->document->getWidth().value("px") / this->document->getRoot()->viewBox.width();
- gdouble viewscale_h = this->document->getHeight().value("px")/ this->document->getRoot()->viewBox.height();
- gdouble viewscale = std::min(viewscale_h, viewscale_w);
+ gdouble viewscale = 1.0;
+ Geom::Rect vb = this->document->getRoot()->viewBox;
+ if ( !vb.hasZeroArea() ) {
+ gdouble viewscale_w = this->document->getWidth().value("px") / vb.width();
+ gdouble viewscale_h = this->document->getHeight().value("px")/ vb.height();
+ viewscale = std::min(viewscale_h, viewscale_w);
+ }
// FIXME this is seriously wrong
Geom::OptRect bbox = desktopGeometricBounds();
diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp
index a66855b2a..f3cffa244 100644
--- a/src/ui/dialog/aboutbox.cpp
+++ b/src/ui/dialog/aboutbox.cpp
@@ -254,6 +254,7 @@ void AboutBox::initStrings() {
"Nicholas Bishop\n"
"Joshua L. Blocher\n"
"Hanno Böck\n"
+"Tomasz Boczkowski\n"
"Henrik Bohre\n"
"Boldewyn\n"
"Daniel Borgmann\n"
@@ -270,6 +271,7 @@ void AboutBox::initStrings() {
"Gail Carmichael\n"
"Ed Catmur\n"
"Chema Celorio\n"
+"Jabiertxo Arraiza Cenoz\n"
"Johan Ceuppens\n"
"Zbigniew Chyla\n"
"Alexander Clausen\n"
@@ -311,6 +313,7 @@ void AboutBox::initStrings() {
"Hannes Hochreiner\n"
"Thomas Holder\n"
"Joel Holdsworth\n"
+"Christoffer Holmstedt\n"
"Alan Horkan\n"
"Karl Ove Hufthammer\n"
"Richard Hughes\n"
@@ -319,6 +322,7 @@ void AboutBox::initStrings() {
"Thomas Ingham\n"
"Jean-Olivier Irisson\n"
"Bob Jamison\n"
+"Ted Janeczko\n"
"jEsuSdA\n"
"Fernando Lucchesi Bastos Jurema\n"
"Lauris Kaplinski\n"
@@ -342,7 +346,9 @@ void AboutBox::initStrings() {
"Aurel-Aimé Marmion\n"
"Colin Marquardt\n"
"Craig Marshall\n"
+"Ivan Masár\n"
"Dmitry G. Mastrukov\n"
+"David Mathog\n"
"Matiphas\n"
"Michael Meeks\n"
"Federico Mena\n"
@@ -360,8 +366,10 @@ void AboutBox::initStrings() {
"Nick\n"
"Andreas Nilsson\n"
"Mitsuru Oka\n"
+"Vinícius dos Santos Oliveira\n"
"Martin Owens\n"
"Alvin Penner\n"
+"Matthew Petroff\n"
"Jon Phillips\n"
"Zdenko Podobny\n"
"Alexandre Prokoudine\n"
@@ -398,6 +406,8 @@ void AboutBox::initStrings() {
"Joakim Verona\n"
"Lucas Vieites\n"
"Daniel Wagenaar\n"
+"Liam P. White\n"
+"Sebastian Wüst\n"
"Michael Wybrow\n"
"Gellule Xg\n"
"Daniel Yacob\n"
@@ -482,6 +492,7 @@ void AboutBox::initStrings() {
"Elias Norberg <elno0959 at student.su.se>, 2009.\n"
"Equipe de Tradução Inkscape Brasil <www.inkscapebrasil.org>, 2007.\n"
"Fatih Demir <kabalak@gtranslator.org>, 2000.\n"
+"Firas Hanife <FirasHanife@gmail.com>, 2014.\n"
"Foppe Benedictus <foppe.benedictus@gmail.com>, 2007-2009.\n"
"Francesc Dorca <f.dorca@filnet.es>, 2003. Traducció sodipodi.\n"
"Francisco Javier F. Serrador <serrador@arrakis.es>, 2003.\n"
@@ -493,8 +504,9 @@ void AboutBox::initStrings() {
"Hizkuntza Politikarako Sailburuordetza <hizkpol@ej-gv.es>, 2005.\n"
"Ilia Penev <lichopicho@gmail.com>, 2006.\n"
"Ivan Masár <helix84@centrum.sk>, 2006-2010. \n"
+"Ivan Řihošek <irihosek@seznam.cz>, 2014.\n"
"Iñaki Larrañaga <dooteo@euskalgnu.org>, 2006.\n"
-"Jānis Eisaks <jancs@dv.lv>, 2012, 2013.\n"
+"Jānis Eisaks <jancs@dv.lv>, 2012-2014.\n"
"Jeffrey Steve Borbón Sanabria <jeff_kerokid@yahoo.com>, 2005.\n"
"Jesper Öqvist <jesper@llbit.se>, 2010, 2011.\n"
"Joaquim Perez i Noguer <noguer@gmail.com>, 2008-2009.\n"
@@ -516,7 +528,7 @@ void AboutBox::initStrings() {
"Kingsley Turner <kingsley@maddogsbreakfast.com.au>, 2006.\n"
"Kitae <bluetux@gmail.com>, 2006.\n"
"Kjartan Maraas <kmaraas@gnome.org>, 2000-2002.\n"
-"Kris De Gussem <Kris.DeGussem@gmail.com>, 2008-2013.\n"
+"Kris De Gussem <Kris.DeGussem@gmail.com>, 2008-2014.\n"
"Lauris Kaplinski <lauris@ariman.ee>, 2000.\n"
"Leandro Regueiro <leandro.regueiro@gmail.com>, 2006-2008, 2010.\n"
"Liu Xiaoqin <liuxqsmile@gmail.com>, 2008.\n"
@@ -536,7 +548,7 @@ void AboutBox::initStrings() {
"Muhammad Bashir Al-Noimi <mhdbnoimi@gmail.com>, 2008.\n"
"Myckel Habets <myckel@sdf.lonestar.org>, 2008.\n"
"Nguyen Dinh Trung <nguyendinhtrung141@gmail.com>, 2007, 2008.\n"
-"Nicolas Dufour <nicoduf@yahoo.fr>, 2008-2013.\n"
+"Nicolas Dufour <nicoduf@yahoo.fr>, 2008-2014.\n"
"Pawan Chitrakar <pchitrakar@gmail.com>, 2006.\n"
"Przemysław Loesch <p_loesch@poczta.onet.pl>, 2005.\n"
"Quico Llach <quico@softcatala.org>, 2000. Traducció sodipodi.\n"
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 4e4616724..2757a0ec9 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -1736,9 +1736,13 @@ void DocumentProperties::onDocUnitChange()
prefs->setBool("/options/transform/gradient", true);
{
ShapeEditor::blockSetItem(true);
- gdouble viewscale_w = doc->getWidth().value("px")/doc->getRoot()->viewBox.width();
- gdouble viewscale_h = doc->getHeight().value("px")/doc->getRoot()->viewBox.height();
- gdouble viewscale = std::min(viewscale_h, viewscale_w);
+ gdouble viewscale = 1.0;
+ Geom::Rect vb = doc->getRoot()->viewBox;
+ if ( !vb.hasZeroArea() ) {
+ gdouble viewscale_w = doc->getWidth().value("px") / vb.width();
+ gdouble viewscale_h = doc->getHeight().value("px")/ vb.height();
+ viewscale = std::min(viewscale_h, viewscale_w);
+ }
gdouble scale = Inkscape::Util::Quantity::convert(1, old_doc_unit, doc_unit);
doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(-viewscale*doc->getRoot()->viewBox.min()[Geom::X] +
(doc->getWidth().value("px") - viewscale*doc->getRoot()->viewBox.width())/2,
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index 0778e3f3f..4be547506 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -298,27 +298,23 @@ void NodeTool::update_helperpath () {
if (SP_IS_LPE_ITEM(selection->singleItem())) {
Inkscape::LivePathEffect::Effect *lpe = SP_LPE_ITEM(selection->singleItem())->getCurrentLPE();
if (lpe && lpe->isVisible()/* && lpe->showOrigPath()*/) {
- if (lpe) {
- SPCurve *c = new SPCurve();
- SPCurve *cc = new SPCurve();
- std::vector<Geom::PathVector> cs = lpe->getCanvasIndicators(SP_LPE_ITEM(selection->singleItem()));
- for (std::vector<Geom::PathVector>::iterator p = cs.begin(); p != cs.end(); ++p) {
- cc->set_pathvector(*p);
- c->append(cc, false);
- cc->reset();
- }
- if (!c->is_empty()) {
- c->transform(selection->singleItem()->i2dt_affine());
- SPCanvasItem *helperpath = sp_canvas_bpath_new(sp_desktop_tempgroup(this->desktop), c);
- sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(helperpath),
- 0x0000ff9A, 1.0,
- SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
- sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(helperpath), 0, SP_WIND_RULE_NONZERO);
- this->helperpath_tmpitem = this->desktop->add_temporary_canvasitem(helperpath,0);
- }
- c->unref();
- cc->unref();
- }
+ SPCurve *c = new SPCurve();
+ SPCurve *cc = new SPCurve();
+ std::vector<Geom::PathVector> cs = lpe->getCanvasIndicators(SP_LPE_ITEM(selection->singleItem()));
+ for (std::vector<Geom::PathVector>::iterator p = cs.begin(); p != cs.end(); ++p) {
+ cc->set_pathvector(*p);
+ c->append(cc, false);
+ cc->reset();
+ }
+ if (!c->is_empty()) {
+ SPCanvasItem *helperpath = sp_canvas_bpath_new(sp_desktop_tempgroup(this->desktop), c);
+ sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(helperpath), 0x0000ff9A, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
+ sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(helperpath), 0, SP_WIND_RULE_NONZERO);
+ sp_canvas_item_affine_absolute(helperpath, selection->singleItem()->i2dt_affine());
+ this->helperpath_tmpitem = this->desktop->add_temporary_canvasitem(helperpath, 0);
+ }
+ c->unref();
+ cc->unref();
}
}
}