Няма описание

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #include "drawingWindow.h"
  2. /// \fn void DrawingWindow::box(int x, int y, int sideLength, QColor c)
  3. /// \~English
  4. /// \brief Draws a box with sides of size sideLength
  5. /// \param x initial x coordinate of the box
  6. /// \param y initial y coordinate of the box
  7. /// \param sideLength length of the sides of the box
  8. /// \param c color of the box
  9. /// \~Spanish
  10. /// \brief Dibuja una caja con los lados del tamano sideLength
  11. /// \param x coordenada inicial x de la caja
  12. /// \param y coordenada inicial y de la caja
  13. /// \param sideLength largo de los lados de la caja
  14. /// \param c color de la caja
  15. void DrawingWindow::box(int x, int y, int sideLength, QColor c) {
  16. addLine(x,y,x+sideLength,y,1,c);
  17. addLine(x+sideLength,y,x+sideLength,y+sideLength,1,c);
  18. addLine(x+sideLength,y+sideLength,x,y+sideLength,1,c);
  19. addLine(x,y+sideLength,x,y,1,c);
  20. }
  21. /// \fn void DrawingWindow::boxes(int x, int y, int sideLength, double shrinkFactor, int smallestLength, QColor c)
  22. /// \~English
  23. /// \brief Recursive function that draws smaller boxes inside the four
  24. /// corners of the boxes.
  25. /// \param x initial coordinate x
  26. /// \param y initial coordinate y
  27. /// \param sideLength length of the sides of the box
  28. /// \param shrinkFactor factor to decreese the sideLength in
  29. /// the recursion for the interior boxes
  30. /// \param smallestLength smallest length of the size of the
  31. /// side of the boxes
  32. /// \param c color of the boxes
  33. /// \~Spanish
  34. /// \brief Funcion recursiva que dibuja cajas mas pequenas dentro de las cuatro
  35. /// esquenas de las cajas.
  36. /// \param x coordenada inicial x
  37. /// \param y coordenada inicial y
  38. /// \param sideLength largo de los lados de la caja
  39. /// \param shrinkFactor factor para disminuir el tamano de los lados en
  40. /// la recursion para las cajas interiores
  41. /// \param smallestLength largo mas pequeno de el tamano de el
  42. /// lado de las cajas
  43. /// \param c color de las cajas
  44. void DrawingWindow::boxes(int x, int y, int sideLength, double shrinkFactor, int smallestLength, QColor c) {
  45. // YOUR CODE HERE
  46. }