diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-10-19 20:03:34 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-10-19 20:03:34 +0000 |
| commit | fa7621c1f6ff4a7203b05f43db348e48da31d211 (patch) | |
| tree | 2a6afca2b861f72494580e72b8a79462e58516f4 | |
| parent | Styling rotate (diff) | |
| parent | Fix bug:1634641 crash on delete (diff) | |
| download | inkscape-fa7621c1f6ff4a7203b05f43db348e48da31d211.tar.gz inkscape-fa7621c1f6ff4a7203b05f43db348e48da31d211.zip | |
Update to trunk
(bzr r15142.1.18)
| -rw-r--r-- | po/it.po | 86 | ||||
| -rw-r--r-- | src/attributes.cpp | 1 | ||||
| -rw-r--r-- | src/attributes.h | 3 | ||||
| -rw-r--r-- | src/display/drawing-shape.cpp | 14 | ||||
| -rw-r--r-- | src/display/drawing-text.cpp | 13 | ||||
| -rw-r--r-- | src/sp-lpe-item.cpp | 2 | ||||
| -rw-r--r-- | src/sp-object.cpp | 2 | ||||
| -rw-r--r-- | src/style-enums.h | 10 | ||||
| -rw-r--r-- | src/style.cpp | 13 | ||||
| -rw-r--r-- | src/style.h | 3 |
10 files changed, 82 insertions, 65 deletions
@@ -9482,13 +9482,12 @@ msgid "Attach path" msgstr "Lega tracciato" #: ../src/live_effects/effect.cpp:150 -#, fuzzy msgid "Fill between strokes" -msgstr "Riempimento e contorni" +msgstr "Riempimento tra 2 tracciati" #: ../src/live_effects/effect.cpp:151 ../src/selection-chemistry.cpp:2906 msgid "Fill between many" -msgstr "" +msgstr "Riempimento tra più tracciati" #: ../src/live_effects/effect.cpp:152 msgid "Ellipse by 5 points" @@ -9887,29 +9886,24 @@ msgid "Defines the direction and magnitude of the extrusion" msgstr "" #: ../src/live_effects/lpe-fill-between-many.cpp:25 -#, fuzzy msgid "Paths from which to take the original path data" -msgstr "Tracciato da cui ottenere i dati tracciato originali" +msgstr "Tracciati da cui ottenere i dati tracciato originali" #: ../src/live_effects/lpe-fill-between-strokes.cpp:24 -#, fuzzy msgid "Second path:" -msgstr "Tracciato di piega:" +msgstr "Secondo tracciato:" #: ../src/live_effects/lpe-fill-between-strokes.cpp:24 -#, fuzzy msgid "Second path from which to take the original path data" -msgstr "Tracciato da cui ottenere i dati tracciato originali" +msgstr "Secondo tracciato da cui ottenere i dati tracciato originali" #: ../src/live_effects/lpe-fill-between-strokes.cpp:25 -#, fuzzy msgid "Reverse Second" -msgstr "Inverti gradiente" +msgstr "Inverti secondo tracciato" #: ../src/live_effects/lpe-fill-between-strokes.cpp:25 -#, fuzzy msgid "Reverses the second path order" -msgstr "Inverti la direzione del gradiente" +msgstr "Inverte la direzione del secondo tracciato" #: ../src/live_effects/lpe-fillet-chamfer.cpp:41 #: ../src/widgets/text-toolbar.cpp:1788 @@ -9962,11 +9956,12 @@ msgstr "Metodo di divisione" #: ../src/live_effects/lpe-fillet-chamfer.cpp:60 #, fuzzy msgid "Radius (unit or %):" -msgstr "Raggio (px):" +msgstr "Raggio (unità o %):" #: ../src/live_effects/lpe-fillet-chamfer.cpp:60 +#, fuzzy msgid "Radius, in unit or %" -msgstr "" +msgstr "Raggio, in unità o %" #: ../src/live_effects/lpe-fillet-chamfer.cpp:61 #, fuzzy @@ -10145,9 +10140,8 @@ msgid "Miter" msgstr "Vivi" #: ../src/live_effects/lpe-jointype.cpp:34 -#, fuzzy msgid "Miter Clip" -msgstr "Spigolosità:" +msgstr "Taglio retto" #. {LINEJOIN_EXTRP_MITER, N_("Extrapolated"), "extrapolated"}, // disabled because doesn't work well #: ../src/live_effects/lpe-jointype.cpp:35 @@ -11002,9 +10996,8 @@ msgid "By number of segments" msgstr "Per numero di segmenti" #: ../src/live_effects/lpe-roughen.cpp:32 -#, fuzzy msgid "By max. segment size" -msgstr "Per lunghezza massima del segmento" +msgstr "Per lunghezza massima segmento" #: ../src/live_effects/lpe-roughen.cpp:38 #, fuzzy @@ -11027,34 +11020,28 @@ msgid "Method" msgstr "Metodo" #: ../src/live_effects/lpe-roughen.cpp:49 -#, fuzzy msgid "Division method" -msgstr "Metodo di divisione:" +msgstr "Metodo di divisione" #: ../src/live_effects/lpe-roughen.cpp:51 -#, fuzzy msgid "Max. segment size" -msgstr "Per lunghezza massima del segmento" +msgstr "Lunghezza massima segmento" #: ../src/live_effects/lpe-roughen.cpp:53 -#, fuzzy msgid "Number of segments" -msgstr "Numero di segmenti:" +msgstr "Numero di segmenti" #: ../src/live_effects/lpe-roughen.cpp:55 -#, fuzzy msgid "Max. displacement in X" -msgstr "Spostamento massimo sulle X (px):" +msgstr "Spostamento massimo sulle X" #: ../src/live_effects/lpe-roughen.cpp:57 -#, fuzzy msgid "Max. displacement in Y" -msgstr "Spostamento massimo sulle Y (px):" +msgstr "Spostamento massimo sulle Y" #: ../src/live_effects/lpe-roughen.cpp:59 -#, fuzzy msgid "Global randomize" -msgstr "visibilmente casuale" +msgstr "Casualità generale" #: ../src/live_effects/lpe-roughen.cpp:61 #, fuzzy @@ -11091,19 +11078,19 @@ msgstr "" #: ../src/live_effects/lpe-roughen.cpp:121 msgid "<b>Add nodes</b> Subdivide each segment" -msgstr "" +msgstr "<b>Aggiungi nodi</b> Suddividi ogni segmento" #: ../src/live_effects/lpe-roughen.cpp:130 msgid "<b>Jitter nodes</b> Move nodes/handles" -msgstr "" +msgstr "<b>Sfalsa nodi</b> Muovi nodi/maniglie" #: ../src/live_effects/lpe-roughen.cpp:139 msgid "<b>Extra roughen</b> Add a extra layer of rough" -msgstr "" +msgstr "<b>Maggior increspatura</b> Aumenta l'irregolarità" #: ../src/live_effects/lpe-roughen.cpp:148 msgid "<b>Options</b> Modify options to rough" -msgstr "" +msgstr "<b>Opzioni</b> Modifica le opzioni di irregolarità" #: ../src/live_effects/lpe-ruler.cpp:25 ../share/extensions/measure.inx.h:27 #: ../share/extensions/restack.inx.h:16 @@ -11244,7 +11231,7 @@ msgstr "" #: ../src/live_effects/lpe-simplify.cpp:30 #, fuzzy msgid "Steps:" -msgstr "_Passi:" +msgstr "Passi:" #: ../src/live_effects/lpe-simplify.cpp:30 #, fuzzy @@ -20859,9 +20846,8 @@ msgid "Button count:" msgstr "Bottone" #: ../src/ui/dialog/input.cpp:1010 -#, fuzzy msgid "Tablet" -msgstr "Tabella" +msgstr "Tablet" #: ../src/ui/dialog/input.cpp:1039 ../src/ui/dialog/input.cpp:1928 msgid "pad" @@ -21131,7 +21117,7 @@ msgstr "Disattiva effetto su tracciato" #: ../src/ui/dialog/lpe-fillet-chamfer-properties.cpp:53 #, fuzzy msgid "Radius (pixels):" -msgstr "Raggio (px):" +msgstr "Raggio (pixel):" #: ../src/ui/dialog/lpe-fillet-chamfer-properties.cpp:65 #, fuzzy @@ -21145,7 +21131,7 @@ msgstr "" #: ../src/ui/dialog/lpe-fillet-chamfer-properties.cpp:137 #, fuzzy msgid "_Modify" -msgstr "Modifica tracciato" +msgstr "_Modifica" #: ../src/ui/dialog/lpe-fillet-chamfer-properties.cpp:201 msgid "Radius" @@ -21819,13 +21805,11 @@ msgid "Parameterized:" msgstr "Parametri:" #: ../src/ui/dialog/polar-arrange-tab.cpp:83 -#, fuzzy msgctxt "Polar arrange tab" msgid "Center X/Y:" msgstr "Centro X/Y:" #: ../src/ui/dialog/polar-arrange-tab.cpp:105 -#, fuzzy msgctxt "Polar arrange tab" msgid "Radius X/Y:" msgstr "Raggio X/Y:" @@ -22232,7 +22216,6 @@ msgid "Set as _default" msgstr "Imposta come _predefinito" #: ../src/ui/dialog/text-edit.cpp:87 -#, fuzzy msgid "AaBbCcIiPpQq12369$€¢?.;/()" msgstr "AaBbCcIiPpQq12369$€¢?.;/()" @@ -25142,7 +25125,6 @@ msgid "CMYK" msgstr "CMYK" #: ../src/ui/widget/filter-effect-chooser.cpp:26 -#, fuzzy msgid "_Blur:" msgstr "Sfocat_ura:" @@ -29285,9 +29267,8 @@ msgstr "Taglia dagli oggetti" #. Width #: ../src/widgets/eraser-toolbar.cpp:151 -#, fuzzy msgid "(no width)" -msgstr "Larghezza zero" +msgstr "(nessuna larghezza)" #: ../src/widgets/eraser-toolbar.cpp:155 msgid "The width of the eraser pen (relative to the visible canvas area)" @@ -31887,7 +31868,6 @@ msgstr "In modalità colore, agisce sulla tonalità dell'oggetto" #. TRANSLATORS: "H" here stands for hue #: ../src/widgets/tweak-toolbar.cpp:291 -#, fuzzy msgctxt "Hue" msgid "H" msgstr "H" @@ -31898,7 +31878,6 @@ msgstr "In modalità colore, agisce sulla saturazione dell'oggetto" #. TRANSLATORS: "S" here stands for Saturation #: ../src/widgets/tweak-toolbar.cpp:307 -#, fuzzy msgctxt "Saturation" msgid "S" msgstr "S" @@ -31909,7 +31888,6 @@ msgstr "In modalità colore, agisce sulla luminosità dell'oggetto" #. TRANSLATORS: "L" here stands for Lightness #: ../src/widgets/tweak-toolbar.cpp:323 -#, fuzzy msgctxt "Lightness" msgid "L" msgstr "L" @@ -31920,7 +31898,6 @@ msgstr "In modalità colore, agisce sull'opacità dell'oggetto" #. TRANSLATORS: "O" here stands for Opacity #: ../src/widgets/tweak-toolbar.cpp:339 -#, fuzzy msgctxt "Opacity" msgid "O" msgstr "O" @@ -31970,19 +31947,16 @@ msgstr "Impossibile elaborare questo oggetto. Convertirlo prima in tracciato." #. report to the Inkscape console using errormsg #: ../share/extensions/draw_from_triangle.py:179 -#, fuzzy msgid "Side Length 'a' (px): " -msgstr "Lunghezza lato a (px):" +msgstr "Lunghezza lato 'a' (px): " #: ../share/extensions/draw_from_triangle.py:180 -#, fuzzy msgid "Side Length 'b' (px): " -msgstr "Lunghezza lato b (px):" +msgstr "Lunghezza lato 'b' (px): " #: ../share/extensions/draw_from_triangle.py:181 -#, fuzzy msgid "Side Length 'c' (px): " -msgstr "Lunghezza lato c (px):" +msgstr "Lunghezza lato 'c' (px): " #: ../share/extensions/draw_from_triangle.py:182 msgid "Angle 'A' (radians): " diff --git a/src/attributes.cpp b/src/attributes.cpp index cc75d94c6..8154bfbbe 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -443,6 +443,7 @@ static SPStyleProp const props[] = { {SP_PROP_PAINT_ORDER, "paint-order" }, {SP_PROP_SOLID_COLOR, "solid-color"}, {SP_PROP_SOLID_OPACITY, "solid-opacity"}, + {SP_PROP_VECTOR_EFFECT, "vector-effect"}, /* CSS Blending/Compositing */ {SP_PROP_MIX_BLEND_MODE, "mix-blend-mode"}, diff --git a/src/attributes.h b/src/attributes.h index ba82c18f1..e21851bcf 100644 --- a/src/attributes.h +++ b/src/attributes.h @@ -451,7 +451,8 @@ enum SPAttributeEnum { SP_PROP_PAINT_ORDER, /* SVG2 */ SP_PROP_SOLID_COLOR, SP_PROP_SOLID_OPACITY, - + SP_PROP_VECTOR_EFFECT, + /* CSS Blending/Compositing */ SP_PROP_MIX_BLEND_MODE, SP_PROP_ISOLATION, diff --git a/src/display/drawing-shape.cpp b/src/display/drawing-shape.cpp index 63efb3c0d..ba95a63ce 100644 --- a/src/display/drawing-shape.cpp +++ b/src/display/drawing-shape.cpp @@ -180,6 +180,10 @@ DrawingShape::_renderStroke(DrawingContext &dc) if( has_stroke ) { // TODO: remove segments outside of bbox when no dashes present dc.path(_curve->get_pathvector()); + if (_style && _style->vector_effect.computed == SP_VECTOR_EFFECT_NON_SCALING_STROKE) { + dc.restore(); + dc.save(); + } _nrstyle.applyStroke(dc); dc.strokePreserve(); dc.newPath(); // clear path @@ -213,7 +217,7 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne } { Inkscape::DrawingContext::Save save(dc); dc.setSource(rgba); - dc.setLineWidth(0.5); + dc.setLineWidth(5); dc.setTolerance(0.5); dc.stroke(); } @@ -230,6 +234,8 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne // we assume the context has no path Inkscape::DrawingContext::Save save(dc); dc.transform(_ctm); + dc.path(_curve->get_pathvector()); + // update fill and stroke paints. // this cannot be done during nr_arena_shape_update, because we need a Cairo context @@ -237,14 +243,16 @@ DrawingShape::_renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigne bool has_fill = _nrstyle.prepareFill(dc, _item_bbox, _fill_pattern); bool has_stroke = _nrstyle.prepareStroke(dc, _item_bbox, _stroke_pattern); has_stroke &= (_nrstyle.stroke_width != 0); - if (has_fill || has_stroke) { // TODO: remove segments outside of bbox when no dashes present - dc.path(_curve->get_pathvector()); if (has_fill) { _nrstyle.applyFill(dc); dc.fillPreserve(); } + if (_style && _style->vector_effect.computed == SP_VECTOR_EFFECT_NON_SCALING_STROKE) { + dc.restore(); + dc.save(); + } if (has_stroke) { _nrstyle.applyStroke(dc); dc.strokePreserve(); diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp index a0918e9f5..1280a2db9 100644 --- a/src/display/drawing-text.cpp +++ b/src/display/drawing-text.cpp @@ -592,17 +592,24 @@ unsigned DrawingText::_renderItem(DrawingContext &dc, Geom::IntRect const &/*are { Inkscape::DrawingContext::Save save(dc); dc.transform(_ctm); - if (has_fill && fill_first) { _nrstyle.applyFill(dc); dc.fillPreserve(); } - + } + { + Inkscape::DrawingContext::Save save(dc); + if (!_style || ! _style->vector_effect.computed == SP_VECTOR_EFFECT_NON_SCALING_STROKE) { + dc.transform(_ctm); + } if (has_stroke) { _nrstyle.applyStroke(dc); dc.strokePreserve(); } - + } + { + Inkscape::DrawingContext::Save save(dc); + dc.transform(_ctm); if (has_fill && !fill_first) { _nrstyle.applyFill(dc); dc.fillPreserve(); diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index f0b46a547..8f0713652 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -588,7 +588,7 @@ bool SPLPEItem::hasBrokenPathEffect() const bool SPLPEItem::hasPathEffect() const { - if (path_effect_list->empty()) { + if (!path_effect_list || path_effect_list->empty()) { return false; } diff --git a/src/sp-object.cpp b/src/sp-object.cpp index cbd7aa969..21d8bcd93 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -485,7 +485,7 @@ void SPObject::_sendDeleteSignalRecursive() { void SPObject::deleteObject(bool propagate, bool propagate_descendants) { sp_object_ref(this, NULL); - if ( SP_IS_LPE_ITEM(this) ) { + if ( SP_IS_LPE_ITEM(this) && SP_LPE_ITEM(this)->hasPathEffect()) { SP_LPE_ITEM(this)->removeAllPathEffects(false); } if (propagate) { diff --git a/src/style-enums.h b/src/style-enums.h index 06207852c..a0fcaedef 100644 --- a/src/style-enums.h +++ b/src/style-enums.h @@ -309,6 +309,10 @@ enum SPTextRendering { SP_CSS_TEXT_RENDERING_GEOMETRICPRECISION }; +enum SPVectorEffect { + SP_VECTOR_EFFECT_NONE, + SP_VECTOR_EFFECT_NON_SCALING_STROKE +}; struct SPStyleEnum { char const *key; @@ -668,6 +672,12 @@ static SPStyleEnum const enum_color_interpolation[] = { {NULL, -1} }; +static SPStyleEnum const enum_vector_effect[] = { + {"none", SP_VECTOR_EFFECT_NONE}, + {"non-scaling-stroke", SP_VECTOR_EFFECT_NON_SCALING_STROKE}, + {NULL, -1} +}; + #endif // SEEN_SP_STYLE_ENUMS_H diff --git a/src/style.cpp b/src/style.cpp index 930e271ad..c513b735d 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -161,6 +161,9 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : solid_color( "solid-color" ), // SPIColor solid_opacity( "solid-opacity", SP_SCALE24_MAX ), + // Vector effects + vector_effect( "vector-effect", enum_vector_effect, SP_VECTOR_EFFECT_NONE, false ), + // Fill properties fill( "fill" ), // SPIPaint fill_opacity( "fill-opacity", SP_SCALE24_MAX ), @@ -331,6 +334,8 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : _properties.push_back( &solid_color ); _properties.push_back( &solid_opacity ); + _properties.push_back( &vector_effect ); + _properties.push_back( &fill ); _properties.push_back( &fill_opacity ); _properties.push_back( &fill_rule ); @@ -427,6 +432,8 @@ SPStyle::SPStyle(SPDocument *document_in, SPObject *object_in) : // _propmap.insert( std::make_pair( solid_color.name, reinterpret_cast<SPIBasePtr>(&SPStyle::solid_color ) ) ); // _propmap.insert( std::make_pair( solid_opacity.name, reinterpret_cast<SPIBasePtr>(&SPStyle::solid_opacity ) ) ); + // _propmap.insert( std::make_pair( vector_effect.name, reinterpret_cast<SPIBasePtr>(&SPStyle::vector_effect ) ) ); + // _propmap.insert( std::make_pair( fill.name, reinterpret_cast<SPIBasePtr>(&SPStyle::fill ) ) ); // _propmap.insert( std::make_pair( fill_opacity.name, reinterpret_cast<SPIBasePtr>(&SPStyle::fill_opacity ) ) ); // _propmap.insert( std::make_pair( fill_rule.name, reinterpret_cast<SPIBasePtr>(&SPStyle::fill_rule ) ) ); @@ -911,6 +918,9 @@ SPStyle::readIfUnset( gint id, gchar const *val ) { case SP_PROP_SOLID_OPACITY: solid_opacity.readIfUnset( val ); break; + case SP_PROP_VECTOR_EFFECT: + vector_effect.readIfUnset( val ); + break; case SP_PROP_FILL: fill.readIfUnset( val ); break; @@ -1624,6 +1634,9 @@ sp_style_unset_property_attrs(SPObject *o) if (style->solid_opacity.set) { repr->setAttribute("solid-opacity", NULL); } + if (style->vector_effect.set) { + repr->setAttribute("vector-effect", NULL); + } if (style->fill.set) { repr->setAttribute("fill", NULL); } diff --git a/src/style.h b/src/style.h index 0e8e34145..c8192f782 100644 --- a/src/style.h +++ b/src/style.h @@ -215,6 +215,9 @@ public: /** solid-opacity */ SPIScale24 solid_opacity; + /** vector effect */ + SPIEnum vector_effect; + /** fill */ SPIPaint fill; /** fill-opacity */ |
