mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Add 9slice information at runtime
This commit is contained in:
parent
22d9fc9cf9
commit
97067c3d65
12 changed files with 140 additions and 30 deletions
|
@ -210,6 +210,17 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/// Sets the nine-slice edges of the image.
|
||||
///
|
||||
/// [Nine-slice scaling](https://en.wikipedia.org/wiki/9-slice_scaling) is a method for scaling
|
||||
/// images in such a way that the corners are not distorted.
|
||||
/// The arguments define the pixel sizes of the edges that cut the image into 9 slices.
|
||||
void set_nine_slice_edges(unsigned short top, unsigned short right, unsigned short bottom,
|
||||
unsigned short left)
|
||||
{
|
||||
cbindgen_private::types::slint_image_set_nine_slice_edges(&data, top, right, bottom, left);
|
||||
}
|
||||
|
||||
/// Returns true if \a a refers to the same image as \a b; false otherwise.
|
||||
friend bool operator==(const Image &a, const Image &b)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue