Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "canvas.h"
- #include "shapes.h"
- #include <cassert>
- #include <iostream>
- std::unique_ptr<Texture> MakeTextureSolid(Size size, char pixel) {
- Image image(size.height, std::string(size.width, pixel));
- return std::make_unique<Texture>(move(image));
- }
- int main() {
- Canvas canvas({15, 15});
- canvas.AddShape(ShapeType::RECTANGLE, {10, 10}, {40, 30},MakeTextureSolid({3, 1000}, '*'));
- canvas.Print(std::cout);
- }
- #################
- # #
- # #
- # #
- # #
- # #
- # #
- # #
- # #
- # #
- # #
- # ***..#
- # ***..#
- # ***..#
- # ***..#
- # ***..#
- #################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement