printpdf icon indicating copy to clipboard operation
printpdf copied to clipboard

`set_text_matrix(TextMatrix::Rotate(45.0))` rotate text only in its corner

Open qarmin opened this issue 1 year ago • 0 comments

    current_layer.begin_text_section();

    current_layer.set_font(&font, FONT_SIZE_COMMENTS);
    current_layer.add_line_break();
    current_layer.set_text_cursor(Mm(10.0), Mm(10.0));
    current_layer.set_line_height(10.0);
    current_layer.write_text("AAAAAAA", &font);
    current_layer.set_text_matrix(TextMatrix::Rotate(45.0));
    current_layer.write_text("All rights reserved.", &font);

    current_layer.end_text_section();

With such code, All rights reserved, should start with same position like "AAAA", but starts in corner instead.

Screenshot from 2023-09-28 15-04-07

qarmin avatar Sep 28 '23 13:09 qarmin