Browse Source

Correcciones gramaticales

SaraB 7 years ago
parent
commit
25e7490be1
5 changed files with 21 additions and 19 deletions
  1. 1
    1
      Filter.cpp
  2. 7
    6
      ImageScrambler.cpp
  3. 10
    8
      ImageScrambler.h
  4. 2
    3
      README-en.md
  5. 1
    1
      README-es.md

+ 1
- 1
Filter.cpp View File

@@ -3,7 +3,7 @@
3 3
 
4 4
 
5 5
 // Given an image and two rectangles defined by the x,y locations of their
6
-// upperleft pixels and their height, width, swaps the pixels in those rectangles.
6
+// upperleft pixels and their height and width, the function swaps the pixels in those rectangles.
7 7
 // For example, for an image I with height and width of 100. The following invocation
8 8
 // swaps the top and bottom halves of the image:
9 9
 // cropSwap(I, 0, 0, 0, 50, 100, 50)

+ 7
- 6
ImageScrambler.cpp View File

@@ -18,19 +18,19 @@ ImageScrambler::ImageScrambler(QWidget *parent) :
18 18
     // KEYBOARD SHORTCUTS
19 19
     // ATAJOS DEL KEYBOARD
20 20
 
21
-    // Loads a image with cmd + o
21
+    // Loads an image with cmd + o
22 22
     // Carga una imagen con cmd + o
23 23
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_O), this, SLOT(on_btnLoadNewImage_clicked()));
24
-    // Saves a image with cmd + s
24
+    // Saves an image with cmd + s
25 25
     // Guarda una imagen con cmd + s
26 26
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_S), this, SLOT(on_btnSave_clicked()));
27 27
     // Closes window with cmd + w
28 28
     // Cierra la ventana con cmd + w
29 29
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this, SLOT(close()));
30
-    // Scramble a image with cmd + e
30
+    // Scrambles an image with cmd + e
31 31
     // Revuelve una imagen con cmd + e
32 32
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_E), this, SLOT(on_btnScrambleImage_clicked()));
33
-    // Restore the image with cmd + d
33
+    // Restores the image with cmd + d
34 34
     // Restaura la imagen con cmd + d
35 35
     new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_D), this, SLOT(on_btnDescrambleImage_clicked()));
36 36
     ui->btnDescrambleImage->setEnabled(false);
@@ -49,7 +49,7 @@ ImageScrambler::~ImageScrambler()
49 49
 
50 50
 /// \fn void ImageScrambler::on_btnLoadNewImage_clicked()
51 51
 /// \~English
52
-/// \brief Function display a file browsing window to load an image into the GUI
52
+/// \brief Function that displays a browsing window file to load an image into the GUI
53 53
 /// \~Spanish
54 54
 /// \brief Funcion que despliega una ventana de busqueda de archivos para cargar
55 55
 /// una imagen en el GUI.
@@ -89,6 +89,7 @@ void ImageScrambler::on_btnSave_clicked(){
89 89
 void ImageScrambler::on_btnScrambleImage_clicked(){
90 90
 
91 91
     //Call Scramble to scramble the image
92
+    //Llamar Scramble para revolver la imagen
92 93
     scrambleDepth = ui->scrambleDepth->value() ;
93 94
     scrambledImage = ScrambleFilter(originalImage, scrambleDepth, 0, 0, originalImage.width(),originalImage.height());
94 95
     ui->lblScrambleImage->setPixmap(QPixmap::fromImage(scrambledImage));
@@ -98,7 +99,7 @@ void ImageScrambler::on_btnScrambleImage_clicked(){
98 99
 
99 100
 /// \fn void ImageScrambler::on_btnDescrambleImage_clicked()
100 101
 /// \~English
101
-/// \brief Function that restore the scrambled image to the original image.
102
+/// \brief Function that restores the scrambled image to the original image.
102 103
 /// \~Spanish
103 104
 /// \brief Funcion que restaura la imagen revuelta a la imagen original.
104 105
 void ImageScrambler::on_btnDescrambleImage_clicked(){

+ 10
- 8
ImageScrambler.h View File

@@ -34,8 +34,8 @@ public:
34 34
 
35 35
     /// \fn void ImageScrambler::cropSwap(QImage &img, int x0, int y0, int x1, int y1, int width, int height )
36 36
     /// \~English
37
-    /// \brief Funtion that crop two squares of equal size of an image or sub image and swaps them.
38
-    /// The funtion receives two coords (x0, y0) and (x1, y1)  and a width and a height. Then swaps pixel
37
+    /// \brief Function that crops two squares of equal size of an image or sub image and swaps them.
38
+    /// The function receives two coords (x0, y0) and (x1, y1)  and a width and a height. Then swaps pixel
39 39
     /// by pixel the square formed from the top left coordinate (x0, y0) to the bottom right coordinate (x0+width, y0+height)
40 40
     /// with the square formed from the top left coordinate (x1, y1) to the bottom right (x1+width, y1+height).
41 41
     /// \param image Reference to the image to swap the squares.
@@ -61,7 +61,7 @@ public:
61 61
 
62 62
     /// \fn QImage ImageScrambler::ScrambleFilter(QImage image, int N, int sw, int sh, int width, int height)
63 63
     /// \~English
64
-    /// \brief Funtion that recursively scrambles an images by dividing the image in squares (sub images)
64
+    /// \brief Function that recursively scrambles an image by dividing the image in squares (sub images)
65 65
     /// and then swapping them.  The first step the program does is divide the image in two or four squares
66 66
     /// and swap the squares, the resulting image is divided in four squares and then the same steps are applied
67 67
     /// recursively to each of the four squares.
@@ -74,10 +74,10 @@ public:
74 74
     /// \return the scrambled image
75 75
     /// \~Spanish
76 76
     /// \brief Funcion que recursivamente revuelve una imagen dividiendola en cuadrados (sub imagenes)
77
-    /// y luego intercambiandolas.  El primer paso que el programa hace es dividir la imagen en two o cuatro cuadrados
78
-    /// e intercambia los cuadrados, el resultado de la imagen se divide en cuatros cuadros y cada uno de los cuadros
77
+    /// y luego intercambiandolas.  El primer paso que el programa hace es dividir la imagen en dos o cuatro cuadrados
78
+    /// e intercambia los cuadrados. El resultado de la imagen se divide en cuatros cuadros y cada uno de los cuadros
79 79
     /// se le aplican los mismos pasos recursivamente.
80
-    /// \param image The image a revolver
80
+    /// \param image La imagen a revolver
81 81
     /// \param level La profundidad de la recursion. La imagen se revolvera en 4^N cuadrados.
82 82
     /// \param sx La coordenada arriba izquierda x inicial de la imagen o sub imagen a dividir.
83 83
     /// \param sy La coordenada arriba izquierda y inicial de la imagen o sub imagen a dividir.
@@ -90,7 +90,7 @@ private slots:
90 90
 
91 91
     /// \fn void ImageScrambler::on_btnLoadNewImage_clicked()
92 92
     /// \~English
93
-    /// \brief Function display a file browsing window to load an image into the GUI
93
+    /// \brief Function that displays a browsing window file to load an image into the GUI
94 94
     /// \~Spanish
95 95
     /// \brief Funcion que despliega una ventana de busqueda de archivos para cargar
96 96
     /// una imagen en el GUI.
@@ -114,7 +114,7 @@ private slots:
114 114
 
115 115
     /// \fn void ImageScrambler::on_btnDescrambleImage_clicked()
116 116
     /// \~English
117
-    /// \brief Function that restore the scrambled image to the original image.
117
+    /// \brief Function that restores the scrambled image to the original image.
118 118
     /// \~Spanish
119 119
     /// \brief Funcion que restaura la imagen revuelta a la imagen original.
120 120
     void on_btnDescrambleImage_clicked();
@@ -150,7 +150,9 @@ private slots:
150 150
 private:
151 151
     Ui::ImageScrambler *ui;
152 152
     QImage originalImage;  //This will hold the original image.
153
+			   //Esto aguantará la imagen original.
153 154
     QImage scrambledImage; //This will hold the encrypted image.
155
+			   //Esto aguantará la imagen cifrado .
154 156
     int scrambleDepth ;
155 157
 };
156 158
 

+ 2
- 3
README-en.md View File

@@ -4,7 +4,6 @@
4 4
 ![main2.png](images/main2-small.png)
5 5
 ![main3.png](images/main3-small.png)
6 6
 
7
-[Verano 2016 - Ive - Coralys]
8 7
 
9 8
 One commonly used programming technique is *recursion*. With this technique, problems are solved by solving similar problems, but for smaller cases. We can build sets of objects or tasks using *recursive rules* and *initial values*. *Recursive functions* are functions that are self-invoking, using smaller sets or elements each time, until reaching a point where the initial value is used instead of self-invoking. In this laboratory experience, you will practice the definition and implementation of recursive functions to scramble an image and make it incomprehensible.
10 9
 
@@ -182,9 +181,9 @@ Write the pseudocode to express the scrambling algorithm described above as a re
182 181
 
183 182
        ---
184 183
 
185
-     The button that says `Scramble Image` is programmed so it invokes a function called `ScramblerFilter`.
184
+     The button that says `Scramble Image` is programmed so it invokes a function called `ScrambleFilter`.
186 185
 
187
-3. Complete the function `ScrambleFIlter` contained in the `Filter.cpp` file so it implements the recursive algorithm to scramble images. The function has the following format:
186
+3. Complete the function `ScrambleFilter` contained in the `Filter.cpp` file so it implements the recursive algorithm to scramble images. The function has the following format:
188 187
 
189 188
      `QImage ImageScrambler::ScrambleFilter(QImage image, int N, int sx, int sy, int width, int height);`
190 189
 

+ 1
- 1
README-es.md View File

@@ -19,7 +19,7 @@ La recursión es una técnica muy utilizada en programación. Con esta técnica
19 19
 
20 20
 Antes de llegar al laboratorio debes:
21 21
 
22
-1. Repasado los conceptos relacionados a funciones recursivas.
22
+1. Haber repasado los conceptos relacionados a funciones recursivas.
23 23
 
24 24
 2. Haber estudiado los conceptos e instrucciones para la sesión de laboratorio.
25 25