mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-04 17:40:39 +01:00
Add rotation to bitmap-font to demonstrate failure of bug #7888
This commit is contained in:
parent
751ff78ff2
commit
e8e7ccf602
3 changed files with 10 additions and 1 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 552 B After Width: | Height: | Size: 950 B |
Binary file not shown.
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 890 B |
|
|
@ -40,7 +40,7 @@ static cairo_test_draw_function_t draw;
|
|||
cairo_test_t test = {
|
||||
"bitmap-font",
|
||||
"Test drawing with a font consisting only of bitmaps",
|
||||
246 + 1, TEXT_SIZE,
|
||||
246 + 1, 2 * TEXT_SIZE,
|
||||
draw
|
||||
};
|
||||
|
||||
|
|
@ -99,6 +99,15 @@ draw (cairo_t *cr, int width, int height)
|
|||
cairo_set_source_rgb (cr, 0.0, 0.0, 1.0); /* blue */
|
||||
cairo_show_text (cr, "the quick brown fox jumps over a lazy dog");
|
||||
|
||||
/* And test it rotated as well. */
|
||||
|
||||
/* XXX: The math for the vertical positioning here is all wrong,
|
||||
* but it is landing where I want it. Someone who understands
|
||||
* fonts at all should fix this. */
|
||||
cairo_move_to (cr, width -1, 2 * (TEXT_SIZE - 5));
|
||||
cairo_rotate (cr, M_PI);
|
||||
cairo_show_text (cr, "the quick brown fox jumps over a lazy dog");
|
||||
|
||||
return CAIRO_TEST_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue