<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
(sorry for my english)<br>
<br>
Hi All, Here small sample code to reproduce:<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
class="Apple-style-span"
style="font-family: Verdana,sans-serif; font-size: small;">
<pre class="bz_comment_text" id="comment_text_0"
style="font-size: medium; font-family: monospace; white-space: pre-wrap; width: 50em;">#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, "1.png" );
return 0;
}
Result file attached - no clipping at all.
</pre>
</span></span><br>
</body>
</html>