@ -2330,73 +2330,80 @@ void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, V
}
}
void DrawNinePatch ( NinePatch ninePatch , Rectangle destRec , bool usePadding , Vector2 origin , float rotation , Color tint )
void DrawNPatch ( NPatch nPatch , Rectangle destRec , bool usePadding , Vector2 origin , float rotation , Color tint )
{
/ / Check if n - patch texture is valid
if ( nine Patch . texture . id > 0 )
if ( nPatch . texture . id > 0 )
{
float width = ( float ) nine Patch . texture . width ;
float height = ( float ) nine Patch . texture . height ;
float width = ( float ) nPatch . texture . width ;
float height = ( float ) nPatch . texture . height ;
float contents Width = ( destRec . width > = nine Patch . minSize . x ) ? destRec . width : nine Patch . minSize . x ;
float contents Height = ( destRec . height > = nine Patch . minSize . y ) ? destRec . height : nine Patch . minSize . y ;
float patch Width = ( destRec . width > = nPatch . minSize . x ) ? destRec . width : nPatch . minSize . x ;
float patch Height = ( destRec . height > = nPatch . minSize . y ) ? destRec . height : nPatch . minSize . y ;
if ( usePadding )
{
contents Width + = ( float ) ( nine Patch . padding [ 0 ] + nine Patch . padding [ 2 ] ) ;
contents Height + = ( float ) ( nine Patch . padding [ 1 ] + nine Patch . padding [ 3 ] ) ;
patch Width + = ( float ) ( nPatch . padding [ 0 ] + nPatch . padding [ 2 ] ) ;
patch Height + = ( float ) ( nPatch . padding [ 1 ] + nPatch . padding [ 3 ] ) ;
}
if ( ninePatch . sourceRec . width < 0 ) ninePatch . sourceRec . x - = ninePatch . sourceRec . width ;
if ( ninePatch . sourceRec . height < 0 ) ninePatch . sourceRec . y - = ninePatch . sourceRec . height ;
rlEnableTexture ( ninePatch . texture . id ) ;
if ( nPatch . sourceRec . width < 0 ) nPatch . sourceRec . x - = nPatch . sourceRec . width ;
if ( nPatch . sourceRec . height < 0 ) nPatch . sourceRec . y - = nPatch . sourceRec . height ;
/ / Ignore the destRec width if the n - patch type is NPT_3PATCH_VERTICAL
if ( nPatch . type = = NPT_3PATCH_VERTICAL ) { patchWidth = nPatch . sourceRec . width ; }
/ / Ignore the destRec height if the n - patch type is NPT_3PATCH_HORIZONTAL
if ( nPatch . type = = NPT_3PATCH_HORIZONTAL ) { patchHeight = nPatch . sourceRec . height ; }
bool drawCenter = true ;
bool drawMiddle = true ;
float borderWidth [ 4 ] ; / / copy the ninePatch . borderWidth [ 4 ] values so they can be adjusted
for ( int i = 0 ; i < 4 ; i + + ) { borderWidth [ i ] = ninePatch . borderWidth [ i ] ; }
float borderWidth [ 4 ] ; / / copy the nPatch . borderWidth [ 4 ] values so they can be adjusted
for ( int i = 0 ; i < 4 ; i + + ) { borderWidth [ i ] = nPatch . borderWidth [ i ] ; }
/ / adjust the lateral ( left and right ) border widths in case contents Width < nine Patch . texture . width
if ( contents Width < = nine Patch . borderWidth [ 0 ] + nine Patch . borderWidth [ 2 ] )
/ / adjust the lateral ( left and right ) border widths in case patch Width < nPatch . texture . width
if ( patch Width < = nPatch . borderWidth [ 0 ] + nPatch . borderWidth [ 2 ] )
{
drawCenter = false ;
borderWidth [ 0 ] = ( borderWidth [ 0 ] / ( nine Patch . borderWidth [ 0 ] + nine Patch . borderWidth [ 2 ] ) ) * p">( borderWidth [ 0 ] + borderWidth [ 2 ] ) ;
borderWidth [ 2 ] = contents Width - borderWidth [ 0 ] ;
borderWidth [ 0 ] = ( borderWidth [ 0 ] / ( nPatch . borderWidth [ 0 ] + nPatch . borderWidth [ 2 ] ) ) * n">patchWidth ;
borderWidth [ 2 ] = patch Width - borderWidth [ 0 ] ;
}
/ / adjust the lateral ( top and bottom ) border heights in case contents Height < nine Patch . texture . height
if ( contents Height < = nine Patch . borderWidth [ 1 ] + nine Patch . borderWidth [ 3 ] )
/ / adjust the lateral ( top and bottom ) border heights in case patch Height < nPatch . texture . height
if ( patch Height < = nPatch . borderWidth [ 1 ] + nPatch . borderWidth [ 3 ] )
{
drawMiddle = false ;
borderWidth [ 1 ] = ( borderWidth [ 1 ] / ( nine Patch . borderWidth [ 1 ] + nine Patch . borderWidth [ 3 ] ) ) * p">( borderWidth [ 1 ] + borderWidth [ 3 ] ) ;
borderWidth [ 3 ] = contents Height - borderWidth [ 1 ] ;
borderWidth [ 1 ] = ( borderWidth [ 1 ] / ( nPatch . borderWidth [ 1 ] + nPatch . borderWidth [ 3 ] ) ) * n">patchHeight ;
borderWidth [ 3 ] = patch Height - borderWidth [ 1 ] ;
}
Vector2 vertA , vertB , vertC , vertD ;
vertA . x = 0.0f ;
vertA . y = 0.0f ;
vertB . x = borderWidth [ 0 ] ;
vertB . y = borderWidth [ 1 ] ;
vertC . x = contents Width - borderWidth [ 2 ] ;
vertC . y = contents Height - borderWidth [ 3 ] ;
vertD . x = contentsWidth ;
vertD . y = contentsHeight ;
vertA . x = 0.0f ; / / outer left
vertA . y = 0.0f ; / / outer top
vertB . x = borderWidth [ 0 ] ; / / inner left
vertB . y = borderWidth [ 1 ] ; / / inner top
vertC . x = patch Width - borderWidth [ 2 ] ; / / inner right
vertC . y = patch Height - borderWidth [ 3 ] ; / / inner bottom
vertD . x = patchWidth ; / / outer right
vertD . y = patchHeight ; / / outer bottom
Vector2 coordA , coordB , coordC , coordD ;
coordA . x = ninePatch . sourceRec . x / width ;
coordA . y = ninePatch . sourceRec . y / height ;
coordB . x = ( ninePatch . sourceRec . x + borderWidth [ 0 ] ) / width ;
coordB . y = ( ninePatch . sourceRec . y + borderWidth [ 1 ] ) / height ;
coordC . x = ( ninePatch . sourceRec . x + ninePatch . sourceRec . width - borderWidth [ 2 ] ) / width ;
coordC . y = ( ninePatch . sourceRec . y + ninePatch . sourceRec . height - borderWidth [ 3 ] ) / height ;
coordD . x = ( ninePatch . sourceRec . x + ninePatch . sourceRec . width ) / width ;
coordD . y = ( ninePatch . sourceRec . y + ninePatch . sourceRec . height ) / height ;
coordA . x = nPatch . sourceRec . x / width ;
coordA . y = nPatch . sourceRec . y / height ;
coordB . x = ( nPatch . sourceRec . x + borderWidth [ 0 ] ) / width ;
coordB . y = ( nPatch . sourceRec . y + borderWidth [ 1 ] ) / height ;
coordC . x = ( nPatch . sourceRec . x + nPatch . sourceRec . width - borderWidth [ 2 ] ) / width ;
coordC . y = ( nPatch . sourceRec . y + nPatch . sourceRec . height - borderWidth [ 3 ] ) / height ;
coordD . x = ( nPatch . sourceRec . x + nPatch . sourceRec . width ) / width ;
coordD . y = ( nPatch . sourceRec . y + nPatch . sourceRec . height ) / height ;
rlEnableTexture ( nPatch . texture . id ) ;
rlPushMatrix ( ) ;
if ( usePadding )
{
rlTranslatef ( destRec . x - ( float ) nine Patch . padding [ 0 ] , destRec . y - ( float ) nine Patch . padding [ 2 ] , 0 ) ;
rlTranslatef ( destRec . x - ( float ) nPatch . padding [ 0 ] , destRec . y - ( float ) nPatch . padding [ 2 ] , 0 ) ;
}
else
{
@ -2409,139 +2416,231 @@ void DrawNinePatch(NinePatch ninePatch, Rectangle destRec, bool usePadding, Vect
rlColor4ub ( tint . r , tint . g , tint . b , tint . a ) ;
rlNormal3f ( 0.0f , 0.0f , 1.0f ) ; / / Normal vector pointing towards viewer
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / TOP - LEFT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordB . y ) ; rlVertex2f ( vertA . x , vertB . y ) ;
if ( nPatch . type = = NPT_3PATCH_HORIZONTAL )
{
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / LEFT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordD . y ) ; rlVertex2f ( vertA . x , vertD . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordB . y ) ; rlVertex2f ( vertB . x , vertB . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordD . y ) ; rlVertex2f ( vertB . x , vertD . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordA . y ) ; rlVertex2f ( vertB . x , vertA . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordA . y ) ; rlVertex2f ( vertB . x , vertA . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordA . y ) ; rlVertex2f ( vertA . x , vertA . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordA . y ) ; rlVertex2f ( vertA . x , vertA . y ) ;
if ( drawCenter )
{
/ / TOP - CENTER QUAD
if ( drawCenter )
{
/ / CENTER QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordD . y ) ; rlVertex2f ( vertB . x , vertD . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordD . y ) ; rlVertex2f ( vertC . x , vertD . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordA . y ) ; rlVertex2f ( vertC . x , vertA . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordA . y ) ; rlVertex2f ( vertB . x , vertA . y ) ;
}
/ / RIGHT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordB . y ) ; rlVertex2f ( vertB . x , vertB . y ) ;
rlTexCoord2f ( coordC . x , coordD . y ) ; rlVertex2f ( vertC . x , vertD . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordB . y ) ; rlVertex2f ( vertC . x , vertB . y ) ;
rlTexCoord2f ( coordD . x , coordD . y ) ; rlVertex2f ( vertD . x , vertD . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordA . y ) ; rlVertex2f ( vertC . x , vertA . y ) ;
rlTexCoord2f ( coordD . x , coordA . y ) ; rlVertex2f ( vertD . x , vertA . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordA . y ) ; rlVertex2f ( vertB . x , vertA . y ) ;
rlTexCoord2f ( coordC . x , coordA . y ) ; rlVertex2f ( vertC . x , vertA . y ) ;
}
else if ( nPatch . type = = NPT_3PATCH_VERTICAL )
{
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / TOP QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordB . y ) ; rlVertex2f ( vertA . x , vertB . y ) ;
/ / TOP - RIGHT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordB . y ) ; rlVertex2f ( vertC . x , vertB . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordB . y ) ; rlVertex2f ( vertD . x , vertB . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordB . y ) ; rlVertex2f ( vertD . x , vertB . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordA . y ) ; rlVertex2f ( vertD . x , vertA . y ) ;
/ / Top - righ t corner for texture and quad
rlTexCoord2f ( coordD . x , coordA . y ) ; rlVertex2f ( vertD . x , vertA . y ) ;
/ / Top - lef t corner for texture and quad
rlTexCoord2f ( coordA . x , coordA . y ) ; rlVertex2f ( vertA . x , vertA . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordA . y ) ; rlVertex2f ( vertC . x , vertA . y ) ;
if ( drawCenter )
{
/ / MIDDLE QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordC . y ) ; rlVertex2f ( vertA . x , vertC . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordC . y ) ; rlVertex2f ( vertD . x , vertC . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordB . y ) ; rlVertex2f ( vertD . x , vertB . y ) ;
if ( drawMiddle )
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordB . y ) ; rlVertex2f ( vertA . x , vertB . y ) ;
}
/ / BOTTOM QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordD . y ) ; rlVertex2f ( vertA . x , vertD . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordD . y ) ; rlVertex2f ( vertD . x , vertD . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordC . y ) ; rlVertex2f ( vertD . x , vertC . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordC . y ) ; rlVertex2f ( vertA . x , vertC . y ) ;
}
else if ( nPatch . type = = NPT_9PATCH )
{
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / MIDDLE - LEFT QUAD
/ / TOP - LEFT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordC . y ) ; rlVertex2f ( vertA . x , vertC . y ) ;
rlTexCoord2f ( coordA . x , coordB . y ) ; rlVertex2f ( vertA . x , vertB . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordC . y ) ; rlVertex2f ( vertB . x , vertC . y ) ;
rlTexCoord2f ( coordB . x , coordB . y ) ; rlVertex2f ( vertB . x , vertB . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordB . y ) ; rlVertex2f ( vertB . x , vertB . y ) ;
rlTexCoord2f ( coordB . x , coordA . y ) ; rlVertex2f ( vertB . x , vertA . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordB . y ) ; rlVertex2f ( vertA . x , vertB . y ) ;
rlTexCoord2f ( coordA . x , coordA . y ) ; rlVertex2f ( vertA . x , vertA . y ) ;
if ( drawCenter )
{
/ / MIDDLE - CENTER QUAD
/ / TOP - CENTER QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordC . y ) ; rlVertex2f ( vertB . x , vertC . y ) ;
rlTexCoord2f ( coordB . x , coordB . y ) ; rlVertex2f ( vertB . x , vertB . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordC . y ) ; rlVertex2f ( vertC . x , vertC . y ) ;
rlTexCoord2f ( coordC . x , coordB . y ) ; rlVertex2f ( vertC . x , vertB . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordB . y ) ; rlVertex2f ( vertC . x , vertB . y ) ;
rlTexCoord2f ( coordC . x , coordA . y ) ; rlVertex2f ( vertC . x , vertA . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordB . y ) ; rlVertex2f ( vertB . x , vertB . y ) ;
rlTexCoord2f ( coordB . x , coordA . y ) ; rlVertex2f ( vertB . x , vertA . y ) ;
}
/ / MIDDLE - RIGHT QUAD
/ / TOP - RIGHT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordC . y ) ; rlVertex2f ( vertC . x , vertC . y ) ;
rlTexCoord2f ( coordC . x , coordB . y ) ; rlVertex2f ( vertC . x , vertB . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordC . y ) ; rlVertex2f ( vertD . x , vertC . y ) ;
rlTexCoord2f ( coordD . x , coordB . y ) ; rlVertex2f ( vertD . x , vertB . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordB . y ) ; rlVertex2f ( vertD . x , vertB . y ) ;
rlTexCoord2f ( coordD . x , coordA . y ) ; rlVertex2f ( vertD . x , vertA . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordB . y ) ; rlVertex2f ( vertC . x , vertB . y ) ;
}
rlTexCoord2f ( coordC . x , coordA . y ) ; rlVertex2f ( vertC . x , vertA . y ) ;
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / BOTTOM - LEFT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordD . y ) ; rlVertex2f ( vertA . x , vertD . y ) ;
if ( drawMiddle )
{
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / MIDDLE - LEFT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordC . y ) ; rlVertex2f ( vertA . x , vertC . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordD . y ) ; rlVertex2f ( vertB . x , vertD . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordC . y ) ; rlVertex2f ( vertB . x , vertC . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordC . y ) ; rlVertex2f ( vertB . x , vertC . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordB . x , coordB . y ) ; rlVertex2f ( vertB . x , vertB . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordC . y ) ; rlVertex2f ( vertA . x , vertC . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordA . x , coordB . y ) ; rlVertex2f ( vertA . x , vertB . y ) ;
if ( drawCenter )
{
/ / BOTTOM - CENTER QUAD
if ( drawCenter )
{
/ / MIDDLE - CENTER QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordC . y ) ; rlVertex2f ( vertB . x , vertC . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordC . y ) ; rlVertex2f ( vertC . x , vertC . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordB . y ) ; rlVertex2f ( vertC . x , vertB . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordB . y ) ; rlVertex2f ( vertB . x , vertB . y ) ;
}
/ / MIDDLE - RIGHT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordC . y ) ; rlVertex2f ( vertC . x , vertC . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordC . y ) ; rlVertex2f ( vertD . x , vertC . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordB . y ) ; rlVertex2f ( vertD . x , vertB . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordB . y ) ; rlVertex2f ( vertC . x , vertB . y ) ;
}
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / BOTTOM - LEFT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordD . y ) ; rlVertex2f ( vertB . x , vertD . y ) ;
rlTexCoord2f ( coordA . x , coordD . y ) ; rlVertex2f ( vertA . x , vertD . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordD . y ) ; rlVertex2f ( vertC . x , vertD . y ) ;
rlTexCoord2f ( coordB . x , coordD . y ) ; rlVertex2f ( vertB . x , vertD . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordC . y ) ; rlVertex2f ( vertC . x , vertC . y ) ;
rlTexCoord2f ( coordB . x , coordC . y ) ; rlVertex2f ( vertB . x , vertC . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordC . y ) ; rlVertex2f ( vertB . x , vertC . y ) ;
}
rlTexCoord2f ( coordA . x , coordC . y ) ; rlVertex2f ( vertA . x , vertC . y ) ;
/ / BOTTOM - RIGHT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordD . y ) ; rlVertex2f ( vertC . x , vertD . y ) ;
if ( drawCenter )
{
/ / BOTTOM - CENTER QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordD . y ) ; rlVertex2f ( vertB . x , vertD . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordD . y ) ; rlVertex2f ( vertD . x , vertD . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordD . y ) ; rlVertex2f ( vertC . x , vertD . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordC . y ) ; rlVertex2f ( vertD . x , vertC . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordC . x , coordC . y ) ; rlVertex2f ( vertC . x , vertC . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordC . y ) ; rlVertex2f ( vertC . x , vertC . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordB . x , coordC . y ) ; rlVertex2f ( vertB . x , vertC . y ) ;
}
/ / BOTTOM - RIGHT QUAD
/ / Bottom - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordD . y ) ; rlVertex2f ( vertC . x , vertD . y ) ;
/ / Bottom - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordD . y ) ; rlVertex2f ( vertD . x , vertD . y ) ;
/ / Top - right corner for texture and quad
rlTexCoord2f ( coordD . x , coordC . y ) ; rlVertex2f ( vertD . x , vertC . y ) ;
/ / Top - left corner for texture and quad
rlTexCoord2f ( coordC . x , coordC . y ) ; rlVertex2f ( vertC . x , vertC . y ) ;
}
rlEnd ( ) ;
rlPopMatrix ( ) ;