Shows how to use xtd::drawing::graphics class.
#include <xtd/xtd>
using namespace std;
auto main()->int {
auto graphics = graphics::from_image(bitmap);
graphics.
fill_polygon(
linear_gradient_brush(
rectangle {bitmap.
width() / 2 - 160, bitmap.
height() - 300, 320, 120}, color::brown, color::sandy_brown, linear_gradient_mode::backward_diagonal), vector<point> {{bitmap.
width() / 2, bitmap.
height() - 300}, {bitmap.
width() / 2 + 160, bitmap.
height() - 180}, {bitmap.
width() / 2 - 160, bitmap.
height() - 180},});
bitmap.
save(path::combine(path::get_temp_path(),
"graphics.png"));
process::start(path::combine(path::get_temp_path(), "graphics.png"));
}