Skip to content

Commit

Permalink
Update hello_world_png.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Nov 11, 2023
1 parent d0bd68b commit 25e0356
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <xtd/diagnostics/process>
#include <xtd/drawing/bitmap>
#include <xtd/drawing/brushes>
#include <xtd/drawing/graphics>
#include <xtd/drawing/system_fonts>
#include <xtd/io/path>

Expand All @@ -15,7 +14,7 @@ auto main()->int {
auto graphics = graphics::from_image(hello_world_bitmap);
graphics.draw_string("Hello World!", {system_fonts::default_font(), 32, font_style::bold | font_style::italic}, solid_brush {color::dark(color::spring_green, 2.0 / 3)}, rectangle::offset({{0, 0}, hello_world_bitmap.size()}, {2, 2}), string_format {}.alignment(string_alignment::center).line_alignment(string_alignment::center));
graphics.draw_string("Hello World!", {system_fonts::default_font(), 32, font_style::bold | font_style::italic}, brushes::spring_green(), rectangle::inflate({{0, 0}, hello_world_bitmap.size()}, {-2, -2}), string_format {}.alignment(string_alignment::center).line_alignment(string_alignment::center));
auto hello_world_png_path = path::combine(path::get_temp_path(), "hello_world_png.png");
hello_world_bitmap.save(hello_world_png_path);
process::start(hello_world_png_path);
auto hello_world_path = path::combine(path::get_temp_path(), "hello_world.png");
hello_world_bitmap.save(hello_world_path);
process::start(hello_world_path);
}

0 comments on commit 25e0356

Please sign in to comment.