From 95201a39509c3e9c938f0181c1cb7f9b5d5eca44 Mon Sep 17 00:00:00 2001 From: kimci86 Date: Wed, 22 Jun 2022 23:54:29 +0200 Subject: [PATCH] Update Image code example with Vector2u parameters --- include/SFML/Graphics/Image.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/SFML/Graphics/Image.hpp b/include/SFML/Graphics/Image.hpp index a9e3b615..6ec8db1b 100644 --- a/include/SFML/Graphics/Image.hpp +++ b/include/SFML/Graphics/Image.hpp @@ -317,16 +317,16 @@ private: /// /// // Create a 20x20 image filled with black color /// sf::Image image; -/// image.create(20, 20, sf::Color::Black); +/// image.create({20, 20}, sf::Color::Black); /// -/// // Copy image1 on image2 at position (10, 10) -/// if (!image.copy(background, 10, 10)) +/// // Copy background on image at position (10, 10) +/// if (!image.copy(background, {10, 10})) /// return -1; /// /// // Make the top-left pixel transparent -/// sf::Color color = image.getPixel(0, 0); +/// sf::Color color = image.getPixel({0, 0}); /// color.a = 0; -/// image.setPixel(0, 0, color); +/// image.setPixel({0, 0}, color); /// /// // Save the image to a file /// if (!image.saveToFile("result.png"))