Permalink
Browse files

Add beginning of Cairo 1.2 support for RHEL 5.x

  • Loading branch information...
1 parent e4f5282 commit 9ddd8be0fbb227b7a252af567feb00eb42dda962 @mgdm mgdm committed Aug 14, 2011
Showing with 94 additions and 31 deletions.
  1. +16 −6 cairo.c
  2. +32 −18 cairo_context.c
  3. +3 −0 cairo_error.c
  4. +21 −0 cairo_pattern.c
  5. +2 −0 cairo_ps_surface.c
  6. +4 −0 cairo_scaled_font.c
  7. +3 −0 cairo_surface.c
  8. +1 −1 config.m4
  9. +12 −6 php_cairo.h
View
22 cairo.c
@@ -820,8 +820,10 @@ static const zend_function_entry cairo_functions[] = {
PHP_FE(cairo_set_antialias, cairo_set_antialias_args)
PHP_FE(cairo_get_antialias, cairo_context_args)
PHP_FE(cairo_set_dash, cairo_set_dash_args)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
PHP_FE(cairo_get_dash_count, cairo_context_args)
PHP_FE(cairo_get_dash, cairo_context_args)
+#endif
PHP_FE(cairo_set_fill_rule, cairo_set_fill_rule_args)
PHP_FE(cairo_get_fill_rule, cairo_context_args)
PHP_FE(cairo_set_line_cap, cairo_set_fill_rule_args)
@@ -838,9 +840,11 @@ static const zend_function_entry cairo_functions[] = {
PHP_FE(cairo_get_tolerance, cairo_context_args)
PHP_FE(cairo_clip, cairo_context_args)
PHP_FE(cairo_clip_preserve, cairo_context_args)
- PHP_FE(cairo_clip_extents, cairo_context_args)
PHP_FE(cairo_reset_clip, cairo_context_args)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
+ PHP_FE(cairo_clip_extents, cairo_context_args)
PHP_FE(cairo_clip_rectangle_list, cairo_context_args)
+#endif
PHP_FE(cairo_fill, cairo_context_args)
PHP_FE(cairo_fill_preserve, cairo_context_args)
PHP_FE(cairo_fill_extents, cairo_context_args)
@@ -905,7 +909,9 @@ static const zend_function_entry cairo_functions[] = {
PHP_FE(cairo_set_font_face, cairo_set_font_face_args)
PHP_FE(cairo_get_font_face, cairo_context_args)
PHP_FE(cairo_set_scaled_font, cairo_set_scaled_font_args)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
PHP_FE(cairo_get_scaled_font, cairo_context_args)
+#endif
PHP_FE(cairo_show_text, cairo_show_text_args)
PHP_FE(cairo_text_extents, cairo_context_args)
PHP_FE(cairo_font_extents, cairo_context_args)
@@ -917,21 +923,23 @@ static const zend_function_entry cairo_functions[] = {
PHP_FE(cairo_pattern_set_matrix, cairo_pattern_set_matrix_args)
PHP_FE(cairo_pattern_create_rgb, cairo_pattern_create_rgb_args)
PHP_FE(cairo_pattern_create_rgba, cairo_pattern_create_rgba_args)
- PHP_FE(cairo_pattern_get_rgba, cairo_solidpattern_args)
PHP_FE(cairo_pattern_create_for_surface, cairo_create_args)
- PHP_FE(cairo_pattern_get_surface, cairo_surfacepattern_args)
PHP_FE(cairo_pattern_set_filter, cairo_pattern_set_filter_args)
PHP_FE(cairo_pattern_get_filter, cairo_surfacepattern_args)
PHP_FE(cairo_pattern_set_extend, cairo_pattern_set_extend_args)
PHP_FE(cairo_pattern_get_extend, cairo_pattern_get_extend_args)
PHP_FE(cairo_pattern_add_color_stop_rgb, cairo_pattern_add_color_stop_rgb_args)
PHP_FE(cairo_pattern_add_color_stop_rgba, cairo_pattern_add_color_stop_rgba_args)
- PHP_FE(cairo_pattern_get_color_stop_rgba, cairo_pattern_get_color_stop_rgba_args)
- PHP_FE(cairo_pattern_get_color_stop_count, cairo_gradientpattern_args)
PHP_FE(cairo_pattern_create_linear, cairo_pattern_create_linear_args)
- PHP_FE(cairo_pattern_get_linear_points, cairo_lineargradient_args)
PHP_FE(cairo_pattern_create_radial, cairo_pattern_create_radial_args)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
+ PHP_FE(cairo_pattern_get_color_stop_count, cairo_gradientpattern_args)
+ PHP_FE(cairo_pattern_get_surface, cairo_surfacepattern_args)
+ PHP_FE(cairo_pattern_get_rgba, cairo_solidpattern_args)
+ PHP_FE(cairo_pattern_get_color_stop_rgba, cairo_pattern_get_color_stop_rgba_args)
+ PHP_FE(cairo_pattern_get_linear_points, cairo_lineargradient_args)
PHP_FE(cairo_pattern_get_radial_circles, cairo_radialgradient_args)
+#endif
/* Matrix Functions */
PHP_FE(cairo_matrix_init, cairo_matrix_init_args)
@@ -984,7 +992,9 @@ static const zend_function_entry cairo_functions[] = {
PHP_FE(cairo_scaled_font_get_font_options, cairo_scaled_font_args)
PHP_FE(cairo_scaled_font_get_font_matrix, cairo_scaled_font_args)
PHP_FE(cairo_scaled_font_get_ctm, cairo_scaled_font_args)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 8, 0)
PHP_FE(cairo_scaled_font_get_scale_matrix, cairo_scaled_font_args)
+#endif
PHP_FE(cairo_scaled_font_get_type, cairo_scaled_font_args)
/* User Font Functions
View
@@ -712,6 +712,7 @@ PHP_FUNCTION(cairo_set_dash)
}
/* }}} */
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
/* {{{ proto int cairo_get_dash_count(CairoContext object)
proto int CairoContext->getDashCount()
This function returns the length of the dash array or 0 */
@@ -772,6 +773,7 @@ PHP_FUNCTION(cairo_get_dash)
add_assoc_double(return_value, "offset", offset);
}
/* }}} */
+#endif
/* {{{ proto void cairo_set_fill_rule(CairoContext object, int setting)
proto void CairoContext->setFillRule(int setting)
@@ -1114,14 +1116,13 @@ PHP_FUNCTION(cairo_clip_preserve)
}
/* }}} */
-/* {{{ proto array cairo_clip_extents(CairoContext object)
- proto array CairoContext->clipExtents()
- Computes a bounding box in user coordinates covering the area inside the current clip. */
-PHP_FUNCTION(cairo_clip_extents)
+/* {{{ proto void cairo_reset_clip(CairoContext object)
+ proto void CairoContext->resetclip()
+ Reset the current clip region to its original, unrestricted state. */
+PHP_FUNCTION(cairo_reset_clip)
{
zval *context_zval = NULL;
cairo_context_object *context_object;
- double x1, y1, x2, y2;
PHP_CAIRO_ERROR_HANDLING(FALSE)
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &context_zval, cairo_ce_cairocontext) == FAILURE) {
@@ -1131,24 +1132,20 @@ PHP_FUNCTION(cairo_clip_extents)
PHP_CAIRO_RESTORE_ERRORS(FALSE)
context_object = (cairo_context_object *)cairo_context_object_get(context_zval TSRMLS_CC);
- cairo_clip_extents(context_object->context, &x1, &y1, &x2, &y2);
+ cairo_reset_clip(context_object->context);
PHP_CAIRO_ERROR(cairo_status(context_object->context));
-
- array_init(return_value);
- add_next_index_double(return_value, x1);
- add_next_index_double(return_value, y1);
- add_next_index_double(return_value, x2);
- add_next_index_double(return_value, y2);
}
/* }}} */
-/* {{{ proto void cairo_reset_clip(CairoContext object)
- proto void CairoContext->resetclip()
- Reset the current clip region to its original, unrestricted state. */
-PHP_FUNCTION(cairo_reset_clip)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
+/* {{{ proto array cairo_clip_extents(CairoContext object)
+ proto array CairoContext->clipExtents()
+ Computes a bounding box in user coordinates covering the area inside the current clip. */
+PHP_FUNCTION(cairo_clip_extents)
{
zval *context_zval = NULL;
cairo_context_object *context_object;
+ double x1, y1, x2, y2;
PHP_CAIRO_ERROR_HANDLING(FALSE)
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &context_zval, cairo_ce_cairocontext) == FAILURE) {
@@ -1158,8 +1155,14 @@ PHP_FUNCTION(cairo_reset_clip)
PHP_CAIRO_RESTORE_ERRORS(FALSE)
context_object = (cairo_context_object *)cairo_context_object_get(context_zval TSRMLS_CC);
- cairo_reset_clip(context_object->context);
+ cairo_clip_extents(context_object->context, &x1, &y1, &x2, &y2);
PHP_CAIRO_ERROR(cairo_status(context_object->context));
+
+ array_init(return_value);
+ add_next_index_double(return_value, x1);
+ add_next_index_double(return_value, y1);
+ add_next_index_double(return_value, x2);
+ add_next_index_double(return_value, y2);
}
/* }}} */
@@ -1204,6 +1207,7 @@ PHP_FUNCTION(cairo_clip_rectangle_list)
cairo_rectangle_list_destroy(rectangles);
}
/* }}} */
+#endif
/* {{{ proto void cairo_fill(CairoContext object)
proto void CairoContext->fill()
@@ -2644,6 +2648,7 @@ PHP_FUNCTION(cairo_set_scaled_font)
}
/* }}} */
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
/* {{{ proto CairoScaledFont object cairo_get_scaled_font(CairoContext object)
proto CairoScaledFont object CairoContext->getScaledFont()
Retrieves the scaled font face selected by the context. If no scaled font has been selected or set then the default face
@@ -2683,6 +2688,7 @@ PHP_FUNCTION(cairo_get_scaled_font)
cairo_scaled_font_reference(scaled_font_object->scaled_font);
}
/* }}} */
+#endif
/* {{{ proto array cairo_show_text(CairoContext object, string text)
proto array CairoContext->showText(string text)
@@ -2799,8 +2805,10 @@ const zend_function_entry cairo_context_methods[] = {
PHP_ME_MAPPING(setAntialias, cairo_set_antialias, CairoContext_setAntialias_args, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getAntialias, cairo_get_antialias, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(setDash, cairo_set_dash, CairoContext_setDash_args, ZEND_ACC_PUBLIC)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
PHP_ME_MAPPING(getDashCount, cairo_get_dash_count, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getDash, cairo_get_dash, NULL, ZEND_ACC_PUBLIC)
+#endif
PHP_ME_MAPPING(setFillRule, cairo_set_fill_rule, CairoContext_setFillRule_args, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getFillRule, cairo_get_fill_rule, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(setLineCap, cairo_set_line_cap, CairoContext_setFillRule_args, ZEND_ACC_PUBLIC)
@@ -2817,9 +2825,13 @@ const zend_function_entry cairo_context_methods[] = {
PHP_ME_MAPPING(getTolerance, cairo_get_tolerance, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(clip, cairo_clip, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(clipPreserve, cairo_clip_preserve, NULL, ZEND_ACC_PUBLIC)
- PHP_ME_MAPPING(clipExtents, cairo_clip_extents, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(resetClip, cairo_reset_clip, NULL, ZEND_ACC_PUBLIC)
+
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
+ PHP_ME_MAPPING(clipExtents, cairo_clip_extents, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(clipRectangleList, cairo_clip_rectangle_list, NULL, ZEND_ACC_PUBLIC)
+#endif
+
PHP_ME_MAPPING(fill, cairo_fill, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(fillPreserve, cairo_fill_preserve, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(fillExtents, cairo_fill_extents, NULL, ZEND_ACC_PUBLIC)
@@ -2881,7 +2893,9 @@ const zend_function_entry cairo_context_methods[] = {
PHP_ME_MAPPING(setFontFace, cairo_set_font_face, CairoContext_setFontFace_args, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getFontFace, cairo_get_font_face, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(setScaledFont, cairo_set_scaled_font, CairoContext_setScaledFont_args, ZEND_ACC_PUBLIC)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
PHP_ME_MAPPING(getScaledFont, cairo_get_scaled_font, NULL, ZEND_ACC_PUBLIC)
+#endif
PHP_ME_MAPPING(showText, cairo_show_text, CairoContext_text_args, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(fontExtents, cairo_font_extents, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(textExtents, cairo_text_extents, CairoContext_text_args, ZEND_ACC_PUBLIC)
View
@@ -68,8 +68,11 @@ PHP_MINIT_FUNCTION(cairo_error)
REGISTER_CAIRO_STATUS_LONG_CONST("FILE_NOT_FOUND", CAIRO_STATUS_FILE_NOT_FOUND);
REGISTER_CAIRO_STATUS_LONG_CONST("INVALID_DASH", CAIRO_STATUS_INVALID_DASH);
REGISTER_CAIRO_STATUS_LONG_CONST("INVALID_DSC_COMMENT", CAIRO_STATUS_INVALID_DSC_COMMENT);
+
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
REGISTER_CAIRO_STATUS_LONG_CONST("INVALID_INDEX", CAIRO_STATUS_INVALID_INDEX);
REGISTER_CAIRO_STATUS_LONG_CONST("CLIP_NOT_REPRESENTABLE", CAIRO_STATUS_CLIP_NOT_REPRESENTABLE);
+#endif
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 6, 0)
REGISTER_CAIRO_STATUS_LONG_CONST("TEMP_FILE_ERROR", CAIRO_STATUS_TEMP_FILE_ERROR);
View
@@ -276,6 +276,7 @@ PHP_FUNCTION(cairo_pattern_add_color_stop_rgba)
}
/* }}} */
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
/* {{{ proto array cairo_pattern_get_color_stop_rgba(CairoPattern object)
proto array CairoGradientPattern->getColorStopRgba()
Gets the color and offset information at the given index for a gradient pattern */
@@ -328,6 +329,7 @@ PHP_FUNCTION(cairo_pattern_get_color_stop_count)
RETURN_LONG(count);
}
/* }}} */
+#endif
/* {{{ proto int CairoGradientPattern->getExtend()
Gets the current extend mode for a pattern */
@@ -374,8 +376,10 @@ PHP_METHOD(CairoGradientPattern, setExtend)
const zend_function_entry cairo_gradientpattern_methods[] = {
PHP_ME_MAPPING(addColorStopRgb, cairo_pattern_add_color_stop_rgb, CairoGradient_addColorStopRgb_args, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(addColorStopRgba, cairo_pattern_add_color_stop_rgba, CairoGradient_addColorStopRgba_args, ZEND_ACC_PUBLIC)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
PHP_ME_MAPPING(getColorStopRgba, cairo_pattern_get_color_stop_rgba, CairoGradient_getColorStopRgba_args, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getColorStopCount, cairo_pattern_get_color_stop_count, NULL, ZEND_ACC_PUBLIC)
+#endif
PHP_ME(CairoGradientPattern, getExtend, NULL, ZEND_ACC_PUBLIC)
PHP_ME(CairoGradientPattern, setExtend, CairoSurfacePattern_setExtend_args, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
@@ -445,6 +449,7 @@ PHP_METHOD(CairoSolidPattern, __construct)
}
/* }}} */
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
/* {{{ proto array cairo_pattern_get_rgba(CairoSolidPattern object)
proto array CairoSolidPattern->getRgba()
This function returns an array with four elements, the float values of red, green, blue, and alpha from the solid pattern */
@@ -472,11 +477,14 @@ PHP_FUNCTION(cairo_pattern_get_rgba)
add_assoc_double(return_value, "alpha", alpha);
}
/* }}} */
+#endif
/* {{{ cairo_solidpattern_methods[] */
const zend_function_entry cairo_solidpattern_methods[] = {
PHP_ME(CairoSolidPattern, __construct, CairoSolidPattern___construct_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
PHP_ME_MAPPING(getRgba, cairo_pattern_get_rgba, NULL, ZEND_ACC_PUBLIC)
+#endif
{NULL, NULL, NULL}
};
/* }}} */
@@ -533,6 +541,7 @@ PHP_METHOD(CairoSurfacePattern, __construct)
}
/* }}} */
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
/* {{{ proto CairoSurface object cairo_pattern_get_surface(CairoSurfacePattern object)
proto CairoSurface object CairoSurfacePattern->getSurface()
This function returns the surface object */
@@ -570,6 +579,7 @@ PHP_FUNCTION(cairo_pattern_get_surface)
surface_object = (cairo_surface_object *)zend_object_store_get_object(return_value TSRMLS_CC);
}
/* }}} */
+#endif
/* {{{ proto int cairo_pattern_get_filter(CairoSurfacePattern object)
proto int CairoPattern->getFilter()
@@ -699,7 +709,10 @@ PHP_FUNCTION(cairo_pattern_set_extend)
/* {{{ cairo_surfacepattern_methods[] */
const zend_function_entry cairo_surfacepattern_methods[] = {
PHP_ME(CairoSurfacePattern, __construct, CairoSurfacePattern___construct_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
+#
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
PHP_ME_MAPPING(getSurface, cairo_pattern_get_surface, NULL, ZEND_ACC_PUBLIC)
+#endif
PHP_ME_MAPPING(setFilter, cairo_pattern_set_filter, CairoSurfacePattern_setFilter_args, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getFilter, cairo_pattern_get_filter, NULL, ZEND_ACC_PUBLIC)
PHP_ME(CairoSurfacePattern, setExtend, CairoSurfacePattern_setExtend_args, ZEND_ACC_PUBLIC)
@@ -748,6 +761,7 @@ PHP_METHOD(CairoLinearGradient, __construct)
}
/* }}} */
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
/* {{{ proto void cairo_pattern_get_linear_points(CairoLinearGradient object)
proto void CairoLinearGradient->getPoints()
Gets the gradient endpoints for a linear gradient. */
@@ -774,13 +788,16 @@ PHP_FUNCTION(cairo_pattern_get_linear_points)
add_assoc_double(return_value, "x1", x1);
add_assoc_double(return_value, "y1", y1);
}
+#endif
/* }}} */
/* {{{ cairo_lineargradient_methods[] */
const zend_function_entry cairo_lineargradient_methods[] = {
PHP_ME(CairoLinearGradient, __construct, CairoLinearGradient___construct_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
PHP_ME_MAPPING(getPoints, cairo_pattern_get_linear_points, NULL, ZEND_ACC_PUBLIC)
+#endif
{NULL, NULL, NULL}
};
/* }}} */
@@ -825,6 +842,7 @@ PHP_METHOD(CairoRadialGradient, __construct)
}
/* }}} */
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
/* {{{ proto void cairo_pattern_get_radial_circles(CairoRadialGradient object)
proto void CairoRadialGradient->getCircles()
Gets the gradient endpoint circles for a radial gradient, each specified as a center coordinate and a radius. */
@@ -853,13 +871,16 @@ PHP_FUNCTION(cairo_pattern_get_radial_circles)
add_assoc_double(return_value, "y1", y1);
add_assoc_double(return_value, "r1", r1);
}
+#endif
/* }}} */
/* {{{ cairo_radialgradient_methods[] */
const zend_function_entry cairo_radialgradient_methods[] = {
PHP_ME(CairoRadialGradient, __construct, CairoRadialGradient___construct_args, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
PHP_ME_MAPPING(getCircles, cairo_pattern_get_radial_circles, NULL, ZEND_ACC_PUBLIC)
+#endif
{NULL, NULL, NULL}
};
/* }}} */
View
@@ -440,8 +440,10 @@ PHP_MINIT_FUNCTION(cairo_ps_surface)
zend_declare_class_constant_long(cairo_ce_cairopslevel, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); \
REGISTER_LONG_CONSTANT(#value, value, CONST_CS | CONST_PERSISTENT);
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 4, 0)
REGISTER_CAIRO_PSLEVEL_LONG_CONST("LEVEL_2", CAIRO_PS_LEVEL_2);
REGISTER_CAIRO_PSLEVEL_LONG_CONST("LEVEL_3", CAIRO_PS_LEVEL_3);
+#endif
return SUCCESS;
}
View
@@ -414,6 +414,7 @@ PHP_FUNCTION(cairo_scaled_font_get_ctm)
}
/* }}} */
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 8, 0)
/* {{{ proto CairoMatrix object cairo_scaled_font_get_scale_matrix (CairoScaledFont object)
proto CairoMatrix object CairoScaledFont->getScaleMatrix()
The scale matrix is product of the font matrix and the ctm associated with the scaled font, and hence is the matrix mapping from font space to device space */
@@ -440,6 +441,7 @@ PHP_FUNCTION(cairo_scaled_font_get_scale_matrix)
cairo_scaled_font_get_scale_matrix(scaled_font_object->scaled_font, matrix_object->matrix);
}
/* }}} */
+#endif
/* {{{ proto long cairo_scaled_font_get_type(CairoScaledFont object)
proto long CairoScaledFont->getType()
@@ -472,7 +474,9 @@ const zend_function_entry cairo_scaled_font_methods[] = {
PHP_ME_MAPPING(getFontOptions, cairo_scaled_font_get_font_options, NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getFontMatrix, cairo_scaled_font_get_font_matrix , NULL, ZEND_ACC_PUBLIC)
PHP_ME_MAPPING(getCtm, cairo_scaled_font_get_ctm, NULL, ZEND_ACC_PUBLIC)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 8, 0)
PHP_ME_MAPPING(getScaleMatrix, cairo_scaled_font_get_scale_matrix, NULL, ZEND_ACC_PUBLIC)
+#endif
PHP_ME_MAPPING(getType, cairo_scaled_font_get_type , NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
Oops, something went wrong.

0 comments on commit 9ddd8be

Please sign in to comment.