Advertisement
cepxuozab

main wrong picture

Nov 15th, 2024
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include "canvas.h"
  2. #include "shapes.h"
  3.  
  4. #include <cassert>
  5. #include <iostream>
  6.  
  7.  
  8.  
  9.  
  10. std::unique_ptr<Texture> MakeTextureSolid(Size size, char pixel) {
  11.     Image image(size.height, std::string(size.width, pixel));
  12.     return std::make_unique<Texture>(move(image));
  13. }
  14.  
  15.  
  16.  
  17. int main() {
  18.     Canvas canvas({15, 15});
  19.     canvas.AddShape(ShapeType::RECTANGLE, {10, 10}, {40, 30},MakeTextureSolid({3, 1000}, '*'));
  20.     canvas.Print(std::cout);
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement