Remove trailing spaces
This commit is contained in:
parent
0776f1e106
commit
9e7ca41f58
6 changed files with 92 additions and 91 deletions
|
@ -3218,8 +3218,8 @@ void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest,
|
|||
float width = (float)texture.width;
|
||||
float height = (float)texture.height;
|
||||
|
||||
float patchWidth = (dest.width <= 0.0f)? 0.0f : dest.width;
|
||||
float patchHeight = (dest.height <= 0.0f)? 0.0f : dest.height;
|
||||
float patchWidth = ((int)dest.width <= 0)? 0.0f : dest.width;
|
||||
float patchHeight = ((int)dest.height <= 0)? 0.0f : dest.height;
|
||||
|
||||
if (nPatchInfo.source.width < 0) nPatchInfo.source.x -= nPatchInfo.source.width;
|
||||
if (nPatchInfo.source.height < 0) nPatchInfo.source.y -= nPatchInfo.source.height;
|
||||
|
@ -3233,14 +3233,15 @@ void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest,
|
|||
float rightBorder = (float)nPatchInfo.right;
|
||||
float bottomBorder = (float)nPatchInfo.bottom;
|
||||
|
||||
// adjust the lateral (left and right) border widths in case patchWidth < texture.width
|
||||
// Adjust the lateral (left and right) border widths in case patchWidth < texture.width
|
||||
if (patchWidth <= (leftBorder + rightBorder) && nPatchInfo.layout != NPATCH_THREE_PATCH_VERTICAL)
|
||||
{
|
||||
drawCenter = false;
|
||||
leftBorder = (leftBorder/(leftBorder + rightBorder))*patchWidth;
|
||||
rightBorder = patchWidth - leftBorder;
|
||||
}
|
||||
// adjust the lateral (top and bottom) border heights in case patchHeight < texture.height
|
||||
|
||||
// Adjust the lateral (top and bottom) border heights in case patchHeight < texture.height
|
||||
if (patchHeight <= (topBorder + bottomBorder) && nPatchInfo.layout != NPATCH_THREE_PATCH_HORIZONTAL)
|
||||
{
|
||||
drawMiddle = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue