Home | History | Annotate | Download | only in gdx2d

Lines Matching refs:src_pixmap

767 static inline void blit_same_size(const gdx2d_pixmap* src_pixmap, const gdx2d_pixmap* dst_pixmap, 

772 get_pixel_func pget = get_pixel_func_ptr(src_pixmap->format);
774 uint32_t sbpp = gdx2d_bytes_per_pixel(src_pixmap->format);
776 uint32_t spitch = sbpp * src_pixmap->width;
786 if(sy >= src_pixmap->height || dy >= dst_pixmap->height) break;
790 if(sx >= src_pixmap->width || dx >= dst_pixmap->width) break;
792 const void* src_ptr = src_pixmap->pixels + sx * sbpp + sy * spitch;
794 uint32_t src_col = to_RGBA8888(src_pixmap->format, pget((void*)src_ptr));
808 static inline void blit_bilinear(const gdx2d_pixmap* src_pixmap, const gdx2d_pixmap* dst_pixmap,
812 get_pixel_func pget = get_pixel_func_ptr(src_pixmap->format);
814 uint32_t sbpp = gdx2d_bytes_per_pixel(src_pixmap->format);
816 uint32_t spitch = sbpp * src_pixmap->width;
836 if(sy >= src_pixmap->height || dy >= dst_pixmap->height) break;
843 if(sx >= src_pixmap->width || dx >= dst_pixmap->width) break;
846 const void* src_ptr = src_pixmap->pixels + sx * sbpp + sy * spitch;
848 c1 = to_RGBA8888(src_pixmap->format, pget((void*)src_ptr));
849 if(sx + 1 < src_width) c2 = to_RGBA8888(src_pixmap->format, pget((void*)(src_ptr + sbpp))); else c2 = c1;
850 if(sy + 1< src_height) c3 = to_RGBA8888(src_pixmap->format, pget((void*)(src_ptr + spitch))); else c3 = c1;
851 if(sx + 1< src_width && sy + 1 < src_height) c4 = to_RGBA8888(src_pixmap->format, pget((void*)(src_ptr + spitch + sbpp))); else c4 = c1;
889 static inline void blit_linear(const gdx2d_pixmap* src_pixmap, const gdx2d_pixmap* dst_pixmap,
893 get_pixel_func pget = get_pixel_func_ptr(src_pixmap->format);
895 uint32_t sbpp = gdx2d_bytes_per_pixel(src_pixmap->format);
897 uint32_t spitch = sbpp * src_pixmap->width;
914 if(sy >= src_pixmap->height || dy >= dst_pixmap->height) break;
920 if(sx >= src_pixmap->width || dx >= dst_pixmap->width) break;
922 const void* src_ptr = src_pixmap->pixels + sx * sbpp + sy * spitch;
924 uint32_t src_col = to_RGBA8888(src_pixmap->format, pget((void*)src_ptr));
938 static inline void blit(const gdx2d_pixmap* src_pixmap, const gdx2d_pixmap* dst_pixmap,
942 blit_linear(src_pixmap, dst_pixmap, src_x, src_y, src_width, src_height, dst_x, dst_y, dst_width, dst_height);
944 blit_bilinear(src_pixmap, dst_pixmap, src_x, src_y, src_width, src_height, dst_x, dst_y, dst_width, dst_height);
947 void gdx2d_draw_pixmap(const gdx2d_pixmap* src_pixmap, const gdx2d_pixmap* dst_pixmap,
951 blit_same_size(src_pixmap, dst_pixmap, src_x, src_y, dst_x, dst_y, src_width, src_height);
953 blit(src_pixmap, dst_pixmap, src_x, src_y, src_width, src_height, dst_x, dst_y, dst_width, dst_height);