Example #1
0
/**
* @brief Blits a region of this surface on a specified location of another surface.
* @param src_position the subrectangle of this surface to pick
* @param dst_surface the destination surface
* @param dst_position the destination position where the current surface will be blitted on dst
*/
void Surface::draw_region(const Rectangle &src_position, Surface& dst_surface, const Rectangle &dst_position) 
{
  Rectangle src_position2(src_position);
  Rectangle dst_position2(dst_position);
  SDL_BlitSurface(internal_surface, src_position2.get_internal_rect(),
      dst_surface.internal_surface, dst_position2.get_internal_rect());
}
Example #2
0
/**
 * @brief Blits a subarea of this surface on a specified location of another surface.
 * @param src_position the subrectangle of this surface to pick
 * @param dst the destination surface
 * @param dst_position the destination position where the current surface will be blitted on dst
 */
void Surface::blit(const Rectangle &src_position, Surface *dst, const Rectangle &dst_position) {

  Rectangle src_position2(src_position);
  Rectangle dst_position2(dst_position);
  SDL_BlitSurface(internal_surface, src_position2.get_internal_rect(), dst->internal_surface, dst_position2.get_internal_rect());
}