src/render/SDL_render.c
changeset 7143 fa117b9cc89b
parent 7141 e276777b4247
child 7191 75360622e65f
equal deleted inserted replaced
7142:f4a670e51cde 7143:fa117b9cc89b
  1103 }
  1103 }
  1104 
  1104 
  1105 int
  1105 int
  1106 SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect)
  1106 SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect)
  1107 {
  1107 {
  1108     CHECK_RENDERER_MAGIC(renderer, )
  1108     CHECK_RENDERER_MAGIC(renderer, -1)
  1109 
  1109 
  1110     if (rect) {
  1110     if (rect) {
  1111         renderer->clip_rect.x = (int)SDL_floor(rect->x * renderer->scale.x);
  1111         renderer->clip_rect.x = (int)SDL_floor(rect->x * renderer->scale.x);
  1112         renderer->clip_rect.y = (int)SDL_floor(rect->y * renderer->scale.y);
  1112         renderer->clip_rect.y = (int)SDL_floor(rect->y * renderer->scale.y);
  1113         renderer->clip_rect.w = (int)SDL_ceil(rect->w * renderer->scale.x);
  1113         renderer->clip_rect.w = (int)SDL_ceil(rect->w * renderer->scale.x);