#include <xtd/drawing/drawing_2d/radial_gradient_brush>
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/startup>
class form_main :
public form {
public:
static auto main() {
}
form_main() {
client_size({200, 200});
double_buffered(true);
top_most(true);
path.add_ellipse(client_rectangle());
};
mouse_location =
e.location();
};
};
auto new_bounds = bounds();
new_bounds.location(new_bounds.location() +
e.location() - mouse_location);
if (new_bounds.left() < working_area.left()) new_bounds.location({working_area.left(), new_bounds.top()});
if (new_bounds.top() < working_area.top()) new_bounds.location({new_bounds.left(), working_area.top()});
if (new_bounds.left() + new_bounds.width > working_area.right()) new_bounds.location({working_area.right() - new_bounds.width, new_bounds.top()});
if (new_bounds.top() + new_bounds.height > working_area.bottom()) new_bounds.location({new_bounds.left(), working_area.bottom() - new_bounds.height});
bounds(new_bounds);
};
}
private:
};
static xtd::drawing::color from_argb(uint32 argb) noexcept
Creates a xtd::drawing::color class from a 32-bit ARGB value.
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition graphics_path.hpp:33
Encapsulates a xtd::drawing::brush with a radial gradient. This class cannot be inherited.
Definition radial_gradient_brush.hpp:29
Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inh...
Definition region.hpp:32
#define startup_(main_method)
Defines the entry point to be called when the application loads. Generally this is set either to the ...
Definition startup.hpp:167
@ path
The xtd::uri::local_path data.
Definition uri_components.hpp:27
@ e
The E key.
Definition console_key.hpp:96
The xtd::drawing::drawing_2d namespace provides advanced two-dimensional and vector graphics function...
Definition compositing_mode.hpp:12
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition point.hpp:54
static const point empty
Represents a xtd::drawing::point that has xtd::drawing::point::x and xtd::drawing::point::y values se...
Definition point.hpp:59