comparison libass/ass_render.c @ 28784:907d3d80b50f

Scale shadow displacement and blur size like border size.
author greg
date Thu, 05 Mar 2009 20:36:44 +0000
parents 1cfc467bb77c
children 0366ab2c1cb9
comparison
equal deleted inserted replaced
28783:1cfc467bb77c 28784:907d3d80b50f
420 for (i = 0; i < text_info->length; ++i) { 420 for (i = 0; i < text_info->length; ++i) {
421 glyph_info_t* info = text_info->glyphs + i; 421 glyph_info_t* info = text_info->glyphs + i;
422 if ((info->symbol == 0) || (info->symbol == '\n') || !info->bm_s || (info->shadow == 0)) 422 if ((info->symbol == 0) || (info->symbol == '\n') || !info->bm_s || (info->shadow == 0))
423 continue; 423 continue;
424 424
425 pen_x = dst_x + info->pos.x + ROUND(info->shadow); 425 pen_x = dst_x + info->pos.x + ROUND(info->shadow * frame_context.border_scale);
426 pen_y = dst_y + info->pos.y + ROUND(info->shadow); 426 pen_y = dst_y + info->pos.y + ROUND(info->shadow * frame_context.border_scale);
427 bm = info->bm_s; 427 bm = info->bm_s;
428 428
429 tail = render_glyph(bm, pen_x, pen_y, info->c[3], 0, 1000000, tail); 429 tail = render_glyph(bm, pen_x, pen_y, info->c[3], 0, 1000000, tail);
430 } 430 }
431 431
1395 // render glyph 1395 // render glyph
1396 error = glyph_to_bitmap(ass_renderer->synth_priv, 1396 error = glyph_to_bitmap(ass_renderer->synth_priv,
1397 ass_renderer->synth_priv_blur, 1397 ass_renderer->synth_priv_blur,
1398 info->glyph, info->outline_glyph, 1398 info->glyph, info->outline_glyph,
1399 &info->bm, &info->bm_o, 1399 &info->bm, &info->bm_o,
1400 &info->bm_s, info->be, info->blur); 1400 &info->bm_s, info->be, info->blur * frame_context.border_scale);
1401 if (error) 1401 if (error)
1402 info->symbol = 0; 1402 info->symbol = 0;
1403 1403
1404 // add bitmaps to cache 1404 // add bitmaps to cache
1405 hash_val.bm_o = info->bm_o; 1405 hash_val.bm_o = info->bm_o;