cepxuozab

ImgCow

Mar 7th, 2025
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.96 KB | None | 0 0
  1. void ImageCoW(){
  2.      
  3.       cout << Tile::GetInstanceCount() << endl;
  4.       auto side = Tile::SIZE;
  5.      
  6.       const Size size{side * 2 + 3, side * 2 + 5};
  7.       const char color = 'g';
  8.      
  9.       Image img(size, color);
  10.       cout << Tile::GetInstanceCount() << endl;
  11.      
  12.       char new_color = 'n';
  13.      
  14.       img.SetPixel({0, 0}, new_color);
  15.       cout << Tile::GetInstanceCount() << endl;
  16.       img.SetPixel({1, 1}, new_color);
  17.       cout << Tile::GetInstanceCount() << endl;
  18.      
  19.       img.SetPixel({side + 2, 0}, new_color);
  20.       cout << Tile::GetInstanceCount() << endl;
  21.      
  22.       img.SetPixel({0, side + 2}, new_color);
  23.       cout << Tile::GetInstanceCount() << endl;
  24.      
  25.       img.SetPixel({side + 3, side + 2}, new_color);
  26.       cout << Tile::GetInstanceCount() << endl;
  27.      
  28.       Image img2 = img;
  29.       cout << Tile::GetInstanceCount() << endl;
  30.      
  31.       img2.SetPixel({side + 1, side + 1}, new_color);
  32.       cout << Tile::GetInstanceCount() << endl;
  33.      
  34.       Print(img, cout);
  35.       Print(img2, cout);
  36.      
  37.     }
  38.  
  39. 0
  40. 1
  41. 2
  42. 2
  43. 3
  44. 4
  45. 5
  46. 5
  47. 6
  48. ngggggggggngggggggg
  49. gnggggggggggggggggg
  50. ggggggggggggggggggg
  51. ggggggggggggggggggg
  52. ggggggggggggggggggg
  53. ggggggggggggggggggg
  54. ggggggggggggggggggg
  55. ggggggggggggggggggg
  56. ggggggggggggggggggg
  57. ggggggggggggggggggg
  58. nggggggggggnggggggg
  59. ggggggggggggggggggg
  60. ggggggggggggggggggg
  61. ggggggggggggggggggg
  62. ggggggggggggggggggg
  63. ggggggggggggggggggg
  64. ggggggggggggggggggg
  65. ggggggggggggggggggg
  66. ggggggggggggggggggg
  67. ggggggggggggggggggg
  68. ggggggggggggggggggg
  69. ngggggggggngggggggg
  70. gnggggggggggggggggg
  71. ggggggggggggggggggg
  72. ggggggggggggggggggg
  73. ggggggggggggggggggg
  74. ggggggggggggggggggg
  75. ggggggggggggggggggg
  76. ggggggggggggggggggg
  77. ggggggggggggggggggg
  78. gggggggggnggggggggg
  79. nggggggggggnggggggg
  80. ggggggggggggggggggg
  81. ggggggggggggggggggg
  82. ggggggggggggggggggg
  83. ggggggggggggggggggg
  84. ggggggggggggggggggg
  85. ggggggggggggggggggg
  86. ggggggggggggggggggg
  87. ggggggggggggggggggg
  88. ggggggggggggggggggg
  89. ggggggggggggggggggg
Add Comment
Please, Sign In to add comment