mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 06:28:35 +01:00
don't unnecessarily cast ninepatch regions to int
This commit is contained in:
parent
52328cc18d
commit
35f53a978b
1 changed files with 4 additions and 4 deletions
|
@ -37,10 +37,10 @@ namespace MLEM.Textures {
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<RectangleF> CreateRectangles(RectangleF area, float patchScale = 1) {
|
public IEnumerable<RectangleF> CreateRectangles(RectangleF area, float patchScale = 1) {
|
||||||
var pl = (int) (this.Padding.Left * patchScale);
|
var pl = this.Padding.Left * patchScale;
|
||||||
var pr = (int) (this.Padding.Right * patchScale);
|
var pr = this.Padding.Right * patchScale;
|
||||||
var pt = (int) (this.Padding.Top * patchScale);
|
var pt = this.Padding.Top * patchScale;
|
||||||
var pb = (int) (this.Padding.Bottom * patchScale);
|
var pb = this.Padding.Bottom * patchScale;
|
||||||
|
|
||||||
var centerW = area.Width - pl - pr;
|
var centerW = area.Width - pl - pr;
|
||||||
var centerH = area.Height - pt - pb;
|
var centerH = area.Height - pt - pb;
|
||||||
|
|
Loading…
Reference in a new issue