#include <xtd/xtd>
namespace examples {
class form1 :
public form {
public:
form1() {
text(
"Fill rounded rectangle example");
client_size({680, 340});
}
protected:
form::on_paint(e);
e.
graphics().
fill_rounded_rectangle(
linear_gradient_brush(
rectangle(180, 180, 150, 150), back_color, fore_color, 315),
rectangle(180, 180, 150, 150), 20);
}
private:
image create_circle_texture(
const color& fore_color,
const color& back_color) {
auto texture =
bitmap(16, 16);
auto graphics = texture.create_graphics();
return texture;
}
};
}
auto main()->int {
application::run(examples::form1 {});
}