169 SDL_GetRGBA(destPixels^[i], dest^.format, @r0, @g0, @b0, @a0); |
169 SDL_GetRGBA(destPixels^[i], dest^.format, @r0, @g0, @b0, @a0); |
170 SDL_GetRGBA(srcPixels^[j], src^.format, @r1, @g1, @b1, @a1); |
170 SDL_GetRGBA(srcPixels^[j], src^.format, @r1, @g1, @b1, @a1); |
171 r0:= (r0 * (255 - LongInt(a1)) + r1 * LongInt(a1)) div 255; |
171 r0:= (r0 * (255 - LongInt(a1)) + r1 * LongInt(a1)) div 255; |
172 g0:= (g0 * (255 - LongInt(a1)) + g1 * LongInt(a1)) div 255; |
172 g0:= (g0 * (255 - LongInt(a1)) + g1 * LongInt(a1)) div 255; |
173 b0:= (b0 * (255 - LongInt(a1)) + b1 * LongInt(a1)) div 255; |
173 b0:= (b0 * (255 - LongInt(a1)) + b1 * LongInt(a1)) div 255; |
174 a0:= (a0 * (255 - LongInt(a1)) + a1 * LongInt(a1)) div 255; |
174 a0:= a0 + ((255 - LongInt(a0)) * a1 div 255); |
175 destPixels^[i]:= SDL_MapRGBA(dest^.format, r0, g0, b0, a0); |
175 destPixels^[i]:= SDL_MapRGBA(dest^.format, r0, g0, b0, a0); |
176 end; |
176 end; |
177 end; |
177 end; |
178 |
178 |
179 SDL_UnlockSurface(src); |
179 SDL_UnlockSurface(src); |