bevy/crates/bevy_sprite/src/texture_slice
ickshonpe f4800c24ba
BorderRect maintenance (#16727)
# Objective

The doc comments and function namings for `BorderRect` feel imprecise to
me. Particularly the `square` function which is used to define a uniform
`BorderRect` with equal widths on each edge. But this is potentially
confusing since this "square" border could be around an oblong shape.

Using "padding" to refer to the border extents seems undesirable too
since "padding" is typically used to refer to the area between border
and content, not the border itself.

## Solution
* Rename `square` to `all` (this matches the name of the similar method
on `UiRect`).
* Rename `rectangle` to `axes` (this matches the name of the similar
method on `UiRect`).
* Update doc comments. 

## Migration Guide
The `square` and `rectangle` functions belonging to `BorderRect` have
been renamed to `all` and `axes`.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-12-12 04:33:44 +00:00
..
border_rect.rs BorderRect maintenance (#16727) 2024-12-12 04:33:44 +00:00
computed_slices.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
mod.rs bug: Fix 9-slice textures with asymmetric borders. (#13921) 2024-06-19 17:30:18 +00:00
slicer.rs BorderRect maintenance (#16727) 2024-12-12 04:33:44 +00:00