[cairo-bugs] [Bug 29008] New: Clip doesn't work for text
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sun Jul 11 09:18:47 PDT 2010
https://bugs.freedesktop.org/show_bug.cgi?id=29008
Summary: Clip doesn't work for text
Product: cairo
Version: 1.9.10
Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: freetype font backend
AssignedTo: david at freetype.org
ReportedBy: igor_nikitin at valentina-db.com
QAContact: cairo-bugs at cairographics.org
#include <cairo/cairo.h>
int main( int argc, char** argv )
{
cairo_surface_t* surface = cairo_image_surface_create(
CAIRO_FORMAT_ARGB32, 40, 15 );
cairo_t* target = cairo_create( surface );
// Height of region must by only 5 px
cairo_rectangle( target, 0, 0, 40, 5 );
cairo_clip( target );
cairo_set_font_size( target, 12 );
cairo_select_font_face(
target,
"sans",
CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL );
cairo_set_source_rgb( target, 0, 0, 0 );
cairo_move_to( target, 0, 12 );
cairo_show_text( target, "TEST" );
cairo_stroke( target );
cairo_reset_clip( target );
cairo_surface_write_to_png( surface, "/home/igor/1.png" );
return 0;
}
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the cairo-bugs
mailing list