fix: all corners are now considered when choosing between rounded and unrounded rectangle render functions
This commit is contained in:
		
							parent
							
								
									ed28b55f8a
								
							
						
					
					
						commit
						e9de2dab75
					
				| 
						 | 
				
			
			@ -150,7 +150,7 @@ void SDL_Clay_RenderClayCommands(Clay_SDL3RendererData *rendererData, Clay_Rende
 | 
			
		|||
                Clay_RectangleRenderData *config = &rcmd->renderData.rectangle;
 | 
			
		||||
                SDL_SetRenderDrawBlendMode(rendererData->renderer, SDL_BLENDMODE_BLEND);
 | 
			
		||||
                SDL_SetRenderDrawColor(rendererData->renderer, config->backgroundColor.r, config->backgroundColor.g, config->backgroundColor.b, config->backgroundColor.a);
 | 
			
		||||
                if (config->cornerRadius.topLeft > 0) {
 | 
			
		||||
                if (config->cornerRadius.topLeft > 0 || config->cornerRadius.topRight > 0 || config->cornerRadius.bottomLeft > 0 || config->cornerRadius.bottomRight > 0) {
 | 
			
		||||
                    SDL_Clay_RenderFillRoundedRect(rendererData, rect, config->cornerRadius, config->backgroundColor);
 | 
			
		||||
                } else {
 | 
			
		||||
                    SDL_RenderFillRect(rendererData->renderer, &rect);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue