summaryrefslogtreecommitdiffstats
path: root/src/ui/tools
diff options
context:
space:
mode:
authorGuiu Rocafort <neandertalspeople@gmail.com>2014-03-05 11:37:27 +0000
committerGuiu Rocafort <neandertalspeople@gmail.com>2014-03-05 11:37:27 +0000
commit9ae7e81723f4ea4e2640ed01d55d94e73874804f (patch)
tree8237509cf0d6dc367c05df52995f195afafd1df7 /src/ui/tools
parentupdate to trunk (diff)
downloadinkscape-9ae7e81723f4ea4e2640ed01d55d94e73874804f.tar.gz
inkscape-9ae7e81723f4ea4e2640ed01d55d94e73874804f.zip
translations from spanish to english done, it might need a little review, but everything seems ok
(bzr r11950.5.1)
Diffstat (limited to 'src/ui/tools')
-rw-r--r--src/ui/tools/freehand-base.cpp23
-rw-r--r--src/ui/tools/node-tool.h3
-rw-r--r--src/ui/tools/pen-tool.cpp67
-rw-r--r--src/ui/tools/pen-tool.h26
-rw-r--r--src/ui/tools/pencil-tool.cpp4
5 files changed, 60 insertions, 63 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp
index cb6111bd5..40a257de9 100644
--- a/src/ui/tools/freehand-base.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -252,7 +252,7 @@ static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item,
if (prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1) {
Effect::createAndApply(SPIRO, dc->desktop->doc(), item);
}
- //spanish: añadimos el modo bspline a los efectos en espera
+ //add the bspline node in the waiting effects
if (prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2) {
Effect::createAndApply(BSPLINE, dc->desktop->doc(), item);
}
@@ -496,9 +496,9 @@ void spdc_concat_colors_and_flush(FreehandBase *dc, gboolean forceclosed)
dc->blue2_curve->reset();
sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(dc->blue2_bpath), NULL);
- //spanish: si c esta vacio, puede ser que se haya tratado de contnuar una curva existente
- //y se haya cancelado. Si es asi y el modo es bspline o spirolive la curva previa necesita volver a ser seleccionada
- //porque la modificamos al continuar por un anchor
+ /* if c is empty, it might be that the user was trying to continue an existing curve and cancelled.
+ if this is the case and we are in bspline or spirolive the previous curve needs to be selected again because
+ we modify it when continuing through an anchor. */
if (c->is_empty()) {
if(prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1 || prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2){
SPDesktop *desktop = dc->desktop;
@@ -527,8 +527,10 @@ void spdc_concat_colors_and_flush(FreehandBase *dc, gboolean forceclosed)
{
// We hit bot start and end of single curve, closing paths
dc->desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Closing path."));
- //spanish: si estamos en modo bspline o spirolive, la curva de continuación y finalización es actualizada al continuar o finalizar la curva en un anchor
- //esto proboca que la función original no detecte si es la misma curva en el caso de curvas con multiples partes -shift- y cierre de manera erronea una de las partes
+
+ /* if we are in bspline or spirolive mode, the continuation and ending curve are updated when continuing or ending the curve in an anchor.
+ this causes that the original function doesn't detect if it's the same curve in case the curves have multiples parts -shift- and
+ close incorrectly one of the parts */
if(prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1 ||
prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2){
if (dc->sa->start && !(dc->sa->curve->is_closed()) ) {
@@ -547,8 +549,8 @@ void spdc_concat_colors_and_flush(FreehandBase *dc, gboolean forceclosed)
c->unref();
dc->sa->curve->closepath_current();
}
- //spanish: Si la curva tiene un LPE del tipo bspline o spiro ejecutamos spdc_flush_white
- //pasándole la curva de inicio necesaria
+
+ //if the curve has an bspline or spiro LPE, we execute spdc_flush_white, passing the necessary starting curve.
if(prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1 ||
prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2){
dc->white_curves = g_slist_remove(dc->white_curves, dc->sa->curve);
@@ -679,9 +681,8 @@ SPDrawAnchor *spdc_test_inside(FreehandBase *dc, Geom::Point p)
}
}
- //spanish: modificamos la curva de anclaje para que sea igual que la curva de inicio.
- //esta curva fue modificada al continuar la curva y necesitamos que sea igual que la curva en
- //la que cerramos el trazado.
+ /* modify the anchoring curve so it is equal to the starting curve.
+ this curve is modified when it's modified and we need them to be equal to the closing curve */
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
if((prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 1 ||
prefs->getInt(tool_name(dc) + "/freehand-mode", 0) == 2) &&
diff --git a/src/ui/tools/node-tool.h b/src/ui/tools/node-tool.h
index 168ec995a..42f89cd1c 100644
--- a/src/ui/tools/node-tool.h
+++ b/src/ui/tools/node-tool.h
@@ -14,7 +14,8 @@
#include <boost/ptr_container/ptr_map.hpp>
#include <glib.h>
#include "ui/tools/tool-base.h"
-//spanish: lo necesitamos para llamarlo desde el Live Effect
+
+// we need it to call it from Live Effect
#include "selection.h"
namespace Inkscape {
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp
index 5846c3cec..bb1a03b7c 100644
--- a/src/ui/tools/pen-tool.cpp
+++ b/src/ui/tools/pen-tool.cpp
@@ -42,7 +42,7 @@
#include "context-fns.h"
#include "tools-switch.h"
#include "ui/control-manager.h"
-//spanish: incluimos los archivos necesarios para las BSpline y Spiro
+// we include the necessary files for BSpline & Spiro
#include "live_effects/effect.h"
#include "live_effects/lpeobject.h"
#include "live_effects/lpeobject-reference.h"
@@ -166,7 +166,7 @@ PenTool::~PenTool() {
void PenTool::setPolylineMode() {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
guint mode = prefs->getInt("/tools/freehand/pen/freehand-mode", 0);
- //spanish: cambiamos los modos para dar cabida al modo bspline
+ // change the nodes to make space for bspline mode
this->polylines_only = (mode == 3 || mode == 4);
this->polylines_paraxial = (mode == 4);
//we call the function which defines the Spiro modes and the BSpline
@@ -178,7 +178,7 @@ void PenTool::setPolylineMode() {
*.Set the mode of draw spiro, and bsplines
*/
void PenTool::_pen_context_set_mode(guint mode) {
- //spanish: definimos los modos
+ // define the nodes
this->spiro = (mode == 1);
this->bspline = (mode == 2);
}
@@ -386,7 +386,7 @@ gint PenTool::_handleButtonPress(GdkEventButton const &bevent) {
if(bevent.button != 3 && (this->spiro || this->bspline) && this->npoints > 0 && this->p[0] == this->p[3]){
this->state = PenTool::STOP;
if( anchor && anchor == this->sa && this->green_curve->is_empty()){
- //spanish Borrar siguiente linea para evitar un nodo encima de otro
+ //remove the following line to avoid having one node on top of another
_finishSegment(event_dt, bevent.state);
_finish( FALSE);
return TRUE;
@@ -512,7 +512,7 @@ gint PenTool::_handleButtonPress(GdkEventButton const &bevent) {
}
}
- //spanish: evitamos la creación de un punto de control para que se cree el nodo en el evento de soltar
+ // avoid the creation of a control point so a node is created in the release event
this->state = (this->spiro || this->bspline || this->polylines_only) ? PenTool::POINT : PenTool::CONTROL;
ret = TRUE;
@@ -705,7 +705,7 @@ gint PenTool::_handleMotionNotify(GdkEventMotion const &mevent) {
default:
break;
}
- //spanish: lanzamos la función "bspline_spiro_motion" al moverse el ratón o cuando se para.
+ // calls the function "bspline_spiro_motion" when the mouse starts or stops moving
if(this->bspline){
this->_bspline_spiro_color();
this->_bspline_spiro_motion(mevent.state & GDK_SHIFT_MASK);
@@ -743,9 +743,7 @@ gint PenTool::_handleButtonRelease(GdkEventButton const &revent) {
// Test whether we hit any anchor.
SPDrawAnchor *anchor = spdc_test_inside(this, event_w);
- //with this we avoid creating a new point over the existing one
- //spanish: si intentamos crear un nodo en el mismo sitio que el origen, paramos.
-
+ // if we try to create a node in the same place as another node, we skip
if((!anchor || anchor == this->sa) && (this->spiro || this->bspline) && this->npoints > 0 && this->p[0] == this->p[3]){
return TRUE;
}
@@ -760,7 +758,7 @@ gint PenTool::_handleButtonRelease(GdkEventButton const &revent) {
p = anchor->dp;
}
this->sa = anchor;
- //spanish: continuamos una curva existente
+ // continue the existing curve
if (anchor) {
if(this->bspline || this->spiro){
this->_bspline_spiro_start_anchor(revent.state & GDK_SHIFT_MASK);;
@@ -790,7 +788,7 @@ gint PenTool::_handleButtonRelease(GdkEventButton const &revent) {
this->_endpointSnap(p, revent.state);
}
this->_finishSegment(p, revent.state);
- //spanish: ocultamos la guia del penultimo nodo al cerrar la curva
+ // hude the guide of the penultimate node when closing the curve
if(this->spiro){
sp_canvas_item_hide(this->c1);
}
@@ -817,7 +815,7 @@ gint PenTool::_handleButtonRelease(GdkEventButton const &revent) {
case PenTool::CLOSE:
this->_endpointSnap(p, revent.state);
this->_finishSegment(p, revent.state);
- //spanish: ocultamos la guia del penultimo nodo al cerrar la curva
+ // hide the penultimate node guide when closing the curve
if(this->spiro){
sp_canvas_item_hide(this->c1);
}
@@ -908,7 +906,7 @@ void PenTool::_redrawAll() {
sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve);
// handles
- //spanish: ocultamos los tiradores en modo bspline y spiro
+ // hide the handlers in bspline and spiro modes
if (this->p[0] != this->p[1] && !this->spiro && !this->bspline) {
SP_CTRL(this->c1)->moveto(this->p[1]);
this->cl1->setCoords(this->p[0], this->p[1]);
@@ -922,7 +920,7 @@ void PenTool::_redrawAll() {
Geom::Curve const * last_seg = this->green_curve->last_segment();
if (last_seg) {
Geom::CubicBezier const * cubic = dynamic_cast<Geom::CubicBezier const *>( last_seg );
- //spanish: ocultamos los tiradores en modo bspline y spiro
+ // hide the handlers in bspline and spiro modes
if ( cubic &&
(*cubic)[2] != this->p[0] && !this->spiro && !this->bspline )
{
@@ -937,9 +935,8 @@ void PenTool::_redrawAll() {
}
}
- //spanish: simplemente redibujamos la spiro.
- //como es un redibujo simplemente no llamamos a la función global sino al final de esta
- //Lanzamos solamente el redibujado
+ // simply redraw the spiro. because its a redrawing, we don't call the global function,
+ // but we call the redrawing at the ending.
this->_bspline_spiro_build();
}
@@ -969,12 +966,12 @@ void PenTool::_lastpointMoveScreen(gdouble x, gdouble y) {
}
void PenTool::_lastpointToCurve() {
- //spanish: evitamos que si la "red_curve" tiene solo dos puntos -recta- no se pare aqui.
+ // avoid that if the "red_curve" contains only two points ( rect ), it doesn't stop here.
if (this->npoints != 5 && !this->spiro && !this->bspline)
return;
Geom::CubicBezier const * cubic;
this->p[1] = this->red_curve->last_segment()->initialPoint() + (1./3)* (Geom::Point)(this->red_curve->last_segment()->finalPoint() - this->red_curve->last_segment()->initialPoint());
- //spanish: modificamos el último segmento de la curva verde para que forme el tipo de nodo que deseamos
+ //modificate the last segment of the green curve so it creates the type of node we need
if(this->spiro||this->bspline){
if(!this->green_curve->is_empty()){
Geom::Point A(0,0);
@@ -1012,7 +1009,7 @@ void PenTool::_lastpointToCurve() {
this->green_curve->append_continuous(previous, 0.0625);
}
}
- //spanish: si el último nodo es una union con otra curva
+ //if the last node is an union with another curve
if(this->green_curve->is_empty() && this->sa && !this->sa->curve->is_empty()){
this->_bspline_spiro_start_anchor(false);
}
@@ -1023,11 +1020,11 @@ void PenTool::_lastpointToCurve() {
void PenTool::_lastpointToLine() {
- //spanish: evitamos que si la "red_curve" tiene solo dos puntos -recta- no se pare aqui.
+ // avoid that if the "red_curve" contains only two points ( rect) it doesn't stop here.
if (this->npoints != 5 && !this->bspline)
return;
- //spanish: modificamos el último segmento de la curva verde para que forme el tipo de nodo que deseamos
+ // modify the last segment of the green curve so the type of node we want is created.
if(this->spiro || this->bspline){
if(!this->green_curve->is_empty()){
Geom::Point A(0,0);
@@ -1059,7 +1056,7 @@ void PenTool::_lastpointToLine() {
this->green_curve->append_continuous(previous, 0.0625);
}
}
- //spanish: si el último nodo es una union con otra curva
+ // if the last node is an union with another curve
if(this->green_curve->is_empty() && this->sa && !this->sa->curve->is_empty()){
this->_bspline_spiro_start_anchor(true);
}
@@ -1248,7 +1245,7 @@ gint PenTool::_handleKeyPress(GdkEvent *event) {
this->p[1] = this->p[0];
}
- //spanish: asignamos el valor a un tercio de distancia del último segmento.
+ // asign the value in a third of the distance of the last segment.
if(this->bspline){
this->p[1] = this->p[0] + (1./3)*(this->p[3] - this->p[0]);
}
@@ -1258,7 +1255,7 @@ gint PenTool::_handleKeyPress(GdkEvent *event) {
: this->p[3]));
this->npoints = 2;
- //spanish: eliminamos el último segmento de la curva verde
+ // delete the last segment of the green curve
if( this->green_curve->get_segment_count() == 1){
this->npoints = 5;
if (this->green_bpaths) {
@@ -1270,7 +1267,7 @@ gint PenTool::_handleKeyPress(GdkEvent *event) {
}else{
this->green_curve->backspace();
}
- //spanish: asignamos el valor de this->p[1] a el opuesto de el ultimo segmento de la línea verde
+ // assign the value of this->p[1] to the oposite of the green line last segment
if(this->spiro){
cubic = dynamic_cast<Geom::CubicBezier const *>(this->green_curve->last_segment());
if ( cubic ) {
@@ -1285,7 +1282,8 @@ gint PenTool::_handleKeyPress(GdkEvent *event) {
this->state = PenTool::POINT;
this->_setSubsequentPoint(pt, true);
pen_last_paraxial_dir = !pen_last_paraxial_dir;
- //spanish: redibujamos
+
+ //redraw
this->_bspline_spiro_build();
ret = TRUE;
}
@@ -1360,9 +1358,7 @@ void PenTool::_setAngleDistanceStatusMessage(Geom::Point const p, int pc_point_t
g_string_free(dist, FALSE);
}
-
-
-//spanish: esta función cambia los colores rojo,verde y azul haciendolos transparentes o no en función de si se usa spiro
+// this function changes the colors red, green and blue making them transparent or not, depending on if spiro is being used.
void PenTool::_bspline_spiro_color()
{
bool remake_green_bpaths = false;
@@ -1736,8 +1732,7 @@ void PenTool::_bspline_spiro_end_anchor_off()
}
}
-
-//spanish: preparates the curves for its trasformation into BSline curves.
+//prepares the curves for its transformation into BSpline curve.
void PenTool::_bspline_spiro_build()
{
if(!this->spiro && !this->bspline)
@@ -1766,7 +1761,7 @@ void PenTool::_bspline_spiro_build()
}
if(!curve->is_empty()){
- //spanish: cerramos la curva si estan cerca los puntos finales de la curva
+ // close the curve if the final points of the curve are close enough
if(Geom::are_near(curve->first_path()->initialPoint(), curve->last_path()->finalPoint())){
curve->closepath_current();
}
@@ -1805,7 +1800,7 @@ void PenTool::_bspline_spiro_build()
void PenTool::_bspline_doEffect(SPCurve * curve)
{
- //spanish: comentado en funcion "doEffect" de src/live_effects/lpe-bspline.cpp
+ // commenting the function doEffect in src/live_effects/lpe-bspline.cpp
if(curve->get_segment_count() < 2)
return;
Geom::PathVector const original_pathv = curve->get_pathvector();
@@ -1945,7 +1940,7 @@ void PenTool::_bspline_doEffect(SPCurve * curve)
}
//Spiro function cloned from lpe-spiro.cpp
-//spanish: comentado en funcion "doEffect" de src/live_effects/lpe-spiro.cpp
+// commenting the function "doEffect" from src/live_effects/lpe-spiro.cpp
void PenTool::_spiro_doEffect(SPCurve * curve)
{
using Geom::X;
@@ -2178,7 +2173,7 @@ void PenTool::_finish(gboolean const closed) {
desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Drawing finished"));
- //spanish para cancelar linea sin un segmento creado
+ // cancelate line without a created segment
this->red_curve->reset();
spdc_concat_colors_and_flush(this, closed);
this->sa = NULL;
diff --git a/src/ui/tools/pen-tool.h b/src/ui/tools/pen-tool.h
index 88e528b22..95565abc9 100644
--- a/src/ui/tools/pen-tool.h
+++ b/src/ui/tools/pen-tool.h
@@ -49,7 +49,7 @@ public:
bool polylines_only;
bool polylines_paraxial;
- //spanish: propiedad que guarda si el modo Spiro está activo o no
+ // propiety which saves if Spiro mode is active or not
bool spiro;
bool bspline;
int num_clicks;
@@ -88,29 +88,29 @@ private:
gint _handleButtonRelease(GdkEventButton const &revent);
gint _handle2ButtonPress(GdkEventButton const &bevent);
gint _handleKeyPress(GdkEvent *event);
- //spanish: añade los modos spiro y bspline
+ //adds spiro & bspline modes
void _pen_context_set_mode(guint mode);
- //spanish: esta función cambia los colores rojo,verde y azul haciendolos transparentes o no en función de si se usa spiro
+ //this function changes the colors red, green and blue making them transparent or not depending on if the function uses spiro
void _bspline_spiro_color();
- //spanish: crea un nodo en modo bspline o spiro
+ //creates a node in bspline or spiro modes
void _bspline_spiro(bool shift);
- //spanish: crea un nodo de modo spiro o bspline
+ //creates a node in bspline or spiro modes
void _bspline_spiro_on();
- //spanish: crea un nodo de tipo CUSP
+ //creates a CUSP node
void _bspline_spiro_off();
- //spanish: continua una curva existente en modo bspline o spiro
+ //continues the existing curve in bspline or spiro mode
void _bspline_spiro_start_anchor(bool shift);
- //spanish: continua una curva exsitente con el nodo de union en modo bspline o spiro
+ //continues the existing curve with the union node in bspline or spiro modes
void _bspline_spiro_start_anchor_on();
- //spanish: continua una curva existente con el nodo de union en modo CUSP
+ //continues an existing curve with the union node in CUSP mode
void _bspline_spiro_start_anchor_off();
- //spanish: modifica la "red_curve" cuando se detecta movimiento
+ //modifies the "red_curve" when it detects movement
void _bspline_spiro_motion(bool shift);
- //spanish: cierra la curva con el último nodo en modo bspline o spiro
+ //closes the curve with the last node in bspline or spiro mode
void _bspline_spiro_end_anchor_on();
- //spanish: cierra la curva con el último nodo en modo CUSP
+ //closes the curve with the last node in CUSP mode
void _bspline_spiro_end_anchor_off();
- //spanish: unimos todas las curvas en juego y llamamos a la función doEffect.
+ //CHECK: join all the curves "in game" and we call doEffect function
void _bspline_spiro_build();
//function bspline cloned from lpe-bspline.cpp
void _bspline_doEffect(SPCurve * curve);
diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp
index bd50672af..1ccdee637 100644
--- a/src/ui/tools/pencil-tool.cpp
+++ b/src/ui/tools/pencil-tool.cpp
@@ -685,7 +685,7 @@ void PencilTool::_interpolate() {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
guint mode = prefs->getInt("/tools/freehand/pencil/freehand-mode", 0);
for (int c = 0; c < n_segs; c++) {
- //spanish: si el modo es BSpline modificamos para que el trazado cree los nodos adhoc
+ // if we are in BSpline we modify the trace to create adhoc nodes
if(mode == 2){
Geom::Point BP = b[4*c+0] + (1./3)*(b[4*c+3] - b[4*c+0]);
BP = Geom::Point(BP[X] + 0.0001,BP[Y] + 0.0001);
@@ -835,7 +835,7 @@ void PencilTool::_fitAndSplit() {
this->red_curve->moveto(b[0]);
using Geom::X;
using Geom::Y;
- //spanish: si el modo es BSpline modificamos para que el trazado cree los nodos adhoc
+ // if we are in BSpline we modify the trace to create adhoc nodes
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
guint mode = prefs->getInt("/tools/freehand/pencil/freehand-mode", 0);
if(mode == 2){