mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
LibPDF: Remove minor duplication in Renderer::text_show_string_array()
This "regressed" in #10080 (back then, the branches were smaller). No behavior change.
This commit is contained in:
parent
62596f3e43
commit
004e47df88
1 changed files with 2 additions and 6 deletions
|
@ -596,12 +596,8 @@ RENDERER_HANDLER(text_show_string_array)
|
|||
auto elements = MUST(m_document->resolve_to<ArrayObject>(args[0]))->elements();
|
||||
|
||||
for (auto& element : elements) {
|
||||
if (element.has<int>()) {
|
||||
float shift = (float)element.get<int>() / 1000.0f;
|
||||
m_text_matrix.translate(-shift * text_state().font_size * text_state().horizontal_scaling, 0.0f);
|
||||
m_text_rendering_matrix_is_dirty = true;
|
||||
} else if (element.has<float>()) {
|
||||
float shift = element.get<float>() / 1000.0f;
|
||||
if (element.has_number()) {
|
||||
float shift = element.to_float() / 1000.0f;
|
||||
m_text_matrix.translate(-shift * text_state().font_size * text_state().horizontal_scaling, 0.0f);
|
||||
m_text_rendering_matrix_is_dirty = true;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue