Mercurial > malikania
comparison examples/image/main.cpp @ 186:16ff680a8a94
Common: move point, line and rectangle, closes #913 @30m
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 20 Oct 2018 21:12:20 +0200 |
parents | 3107ce017c3a |
children | 0a285d62ace7 |
comparison
equal
deleted
inserted
replaced
185:975dffc6567a | 186:16ff680a8a94 |
---|---|
33 auto image = loader.load_image("images/smiley.png"); | 33 auto image = loader.load_image("images/smiley.png"); |
34 auto x = (400 / 2) - (image.get_size().width / 2); | 34 auto x = (400 / 2) - (image.get_size().width / 2); |
35 auto y = (400 / 2) - (image.get_size().height / 2); | 35 auto y = (400 / 2) - (image.get_size().height / 2); |
36 | 36 |
37 window.clear(); | 37 window.clear(); |
38 image.draw(window, mlk::client::point{ | 38 image.draw(window, { |
39 static_cast<int>(x), | 39 static_cast<int>(x), |
40 static_cast<int>(y) | 40 static_cast<int>(y) |
41 }); | 41 }); |
42 window.present(); | 42 window.present(); |
43 | 43 |