Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType Demo Programs
Commits:
-
a005039b
by Alexei Podtelezhnikov at 2022-09-15T23:39:08-04:00
1 changed file:
Changes:
... | ... | @@ -329,6 +329,11 @@ gblender_blit_init( GBlenderBlit blit, |
329 | 329 | return -2;
|
330 | 330 | }
|
331 | 331 | |
332 | + if ( src_pitch < 0 )
|
|
333 | + src_buffer -= src_pitch * ( src_height - 1 );
|
|
334 | + if ( dst_pitch < 0 )
|
|
335 | + dst_buffer -= dst_pitch * ( dst_height - 1 );
|
|
336 | + |
|
332 | 337 | if ( dst_x < 0 )
|
333 | 338 | {
|
334 | 339 | src_width += dst_x;
|
... | ... | @@ -360,14 +365,10 @@ gblender_blit_init( GBlenderBlit blit, |
360 | 365 | blit->height = src_height;
|
361 | 366 | |
362 | 367 | blit->src_pitch = src_pitch;
|
363 | - if ( src_pitch < 0 )
|
|
364 | - src_y -= src_height - 1;
|
|
365 | 368 | blit->src_line = src_buffer + src_pitch * src_y;
|
366 | 369 | blit->src_x = src_x;
|
367 | 370 | |
368 | 371 | blit->dst_pitch = dst_pitch;
|
369 | - if ( dst_pitch < 0 )
|
|
370 | - dst_y -= dst_height - 1;
|
|
371 | 372 | blit->dst_line = dst_buffer + dst_pitch * dst_y;
|
372 | 373 | blit->dst_x = dst_x;
|
373 | 374 |