Started adding Exception Handling
[phpCairo.git] / individual_files / phpCairoContext.c
blobb17e31fb196955210b3e62b2e23b1922d9e18ebf
1 /* {{{ Class CairoContext */
3 static zend_class_entry * CairoContext_ce_ptr = NULL;
5 /* {{{ Methods */
8 /* {{{ proto void construct(object obj)
9 */
10 PHP_METHOD(CairoContext, __construct)
12 zend_class_entry * _this_ce;
13 zval * _this_zval;
15 zval * obj = NULL;
17 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|o", &obj) == FAILURE) {
18 return;
21 _this_zval = getThis();
22 _this_ce = Z_OBJCE_P(_this_zval);
23 cairo_surface_t *surface;
24 //if(obj != NULL) {
26 surface_object *sobj = (surface_object *)zend_object_store_get_object(obj TSRMLS_CC);
27 //}
28 //else {
29 // surface_object *sobj = (surface_object *)malloc(surface_object);
30 //}
32 surface = sobj->surface;
33 context_object *context=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
34 context->context=cairo_create(surface);
36 /*php_error(E_WARNING, "__construct: not yet implemented"); RETURN_FALSE; */
39 /* }}} __construct */
43 /* {{{ proto void append_path(object p)
45 PHP_METHOD(CairoContext, append_path)
47 zend_class_entry * _this_ce;
49 zval * _this_zval = NULL;
50 zval * p = NULL;
54 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &p) == FAILURE) {
55 return;
58 _this_ce = Z_OBJCE_P(_this_zval);
59 context_object *curr = (context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
60 path_object *pobj=(path_object *)zend_objects_get_address(p TSRMLS_CC);
61 cairo_append_path(curr->context,pobj->path);
62 phpCAIRO_CONTEXT_ERROR(curr->context)
65 /* }}} append_path */
69 /* {{{ proto void arc(float xc, float yc, float radius, float angle1, float angle2)
71 PHP_METHOD(CairoContext, arc)
73 zend_class_entry * _this_ce;
75 zval * _this_zval = NULL;
76 double xc = 0.0;
77 double yc = 0.0;
78 double radius = 0.0;
79 double angle1 = 0.0;
80 double angle2 = 0.0;
84 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oddddd", &_this_zval, CairoContext_ce_ptr, &xc, &yc, &radius, &angle1, &angle2) == FAILURE) {
85 return;
88 _this_ce = Z_OBJCE_P(_this_zval);
89 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
90 cairo_arc(curr->context,xc,yc,radius,angle1,angle2);
91 phpCAIRO_CONTEXT_ERROR(curr->context)
94 /* }}} arc */
96 /* {{{ proto void arc_negative(float xc, float yc, float radius, float angle1, float angle2)
98 PHP_METHOD(CairoContext, arc_negative)
100 zend_class_entry * _this_ce;
102 zval * _this_zval = NULL;
103 double xc = 0.0;
104 double yc = 0.0;
105 double radius = 0.0;
106 double angle1 = 0.0;
107 double angle2 = 0.0;
111 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oddddd", &_this_zval, CairoContext_ce_ptr, &xc, &yc, &radius, &angle1, &angle2) == FAILURE) {
112 return;
115 _this_ce = Z_OBJCE_P(_this_zval);
117 context_object *curr = (context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
120 cairo_arc_negative(curr->context, xc, yc, radius, angle1, angle2);
121 phpCAIRO_CONTEXT_ERROR(curr->context)
125 /* }}} arc_negative */
129 /* {{{ proto void clip()
131 PHP_METHOD(CairoContext, clip)
133 zend_class_entry * _this_ce;
135 zval * _this_zval = NULL;
139 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
140 return;
143 _this_ce = Z_OBJCE_P(_this_zval);
144 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
145 cairo_clip(curr->context);
146 phpCAIRO_CONTEXT_ERROR(curr->context)
148 /* }}} clip */
152 /* {{{ proto array clip_extents()
154 PHP_METHOD(CairoContext, clip_extents)
156 zend_class_entry * _this_ce;
158 zval * _this_zval = NULL;
160 double x1, y1, x2, y2;
162 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
163 return;
166 _this_ce = Z_OBJCE_P(_this_zval);
167 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
169 cairo_clip_extents(curr->context, &x1, &y1, &x2, &y2);
170 phpCAIRO_CONTEXT_ERROR(curr->context)
171 array_init(return_value);
172 add_next_index_double(return_value, x1);
173 add_next_index_double(return_value, y1);
174 add_next_index_double(return_value, x2);
175 add_next_index_double(return_value, y2);
178 /* }}} clip_extents */
182 /* {{{ proto void clip_preserve()
184 PHP_METHOD(CairoContext, clip_preserve)
186 zend_class_entry * _this_ce;
188 zval * _this_zval = NULL;
192 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
193 return;
196 _this_ce = Z_OBJCE_P(_this_zval);
198 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
200 cairo_clip_preserve(curr->context);
201 phpCAIRO_CONTEXT_ERROR(curr->context)
203 /* }}} clip_preserve */
207 /* {{{ proto void close_path()
209 PHP_METHOD(CairoContext, close_path)
211 zend_class_entry * _this_ce;
213 zval * _this_zval = NULL;
217 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
218 return;
221 _this_ce = Z_OBJCE_P(_this_zval);
222 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
224 cairo_close_path(curr->context);
225 phpCAIRO_CONTEXT_ERROR(curr->context)
228 /* }}} close_path */
232 /* {{{ proto object copy_clip_rectangle_list() --Not complete
234 PHP_METHOD(CairoContext, copy_clip_rectangle_list)
236 zend_class_entry * _this_ce;
238 zval * _this_zval = NULL;
239 cairo_rectangle_t *r;
240 cairo_rectangle_list_t *rlist;
241 zval *arr;
242 zval *temp_arr;
243 int i;
245 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
246 return;
248 _this_ce = Z_OBJCE_P(_this_zval);
249 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
250 rlist = cairo_copy_clip_rectangle_list(curr->context);
251 phpCAIRO_ERROR(rlist->status)
253 ALLOC_INIT_ZVAL(arr);
254 array_init(arr);
255 for(i = 0, r = rlist->rectangle; i < rlist->num_rectangles; i++, r++) {
256 ALLOC_INIT_ZVAL(temp_arr);
257 array_init(temp_arr);
258 array_assoc_double(temp_arr,"x",r->x);
259 array_assoc_double(temp_arr,"y",r->y);
260 array_assoc_double(temp_arr,"width",r->width);
261 array_assoc_double(temp_arr,"height",r->height);
262 add_next_index_zval(arr,temp_arr);
263 zval_ptr_dtor(temp_arr);
266 /* Need to pass the arr to an iterator */
267 //cairo_rectangle_list_destroy(rlist);
271 /* }}} copy_clip_rectangle_list */
275 /* {{{ proto void copy_page()
277 PHP_METHOD(CairoContext, copy_page)
279 zend_class_entry * _this_ce;
281 zval * _this_zval = NULL;
285 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
286 return;
289 _this_ce = Z_OBJCE_P(_this_zval);
290 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
291 cairo_copy_page(curr->context);
292 phpCAIRO_CONTEXT_ERROR(curr->context)
295 /* }}} copy_page */
299 /* {{{ proto object copy_path()
301 PHP_METHOD(CairoContext, copy_path)
303 zend_class_entry * _this_ce;
305 zval * _this_zval = NULL;
309 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
310 return;
313 _this_ce = Z_OBJCE_P(_this_zval);
314 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
316 object_init(return_value);
317 path_object *pobj = (path_object *)zend_objects_get_address(return_value TSRMLS_CC);
318 pobj = cairo_copy_path(curr->context);
320 /* }}} copy_path */
324 /* {{{ proto object copy_path_flat()
326 PHP_METHOD(CairoContext, copy_path_flat)
328 zend_class_entry * _this_ce;
330 zval * _this_zval = NULL;
334 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
335 return;
338 _this_ce = Z_OBJCE_P(_this_zval);
339 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
342 object_init(return_value);
344 /* }}} copy_path_flat */
348 /* {{{ proto void curve_to (float x1, float y1, float x2, float y2, float x3, float y3)
350 PHP_METHOD(CairoContext, curve_to)
352 zend_class_entry * _this_ce;
354 zval * _this_zval = NULL;
355 double x1 = 0.0;
356 double y1 = 0.0;
357 double x2 = 0.0;
358 double y2 = 0.0;
359 double x3 = 0.0;
360 double y3 = 0.0;
364 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odddddd", &_this_zval, CairoContext_ce_ptr, &x1, &y1, &x2, &y2, &x3, &y3) == FAILURE) {
365 return;
368 _this_ce = Z_OBJCE_P(_this_zval);
369 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
372 php_error(E_WARNING, "curve_to: not yet implemented"); RETURN_FALSE;
375 /* }}} curve_to */
379 /* {{{ proto array device_to_user(float x, float y)
381 PHP_METHOD(CairoContext, device_to_user)
383 zend_class_entry * _this_ce;
385 zval * _this_zval = NULL;
386 double x = 0.0;
387 double y = 0.0;
391 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
392 return;
395 _this_ce = Z_OBJCE_P(_this_zval);
396 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
399 array_init(return_value);
401 php_error(E_WARNING, "device_to_user: not yet implemented"); RETURN_FALSE;
403 array_init(return_value);
405 /* }}} device_to_user */
409 /* {{{ proto array device_to_user_distance(float x, float y)
411 PHP_METHOD(CairoContext, device_to_user_distance)
413 zend_class_entry * _this_ce;
415 zval * _this_zval = NULL;
416 double x = 0.0;
417 double y = 0.0;
421 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
422 return;
425 _this_ce = Z_OBJCE_P(_this_zval);
426 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
429 array_init(return_value);
431 php_error(E_WARNING, "device_to_user_distance: not yet implemented"); RETURN_FALSE;
433 array_init(return_value);
435 /* }}} device_to_user_distance */
439 /* {{{ proto void fill()
441 PHP_METHOD(CairoContext, fill)
443 zend_class_entry * _this_ce;
445 zval * _this_zval = NULL;
449 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
450 return;
453 _this_ce = Z_OBJCE_P(_this_zval);
454 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
457 php_error(E_WARNING, "fill: not yet implemented"); RETURN_FALSE;
460 /* }}} fill */
464 /* {{{ proto array fill_extents()
466 PHP_METHOD(CairoContext, fill_extents)
468 zend_class_entry * _this_ce;
470 zval * _this_zval = NULL;
474 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
475 return;
478 _this_ce = Z_OBJCE_P(_this_zval);
479 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
482 array_init(return_value);
484 php_error(E_WARNING, "fill_extents: not yet implemented"); RETURN_FALSE;
486 array_init(return_value);
488 /* }}} fill_extents */
492 /* {{{ proto void fill_preserve()
494 PHP_METHOD(CairoContext, fill_preserve)
496 zend_class_entry * _this_ce;
498 zval * _this_zval = NULL;
502 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
503 return;
506 _this_ce = Z_OBJCE_P(_this_zval);
507 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
510 php_error(E_WARNING, "fill_preserve: not yet implemented"); RETURN_FALSE;
513 /* }}} fill_preserve */
517 /* {{{ proto array font_extents()
519 PHP_METHOD(CairoContext, font_extents)
521 zend_class_entry * _this_ce;
523 zval * _this_zval = NULL;
527 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
528 return;
531 _this_ce = Z_OBJCE_P(_this_zval);
532 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
535 array_init(return_value);
537 php_error(E_WARNING, "font_extents: not yet implemented"); RETURN_FALSE;
539 array_init(return_value);
541 /* }}} font_extents */
545 /* {{{ proto int get_antialias()
547 PHP_METHOD(CairoContext, get_antialias)
549 zend_class_entry * _this_ce;
551 zval * _this_zval = NULL;
555 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
556 return;
559 _this_ce = Z_OBJCE_P(_this_zval);
560 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
563 php_error(E_WARNING, "get_antialias: not yet implemented"); RETURN_FALSE;
565 RETURN_LONG(0);
567 /* }}} get_antialias */
571 /* {{{ proto array get_current_point()
573 PHP_METHOD(CairoContext, get_current_point)
575 zend_class_entry * _this_ce;
577 zval * _this_zval = NULL;
581 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
582 return;
585 _this_ce = Z_OBJCE_P(_this_zval);
586 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
589 array_init(return_value);
591 php_error(E_WARNING, "get_current_point: not yet implemented"); RETURN_FALSE;
593 array_init(return_value);
595 /* }}} get_current_point */
599 /* {{{ proto array get_dash()
601 PHP_METHOD(CairoContext, get_dash)
603 zend_class_entry * _this_ce;
605 zval * _this_zval = NULL;
609 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
610 return;
613 _this_ce = Z_OBJCE_P(_this_zval);
614 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
617 array_init(return_value);
619 php_error(E_WARNING, "get_dash: not yet implemented"); RETURN_FALSE;
621 array_init(return_value);
623 /* }}} get_dash */
627 /* {{{ proto int get_dash_count()
629 PHP_METHOD(CairoContext, get_dash_count)
631 zend_class_entry * _this_ce;
633 zval * _this_zval = NULL;
637 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
638 return;
641 _this_ce = Z_OBJCE_P(_this_zval);
642 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
645 php_error(E_WARNING, "get_dash_count: not yet implemented"); RETURN_FALSE;
647 RETURN_LONG(0);
649 /* }}} get_dash_count */
653 /* {{{ proto int get_fill_rule()
655 PHP_METHOD(CairoContext, get_fill_rule)
657 zend_class_entry * _this_ce;
659 zval * _this_zval = NULL;
663 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
664 return;
667 _this_ce = Z_OBJCE_P(_this_zval);
668 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
671 php_error(E_WARNING, "get_fill_rule: not yet implemented"); RETURN_FALSE;
673 RETURN_LONG(0);
675 /* }}} get_fill_rule */
679 /* {{{ proto object get_font_face()
681 PHP_METHOD(CairoContext, get_font_face)
683 zend_class_entry * _this_ce;
685 zval * _this_zval = NULL;
689 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
690 return;
693 _this_ce = Z_OBJCE_P(_this_zval);
694 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
697 php_error(E_WARNING, "get_font_face: not yet implemented"); RETURN_FALSE;
699 object_init(return_value);
701 /* }}} get_font_face */
705 /* {{{ proto object get_font_matrix()
707 PHP_METHOD(CairoContext, get_font_matrix)
709 zend_class_entry * _this_ce;
711 zval * _this_zval = NULL;
715 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
716 return;
719 _this_ce = Z_OBJCE_P(_this_zval);
720 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
723 php_error(E_WARNING, "get_font_matrix: not yet implemented"); RETURN_FALSE;
725 object_init(return_value);
727 /* }}} get_font_matrix */
731 /* {{{ proto object get_font_options()
733 PHP_METHOD(CairoContext, get_font_options)
735 zend_class_entry * _this_ce;
737 zval * _this_zval = NULL;
741 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
742 return;
745 _this_ce = Z_OBJCE_P(_this_zval);
746 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
749 php_error(E_WARNING, "get_font_options: not yet implemented"); RETURN_FALSE;
751 object_init(return_value);
753 /* }}} get_font_options */
757 /* {{{ proto object get_group_target()
759 PHP_METHOD(CairoContext, get_group_target)
761 zend_class_entry * _this_ce;
763 zval * _this_zval = NULL;
767 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
768 return;
771 _this_ce = Z_OBJCE_P(_this_zval);
772 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
775 php_error(E_WARNING, "get_group_target: not yet implemented"); RETURN_FALSE;
777 object_init(return_value);
779 /* }}} get_group_target */
783 /* {{{ proto int get_line_cap()
785 PHP_METHOD(CairoContext, get_line_cap)
787 zend_class_entry * _this_ce;
789 zval * _this_zval = NULL;
793 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
794 return;
797 _this_ce = Z_OBJCE_P(_this_zval);
798 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
801 php_error(E_WARNING, "get_line_cap: not yet implemented"); RETURN_FALSE;
803 RETURN_LONG(0);
805 /* }}} get_line_cap */
809 /* {{{ proto int get_line_join()
811 PHP_METHOD(CairoContext, get_line_join)
813 zend_class_entry * _this_ce;
815 zval * _this_zval = NULL;
819 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
820 return;
823 _this_ce = Z_OBJCE_P(_this_zval);
824 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
827 php_error(E_WARNING, "get_line_join: not yet implemented"); RETURN_FALSE;
829 RETURN_LONG(0);
831 /* }}} get_line_join */
835 /* {{{ proto float get_line_width()
837 PHP_METHOD(CairoContext, get_line_width)
839 zend_class_entry * _this_ce;
841 zval * _this_zval = NULL;
845 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
846 return;
849 _this_ce = Z_OBJCE_P(_this_zval);
850 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
853 php_error(E_WARNING, "get_line_width: not yet implemented"); RETURN_FALSE;
855 RETURN_DOUBLE(0.0);
857 /* }}} get_line_width */
861 /* {{{ proto object get_matrix()
863 PHP_METHOD(CairoContext, get_matrix)
865 zend_class_entry * _this_ce;
867 zval * _this_zval = NULL;
871 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
872 return;
875 _this_ce = Z_OBJCE_P(_this_zval);
876 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
879 php_error(E_WARNING, "get_matrix: not yet implemented"); RETURN_FALSE;
881 object_init(return_value);
883 /* }}} get_matrix */
887 /* {{{ proto float get_matrix_limit()
889 PHP_METHOD(CairoContext, get_matrix_limit)
891 zend_class_entry * _this_ce;
893 zval * _this_zval = NULL;
897 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
898 return;
901 _this_ce = Z_OBJCE_P(_this_zval);
902 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
905 php_error(E_WARNING, "get_matrix_limit: not yet implemented"); RETURN_FALSE;
907 RETURN_DOUBLE(0.0);
909 /* }}} get_matrix_limit */
913 /* {{{ proto int get_operator()
915 PHP_METHOD(CairoContext, get_operator)
917 zend_class_entry * _this_ce;
919 zval * _this_zval = NULL;
923 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
924 return;
927 _this_ce = Z_OBJCE_P(_this_zval);
928 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
931 php_error(E_WARNING, "get_operator: not yet implemented"); RETURN_FALSE;
933 RETURN_LONG(0);
935 /* }}} get_operator */
939 /* {{{ proto object get_scaled_font()
941 PHP_METHOD(CairoContext, get_scaled_font)
943 zend_class_entry * _this_ce;
945 zval * _this_zval = NULL;
949 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
950 return;
953 _this_ce = Z_OBJCE_P(_this_zval);
954 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
957 php_error(E_WARNING, "get_scaled_font: not yet implemented"); RETURN_FALSE;
959 object_init(return_value);
961 /* }}} get_scaled_font */
965 /* {{{ proto object get_source()
967 PHP_METHOD(CairoContext, get_source)
969 zend_class_entry * _this_ce;
971 zval * _this_zval = NULL;
975 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
976 return;
979 _this_ce = Z_OBJCE_P(_this_zval);
980 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
983 php_error(E_WARNING, "get_source: not yet implemented"); RETURN_FALSE;
985 object_init(return_value);
987 /* }}} get_source */
991 /* {{{ proto object get_target()
993 PHP_METHOD(CairoContext, get_target)
995 zend_class_entry * _this_ce;
997 zval * _this_zval = NULL;
1001 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1002 return;
1005 _this_ce = Z_OBJCE_P(_this_zval);
1006 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1009 php_error(E_WARNING, "get_target: not yet implemented"); RETURN_FALSE;
1011 object_init(return_value);
1013 /* }}} get_target */
1017 /* {{{ proto float get_tolerance()
1019 PHP_METHOD(CairoContext, get_tolerance)
1021 zend_class_entry * _this_ce;
1023 zval * _this_zval = NULL;
1027 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1028 return;
1031 _this_ce = Z_OBJCE_P(_this_zval);
1032 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1035 php_error(E_WARNING, "get_tolerance: not yet implemented"); RETURN_FALSE;
1037 RETURN_DOUBLE(0.0);
1039 /* }}} get_tolerance */
1043 /* {{{ proto array get_extents(object obj[,int num])
1045 PHP_METHOD(CairoContext, glyph_extents)
1047 zend_class_entry * _this_ce;
1049 zval * _this_zval = NULL;
1050 zval * obj = NULL;
1051 long num = 0;
1055 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo|l", &_this_zval, CairoContext_ce_ptr, &obj, &num) == FAILURE) {
1056 return;
1059 _this_ce = Z_OBJCE_P(_this_zval);
1060 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1063 array_init(return_value);
1065 do {
1066 /*This might be a prob*/
1067 } while (0);
1069 /* }}} glyph_extents */
1073 /* {{{ proto void glyph_pat(object obh[,int num])
1075 PHP_METHOD(CairoContext, glyph_path)
1077 zend_class_entry * _this_ce;
1079 zval * _this_zval = NULL;
1080 zval * obh = NULL;
1081 long num = 0;
1085 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo|l", &_this_zval, CairoContext_ce_ptr, &obh, &num) == FAILURE) {
1086 return;
1089 _this_ce = Z_OBJCE_P(_this_zval);
1090 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1093 php_error(E_WARNING, "glyph_path: not yet implemented"); RETURN_FALSE;
1096 /* }}} glyph_path */
1100 /* {{{ proto bool has_current_point()
1102 PHP_METHOD(CairoContext, has_current_point)
1104 zend_class_entry * _this_ce;
1106 zval * _this_zval = NULL;
1110 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1111 return;
1114 _this_ce = Z_OBJCE_P(_this_zval);
1115 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1118 do {
1119 /* ONLY for CAIRO 1.6 */
1120 } while (0);
1122 /* }}} has_current_point */
1126 /* {{{ proto void identity_matrix()
1128 PHP_METHOD(CairoContext, identity_matrix)
1130 zend_class_entry * _this_ce;
1132 zval * _this_zval = NULL;
1136 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1137 return;
1140 _this_ce = Z_OBJCE_P(_this_zval);
1141 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1144 php_error(E_WARNING, "identity_matrix: not yet implemented"); RETURN_FALSE;
1147 /* }}} identity_matrix */
1151 /* {{{ proto bool in_fill(float x, float y)
1153 PHP_METHOD(CairoContext, in_fill)
1155 zend_class_entry * _this_ce;
1157 zval * _this_zval = NULL;
1158 double x = 0.0;
1159 double y = 0.0;
1163 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
1164 return;
1167 _this_ce = Z_OBJCE_P(_this_zval);
1168 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1171 php_error(E_WARNING, "in_fill: not yet implemented"); RETURN_FALSE;
1173 RETURN_FALSE;
1175 /* }}} in_fill */
1179 /* {{{ proto bool in_stroke(float x, float y)
1181 PHP_METHOD(CairoContext, in_stroke)
1183 zend_class_entry * _this_ce;
1185 zval * _this_zval = NULL;
1186 double x = 0.0;
1187 double y = 0.0;
1191 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
1192 return;
1195 _this_ce = Z_OBJCE_P(_this_zval);
1196 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1199 php_error(E_WARNING, "in_stroke: not yet implemented"); RETURN_FALSE;
1201 RETURN_FALSE;
1203 /* }}} in_stroke */
1207 /* {{{ proto void line_to(float x, float y)
1209 PHP_METHOD(CairoContext, line_to)
1211 zend_class_entry * _this_ce;
1213 zval * _this_zval = NULL;
1214 double x = 0.0;
1215 double y = 0.0;
1219 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
1220 return;
1223 _this_ce = Z_OBJCE_P(_this_zval);
1224 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1227 php_error(E_WARNING, "line_to: not yet implemented"); RETURN_FALSE;
1230 /* }}} line_to */
1234 /* {{{ proto void mask(object p)
1236 PHP_METHOD(CairoContext, mask)
1238 zend_class_entry * _this_ce;
1240 zval * _this_zval = NULL;
1241 zval * p = NULL;
1245 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &p) == FAILURE) {
1246 return;
1249 _this_ce = Z_OBJCE_P(_this_zval);
1250 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1253 php_error(E_WARNING, "mask: not yet implemented"); RETURN_FALSE;
1256 /* }}} mask */
1260 /* {{{ proto void mask_surface(object s[,float surface_x, float surface_y])
1262 PHP_METHOD(CairoContext, mask_surface)
1264 zend_class_entry * _this_ce;
1266 zval * _this_zval = NULL;
1267 zval * s = NULL;
1268 double surface_x = 0.0;
1269 double surface_y = 0.0;
1273 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo|dd", &_this_zval, CairoContext_ce_ptr, &s, &surface_x, &surface_y) == FAILURE) {
1274 return;
1277 _this_ce = Z_OBJCE_P(_this_zval);
1278 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1281 php_error(E_WARNING, "mask_surface: not yet implemented"); RETURN_FALSE;
1284 /* }}} mask_surface */
1288 /* {{{ proto void move_to(float x, float y)
1290 PHP_METHOD(CairoContext, move_to)
1292 zend_class_entry * _this_ce;
1294 zval * _this_zval = NULL;
1295 double x = 0.0;
1296 double y = 0.0;
1300 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
1301 return;
1304 _this_ce = Z_OBJCE_P(_this_zval);
1305 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1308 php_error(E_WARNING, "move_to: not yet implemented"); RETURN_FALSE;
1311 /* }}} move_to */
1315 /* {{{ proto void new_path()
1317 PHP_METHOD(CairoContext, new_path)
1319 zend_class_entry * _this_ce;
1321 zval * _this_zval = NULL;
1325 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1326 return;
1329 _this_ce = Z_OBJCE_P(_this_zval);
1330 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1333 php_error(E_WARNING, "new_path: not yet implemented"); RETURN_FALSE;
1336 /* }}} new_path */
1340 /* {{{ proto void new_sub_path()
1342 PHP_METHOD(CairoContext, new_sub_path)
1344 zend_class_entry * _this_ce;
1346 zval * _this_zval = NULL;
1350 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1351 return;
1354 _this_ce = Z_OBJCE_P(_this_zval);
1355 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1358 php_error(E_WARNING, "new_sub_path: not yet implemented"); RETURN_FALSE;
1361 /* }}} new_sub_path */
1365 /* {{{ proto void paint()
1367 PHP_METHOD(CairoContext, paint)
1369 zend_class_entry * _this_ce;
1371 zval * _this_zval = NULL;
1375 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1376 return;
1379 _this_ce = Z_OBJCE_P(_this_zval);
1380 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1383 php_error(E_WARNING, "paint: not yet implemented"); RETURN_FALSE;
1386 /* }}} paint */
1390 /* {{{ proto void paint_with_alpha(float alpha)
1392 PHP_METHOD(CairoContext, paint_with_alpha)
1394 zend_class_entry * _this_ce;
1396 zval * _this_zval = NULL;
1397 double alpha = 0.0;
1401 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Od", &_this_zval, CairoContext_ce_ptr, &alpha) == FAILURE) {
1402 return;
1405 _this_ce = Z_OBJCE_P(_this_zval);
1406 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1409 php_error(E_WARNING, "paint_with_alpha: not yet implemented"); RETURN_FALSE;
1412 /* }}} paint_with_alpha */
1416 /* {{{ proto array path_extents([object path])
1418 PHP_METHOD(CairoContext, path_extents)
1420 zend_class_entry * _this_ce;
1422 zval * _this_zval = NULL;
1423 zval * path = NULL;
1427 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|o", &_this_zval, CairoContext_ce_ptr, &path) == FAILURE) {
1428 return;
1431 _this_ce = Z_OBJCE_P(_this_zval);
1432 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1435 array_init(return_value);
1437 do {
1438 /* ONLY for CAIRO 1.6 */
1439 } while (0);
1441 /* }}} path_extents */
1445 /* {{{ proto object pop_group()
1447 PHP_METHOD(CairoContext, pop_group)
1449 zend_class_entry * _this_ce;
1451 zval * _this_zval = NULL;
1455 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1456 return;
1459 _this_ce = Z_OBJCE_P(_this_zval);
1460 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1463 php_error(E_WARNING, "pop_group: not yet implemented"); RETURN_FALSE;
1465 object_init(return_value);
1467 /* }}} pop_group */
1471 /* {{{ proto void pop_group_to_source()
1473 PHP_METHOD(CairoContext, pop_group_to_source)
1475 zend_class_entry * _this_ce;
1477 zval * _this_zval = NULL;
1481 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1482 return;
1485 _this_ce = Z_OBJCE_P(_this_zval);
1486 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1489 php_error(E_WARNING, "pop_group_to_source: not yet implemented"); RETURN_FALSE;
1492 /* }}} pop_group_to_source */
1496 /* {{{ proto void push_group()
1498 PHP_METHOD(CairoContext, push_group)
1500 zend_class_entry * _this_ce;
1502 zval * _this_zval = NULL;
1506 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1507 return;
1510 _this_ce = Z_OBJCE_P(_this_zval);
1511 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1514 php_error(E_WARNING, "push_group: not yet implemented"); RETURN_FALSE;
1517 /* }}} push_group */
1521 /* {{{ proto void push_group_with_content(int content)
1523 PHP_METHOD(CairoContext, push_group_with_content)
1525 zend_class_entry * _this_ce;
1527 zval * _this_zval = NULL;
1528 long content = 0;
1532 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &_this_zval, CairoContext_ce_ptr, &content) == FAILURE) {
1533 return;
1536 _this_ce = Z_OBJCE_P(_this_zval);
1537 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1540 php_error(E_WARNING, "push_group_with_content: not yet implemented"); RETURN_FALSE;
1543 /* }}} push_group_with_content */
1547 /* {{{ proto void rectangle(float x, float y, float width, float height)
1549 PHP_METHOD(CairoContext, rectangle)
1551 zend_class_entry * _this_ce;
1553 zval * _this_zval = NULL;
1554 double x = 0.0;
1555 double y = 0.0;
1556 double width = 0.0;
1557 double height = 0.0;
1561 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odddd", &_this_zval, CairoContext_ce_ptr, &x, &y, &width, &height) == FAILURE) {
1562 return;
1565 _this_ce = Z_OBJCE_P(_this_zval);
1566 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1569 php_error(E_WARNING, "rectangle: not yet implemented"); RETURN_FALSE;
1572 /* }}} rectangle */
1576 /* {{{ proto void rel_curve_to(float x1, float y1, float x2, float y2, float x3, float y3)
1578 PHP_METHOD(CairoContext, rel_curve_to)
1580 zend_class_entry * _this_ce;
1582 zval * _this_zval = NULL;
1583 double x1 = 0.0;
1584 double y1 = 0.0;
1585 double x2 = 0.0;
1586 double y2 = 0.0;
1587 double x3 = 0.0;
1588 double y3 = 0.0;
1592 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odddddd", &_this_zval, CairoContext_ce_ptr, &x1, &y1, &x2, &y2, &x3, &y3) == FAILURE) {
1593 return;
1596 _this_ce = Z_OBJCE_P(_this_zval);
1597 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1600 php_error(E_WARNING, "rel_curve_to: not yet implemented"); RETURN_FALSE;
1603 /* }}} rel_curve_to */
1607 /* {{{ proto void rel_line_to(float x, float y)
1609 PHP_METHOD(CairoContext, rel_line_to)
1611 zend_class_entry * _this_ce;
1613 zval * _this_zval = NULL;
1614 double x = 0.0;
1615 double y = 0.0;
1619 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
1620 return;
1623 _this_ce = Z_OBJCE_P(_this_zval);
1624 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1627 php_error(E_WARNING, "rel_line_to: not yet implemented"); RETURN_FALSE;
1630 /* }}} rel_line_to */
1634 /* {{{ proto void rel_move_to(float x, float y)
1636 PHP_METHOD(CairoContext, rel_move_to)
1638 zend_class_entry * _this_ce;
1640 zval * _this_zval = NULL;
1641 double x = 0.0;
1642 double y = 0.0;
1646 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
1647 return;
1650 _this_ce = Z_OBJCE_P(_this_zval);
1651 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1654 php_error(E_WARNING, "rel_move_to: not yet implemented"); RETURN_FALSE;
1657 /* }}} rel_move_to */
1661 /* {{{ proto void reset_clip()
1663 PHP_METHOD(CairoContext, reset_clip)
1665 zend_class_entry * _this_ce;
1667 zval * _this_zval = NULL;
1671 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1672 return;
1675 _this_ce = Z_OBJCE_P(_this_zval);
1676 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1679 php_error(E_WARNING, "reset_clip: not yet implemented"); RETURN_FALSE;
1682 /* }}} reset_clip */
1686 /* {{{ proto void restore()
1688 PHP_METHOD(CairoContext, restore)
1690 zend_class_entry * _this_ce;
1692 zval * _this_zval = NULL;
1696 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1697 return;
1700 _this_ce = Z_OBJCE_P(_this_zval);
1701 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1704 php_error(E_WARNING, "restore: not yet implemented"); RETURN_FALSE;
1707 /* }}} restore */
1711 /* {{{ proto void rotate(float angle)
1713 PHP_METHOD(CairoContext, rotate)
1715 zend_class_entry * _this_ce;
1717 zval * _this_zval = NULL;
1718 double angle = 0.0;
1722 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Od", &_this_zval, CairoContext_ce_ptr, &angle) == FAILURE) {
1723 return;
1726 _this_ce = Z_OBJCE_P(_this_zval);
1727 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1730 php_error(E_WARNING, "rotate: not yet implemented"); RETURN_FALSE;
1733 /* }}} rotate */
1737 /* {{{ proto void save()
1739 PHP_METHOD(CairoContext, save)
1741 zend_class_entry * _this_ce;
1743 zval * _this_zval = NULL;
1747 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
1748 return;
1751 _this_ce = Z_OBJCE_P(_this_zval);
1752 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1755 php_error(E_WARNING, "save: not yet implemented"); RETURN_FALSE;
1758 /* }}} save */
1762 /* {{{ proto void scale(float x, float y)
1764 PHP_METHOD(CairoContext, scale)
1766 zend_class_entry * _this_ce;
1768 zval * _this_zval = NULL;
1769 double x = 0.0;
1770 double y = 0.0;
1774 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
1775 return;
1778 _this_ce = Z_OBJCE_P(_this_zval);
1779 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1782 php_error(E_WARNING, "scale: not yet implemented"); RETURN_FALSE;
1785 /* }}} scale */
1789 /* {{{ proto void select_font_face(object obj[, int slant, int weight])
1791 PHP_METHOD(CairoContext, select_font_face)
1793 zend_class_entry * _this_ce;
1795 zval * _this_zval = NULL;
1796 zval * obj = NULL;
1797 long slant = 0;
1798 long weight = 0;
1802 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo|ll", &_this_zval, CairoContext_ce_ptr, &obj, &slant, &weight) == FAILURE) {
1803 return;
1806 _this_ce = Z_OBJCE_P(_this_zval);
1807 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1810 php_error(E_WARNING, "select_font_face: not yet implemented"); RETURN_FALSE;
1813 /* }}} select_font_face */
1817 /* {{{ proto void set_antialias([int antialias])
1819 PHP_METHOD(CairoContext, set_antialias)
1821 zend_class_entry * _this_ce;
1823 zval * _this_zval = NULL;
1824 long antialias = 0;
1828 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &_this_zval, CairoContext_ce_ptr, &antialias) == FAILURE) {
1829 return;
1832 _this_ce = Z_OBJCE_P(_this_zval);
1833 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1836 php_error(E_WARNING, "set_antialias: not yet implemented"); RETURN_FALSE;
1839 /* }}} set_antialias */
1843 /* {{{ proto void set_dash(object dashes [,float offset])
1845 PHP_METHOD(CairoContext, set_dash)
1847 zend_class_entry * _this_ce;
1849 zval * _this_zval = NULL;
1850 zval * dashes = NULL;
1851 double offset = 0.0;
1855 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo|d", &_this_zval, CairoContext_ce_ptr, &dashes, &offset) == FAILURE) {
1856 return;
1859 _this_ce = Z_OBJCE_P(_this_zval);
1860 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1863 php_error(E_WARNING, "set_dash: not yet implemented"); RETURN_FALSE;
1866 /* }}} set_dash */
1870 /* {{{ proto void set_fill_rule(int fill_rule)
1872 PHP_METHOD(CairoContext, set_fill_rule)
1874 zend_class_entry * _this_ce;
1876 zval * _this_zval = NULL;
1877 long fill_rule = 0;
1881 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &_this_zval, CairoContext_ce_ptr, &fill_rule) == FAILURE) {
1882 return;
1885 _this_ce = Z_OBJCE_P(_this_zval);
1886 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1889 php_error(E_WARNING, "set_fill_rule: not yet implemented"); RETURN_FALSE;
1892 /* }}} set_fill_rule */
1896 /* {{{ proto void set_font_face([object obj])
1898 PHP_METHOD(CairoContext, set_font_face)
1900 zend_class_entry * _this_ce;
1902 zval * _this_zval = NULL;
1903 zval * obj = NULL;
1907 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|o", &_this_zval, CairoContext_ce_ptr, &obj) == FAILURE) {
1908 return;
1911 _this_ce = Z_OBJCE_P(_this_zval);
1912 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1915 php_error(E_WARNING, "set_font_face: not yet implemented"); RETURN_FALSE;
1918 /* }}} set_font_face */
1922 /* {{{ proto void set_font_matrix(object matrix)
1924 PHP_METHOD(CairoContext, set_font_matrix)
1926 zend_class_entry * _this_ce;
1928 zval * _this_zval = NULL;
1929 zval * matrix = NULL;
1933 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &matrix) == FAILURE) {
1934 return;
1937 _this_ce = Z_OBJCE_P(_this_zval);
1938 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1941 php_error(E_WARNING, "set_font_matrix: not yet implemented"); RETURN_FALSE;
1944 /* }}} set_font_matrix */
1948 /* {{{ proto void set_font_options(object options)
1950 PHP_METHOD(CairoContext, set_font_options)
1952 zend_class_entry * _this_ce;
1954 zval * _this_zval = NULL;
1955 zval * options = NULL;
1959 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &options) == FAILURE) {
1960 return;
1963 _this_ce = Z_OBJCE_P(_this_zval);
1964 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1967 php_error(E_WARNING, "set_font_options: not yet implemented"); RETURN_FALSE;
1970 /* }}} set_font_options */
1974 /* {{{ proto void set_font_size(float size)
1976 PHP_METHOD(CairoContext, set_font_size)
1978 zend_class_entry * _this_ce;
1980 zval * _this_zval = NULL;
1981 double size = 0.0;
1985 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Od", &_this_zval, CairoContext_ce_ptr, &size) == FAILURE) {
1986 return;
1989 _this_ce = Z_OBJCE_P(_this_zval);
1990 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
1993 php_error(E_WARNING, "set_font_size: not yet implemented"); RETURN_FALSE;
1996 /* }}} set_font_size */
2000 /* {{{ proto void set_line_cap(int line_cap)
2002 PHP_METHOD(CairoContext, set_line_cap)
2004 zend_class_entry * _this_ce;
2006 zval * _this_zval = NULL;
2007 long line_cap = 0;
2011 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &_this_zval, CairoContext_ce_ptr, &line_cap) == FAILURE) {
2012 return;
2015 _this_ce = Z_OBJCE_P(_this_zval);
2016 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2019 php_error(E_WARNING, "set_line_cap: not yet implemented"); RETURN_FALSE;
2022 /* }}} set_line_cap */
2026 /* {{{ proto void set_line_join(int line_join)
2028 PHP_METHOD(CairoContext, set_line_join)
2030 zend_class_entry * _this_ce;
2032 zval * _this_zval = NULL;
2033 long line_join = 0;
2037 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &_this_zval, CairoContext_ce_ptr, &line_join) == FAILURE) {
2038 return;
2041 _this_ce = Z_OBJCE_P(_this_zval);
2042 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2045 php_error(E_WARNING, "set_line_join: not yet implemented"); RETURN_FALSE;
2048 /* }}} set_line_join */
2052 /* {{{ proto void set_line_width(float width)
2054 PHP_METHOD(CairoContext, set_line_width)
2056 zend_class_entry * _this_ce;
2058 zval * _this_zval = NULL;
2059 double width = 0.0;
2063 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Od", &_this_zval, CairoContext_ce_ptr, &width) == FAILURE) {
2064 return;
2067 _this_ce = Z_OBJCE_P(_this_zval);
2068 context_object *curr = (context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2069 cairo_set_line_width(curr->context, width);
2071 /* }}} set_line_width */
2075 /* {{{ proto void set_matrix(object matix)
2077 PHP_METHOD(CairoContext, set_matrix)
2079 zend_class_entry * _this_ce;
2081 zval * _this_zval = NULL;
2082 zval * matix = NULL;
2086 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &matix) == FAILURE) {
2087 return;
2090 _this_ce = Z_OBJCE_P(_this_zval);
2091 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2094 php_error(E_WARNING, "set_matrix: not yet implemented"); RETURN_FALSE;
2097 /* }}} set_matrix */
2101 /* {{{ proto void set_miter_limit(float limit)
2103 PHP_METHOD(CairoContext, set_miter_limit)
2105 zend_class_entry * _this_ce;
2107 zval * _this_zval = NULL;
2108 double limit = 0.0;
2112 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Od", &_this_zval, CairoContext_ce_ptr, &limit) == FAILURE) {
2113 return;
2116 _this_ce = Z_OBJCE_P(_this_zval);
2117 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2120 php_error(E_WARNING, "set_miter_limit: not yet implemented"); RETURN_FALSE;
2123 /* }}} set_miter_limit */
2127 /* {{{ proto void set_operator(int op)
2129 PHP_METHOD(CairoContext, set_operator)
2131 zend_class_entry * _this_ce;
2133 zval * _this_zval = NULL;
2134 long op = 0;
2138 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &_this_zval, CairoContext_ce_ptr, &op) == FAILURE) {
2139 return;
2142 _this_ce = Z_OBJCE_P(_this_zval);
2143 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2146 php_error(E_WARNING, "set_operator: not yet implemented"); RETURN_FALSE;
2149 /* }}} set_operator */
2153 /* {{{ proto void set_source(object p)
2155 PHP_METHOD(CairoContext, set_source)
2157 zend_class_entry * _this_ce;
2159 zval * _this_zval = NULL;
2160 zval * p = NULL;
2164 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &p) == FAILURE) {
2165 return;
2168 _this_ce = Z_OBJCE_P(_this_zval);
2169 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2172 php_error(E_WARNING, "set_source: not yet implemented"); RETURN_FALSE;
2175 /* }}} set_source */
2179 /* {{{ proto void set_source_rgb(float red, float green, float blue)
2181 PHP_METHOD(CairoContext, set_source_rgb)
2183 zend_class_entry * _this_ce;
2185 zval * _this_zval = NULL;
2186 double red = 0.0;
2187 double green = 0.0;
2188 double blue = 0.0;
2192 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oddd", &_this_zval, CairoContext_ce_ptr, &red, &green, &blue) == FAILURE) {
2193 return;
2196 _this_ce = Z_OBJCE_P(_this_zval);
2197 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2200 php_error(E_WARNING, "set_source_rgb: not yet implemented"); RETURN_FALSE;
2203 /* }}} set_source_rgb */
2207 /* {{{ proto void set_source_rgba(float red, float green, float blue [,float alpha])
2209 PHP_METHOD(CairoContext, set_source_rgba)
2211 zend_class_entry * _this_ce;
2213 zval * _this_zval = NULL;
2214 double red = 0.0;
2215 double green = 0.0;
2216 double blue = 0.0;
2217 double alpha = 0.0;
2221 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oddd|d", &_this_zval, CairoContext_ce_ptr, &red, &green, &blue, &alpha) == FAILURE) {
2222 return;
2225 _this_ce = Z_OBJCE_P(_this_zval);
2226 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2229 php_error(E_WARNING, "set_source_rgba: not yet implemented"); RETURN_FALSE;
2232 /* }}} set_source_rgba */
2236 /* {{{ proto void set_source_surface(object surface [,float x, float y])
2238 PHP_METHOD(CairoContext, set_source_surface)
2240 zend_class_entry * _this_ce;
2242 zval * _this_zval = NULL;
2243 zval * surface = NULL;
2244 double x = 0.0;
2245 double y = 0.0;
2249 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo|dd", &_this_zval, CairoContext_ce_ptr, &surface, &x, &y) == FAILURE) {
2250 return;
2253 _this_ce = Z_OBJCE_P(_this_zval);
2254 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2257 php_error(E_WARNING, "set_source_surface: not yet implemented"); RETURN_FALSE;
2260 /* }}} set_source_surface */
2264 /* {{{ proto void set_tolerance(float tolerance)
2266 PHP_METHOD(CairoContext, set_tolerance)
2268 zend_class_entry * _this_ce;
2270 zval * _this_zval = NULL;
2271 double tolerance = 0.0;
2275 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Od", &_this_zval, CairoContext_ce_ptr, &tolerance) == FAILURE) {
2276 return;
2279 _this_ce = Z_OBJCE_P(_this_zval);
2280 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2283 php_error(E_WARNING, "set_tolerance: not yet implemented"); RETURN_FALSE;
2286 /* }}} set_tolerance */
2290 /* {{{ proto void show_glyphs(object glyphs [,int num_glyphs])
2292 PHP_METHOD(CairoContext, show_glyphs)
2294 zend_class_entry * _this_ce;
2296 zval * _this_zval = NULL;
2297 zval * glyphs = NULL;
2298 long num_glyphs = 0;
2302 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo|l", &_this_zval, CairoContext_ce_ptr, &glyphs, &num_glyphs) == FAILURE) {
2303 return;
2306 _this_ce = Z_OBJCE_P(_this_zval);
2307 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2310 php_error(E_WARNING, "show_glyphs: not yet implemented"); RETURN_FALSE;
2313 /* }}} show_glyphs */
2317 /* {{{ proto void show_page()
2319 PHP_METHOD(CairoContext, show_page)
2321 zend_class_entry * _this_ce;
2323 zval * _this_zval = NULL;
2327 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
2328 return;
2331 _this_ce = Z_OBJCE_P(_this_zval);
2332 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2335 php_error(E_WARNING, "show_page: not yet implemented"); RETURN_FALSE;
2338 /* }}} show_page */
2342 /* {{{ proto void show_text(object obj)
2344 PHP_METHOD(CairoContext, show_text)
2346 zend_class_entry * _this_ce;
2348 zval * _this_zval = NULL;
2349 zval * obj = NULL;
2353 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &obj) == FAILURE) {
2354 return;
2357 _this_ce = Z_OBJCE_P(_this_zval);
2358 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2361 php_error(E_WARNING, "show_text: not yet implemented"); RETURN_FALSE;
2364 /* }}} show_text */
2368 /* {{{ proto void stroke()
2370 PHP_METHOD(CairoContext, stroke)
2372 zend_class_entry * _this_ce;
2374 zval * _this_zval = NULL;
2378 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
2379 return;
2382 _this_ce = Z_OBJCE_P(_this_zval);
2383 context_object *curr = (context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2384 cairo_stroke(curr->context);
2387 /* }}} stroke */
2391 /* {{{ proto array stroke_extents()
2393 PHP_METHOD(CairoContext, stroke_extents)
2395 zend_class_entry * _this_ce;
2397 zval * _this_zval = NULL;
2401 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
2402 return;
2405 _this_ce = Z_OBJCE_P(_this_zval);
2406 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2409 array_init(return_value);
2411 php_error(E_WARNING, "stroke_extents: not yet implemented"); RETURN_FALSE;
2413 array_init(return_value);
2415 /* }}} stroke_extents */
2419 /* {{{ proto void stroke_preserve()
2421 PHP_METHOD(CairoContext, stroke_preserve)
2423 zend_class_entry * _this_ce;
2425 zval * _this_zval = NULL;
2429 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &_this_zval, CairoContext_ce_ptr) == FAILURE) {
2430 return;
2433 _this_ce = Z_OBJCE_P(_this_zval);
2434 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2437 php_error(E_WARNING, "stroke_preserve: not yet implemented"); RETURN_FALSE;
2440 /* }}} stroke_preserve */
2444 /* {{{ proto array text_extents(object extents)
2446 PHP_METHOD(CairoContext, text_extents)
2448 zend_class_entry * _this_ce;
2450 zval * _this_zval = NULL;
2451 zval * extents = NULL;
2455 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &extents) == FAILURE) {
2456 return;
2459 _this_ce = Z_OBJCE_P(_this_zval);
2460 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2463 array_init(return_value);
2465 php_error(E_WARNING, "text_extents: not yet implemented"); RETURN_FALSE;
2467 array_init(return_value);
2469 /* }}} text_extents */
2473 /* {{{ proto void text_path(object obj)
2475 PHP_METHOD(CairoContext, text_path)
2477 zend_class_entry * _this_ce;
2479 zval * _this_zval = NULL;
2480 zval * obj = NULL;
2484 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &obj) == FAILURE) {
2485 return;
2488 _this_ce = Z_OBJCE_P(_this_zval);
2489 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2492 php_error(E_WARNING, "text_path: not yet implemented"); RETURN_FALSE;
2495 /* }}} text_path */
2499 /* {{{ proto void transform(object matrix)
2501 PHP_METHOD(CairoContext, transform)
2503 zend_class_entry * _this_ce;
2505 zval * _this_zval = NULL;
2506 zval * matrix = NULL;
2510 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oo", &_this_zval, CairoContext_ce_ptr, &matrix) == FAILURE) {
2511 return;
2514 _this_ce = Z_OBJCE_P(_this_zval);
2515 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2518 php_error(E_WARNING, "transform: not yet implemented"); RETURN_FALSE;
2521 /* }}} transform */
2525 /* {{{ proto void translate(float tx, float ty)
2527 PHP_METHOD(CairoContext, translate)
2529 zend_class_entry * _this_ce;
2531 zval * _this_zval = NULL;
2532 double tx = 0.0;
2533 double ty = 0.0;
2537 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &tx, &ty) == FAILURE) {
2538 return;
2541 _this_ce = Z_OBJCE_P(_this_zval);
2542 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2545 php_error(E_WARNING, "translate: not yet implemented"); RETURN_FALSE;
2548 /* }}} translate */
2552 /* {{{ proto array user_to_device(float x, float y)
2554 PHP_METHOD(CairoContext, user_to_device)
2556 zend_class_entry * _this_ce;
2558 zval * _this_zval = NULL;
2559 double x = 0.0;
2560 double y = 0.0;
2564 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &x, &y) == FAILURE) {
2565 return;
2568 _this_ce = Z_OBJCE_P(_this_zval);
2569 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2572 array_init(return_value);
2574 php_error(E_WARNING, "user_to_device: not yet implemented"); RETURN_FALSE;
2576 array_init(return_value);
2578 /* }}} user_to_device */
2582 /* {{{ proto array user_to_device_distance(float dx, float dy)
2584 PHP_METHOD(CairoContext, user_to_device_distance)
2586 zend_class_entry * _this_ce;
2588 zval * _this_zval = NULL;
2589 double dx = 0.0;
2590 double dy = 0.0;
2594 if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Odd", &_this_zval, CairoContext_ce_ptr, &dx, &dy) == FAILURE) {
2595 return;
2598 _this_ce = Z_OBJCE_P(_this_zval);
2599 context_object *curr=(context_object *)zend_objects_get_address(_this_zval TSRMLS_CC);
2602 array_init(return_value);
2604 php_error(E_WARNING, "user_to_device_distance: not yet implemented"); RETURN_FALSE;
2606 array_init(return_value);
2608 /* }}} user_to_device_distance */
2611 static zend_function_entry CairoContext_methods[] = {
2612 PHP_ME(CairoContext, __construct, NULL, /**/ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
2613 PHP_ME(CairoContext, append_path, CairoContext__append_path_args, /**/ZEND_ACC_PUBLIC)
2614 PHP_ME(CairoContext, arc, CairoContext__arc_args, /**/ZEND_ACC_PUBLIC)
2615 PHP_ME(CairoContext, arc_negative, CairoContext__arc_negative_args, /**/ZEND_ACC_PUBLIC)
2616 PHP_ME(CairoContext, clip, NULL, /**/ZEND_ACC_PUBLIC)
2617 PHP_ME(CairoContext, clip_extents, NULL, /**/ZEND_ACC_PUBLIC)
2618 PHP_ME(CairoContext, clip_preserve, NULL, /**/ZEND_ACC_PUBLIC)
2619 PHP_ME(CairoContext, close_path, NULL, /**/ZEND_ACC_PUBLIC)
2620 PHP_ME(CairoContext, copy_clip_rectangle_list, NULL, /**/ZEND_ACC_PUBLIC)
2621 PHP_ME(CairoContext, copy_page, NULL, /**/ZEND_ACC_PUBLIC)
2622 PHP_ME(CairoContext, copy_path, NULL, /**/ZEND_ACC_PUBLIC)
2623 PHP_ME(CairoContext, copy_path_flat, NULL, /**/ZEND_ACC_PUBLIC)
2624 PHP_ME(CairoContext, curve_to, CairoContext__curve_to_args, /**/ZEND_ACC_PUBLIC)
2625 PHP_ME(CairoContext, device_to_user, CairoContext__device_to_user_args, /**/ZEND_ACC_PUBLIC)
2626 PHP_ME(CairoContext, device_to_user_distance, CairoContext__device_to_user_distance_args, /**/ZEND_ACC_PUBLIC)
2627 PHP_ME(CairoContext, fill, NULL, /**/ZEND_ACC_PUBLIC)
2628 PHP_ME(CairoContext, fill_extents, NULL, /**/ZEND_ACC_PUBLIC)
2629 PHP_ME(CairoContext, fill_preserve, NULL, /**/ZEND_ACC_PUBLIC)
2630 PHP_ME(CairoContext, font_extents, NULL, /**/ZEND_ACC_PUBLIC)
2631 PHP_ME(CairoContext, get_antialias, NULL, /**/ZEND_ACC_PUBLIC)
2632 PHP_ME(CairoContext, get_current_point, NULL, /**/ZEND_ACC_PUBLIC)
2633 PHP_ME(CairoContext, get_dash, NULL, /**/ZEND_ACC_PUBLIC)
2634 PHP_ME(CairoContext, get_dash_count, NULL, /**/ZEND_ACC_PUBLIC)
2635 PHP_ME(CairoContext, get_fill_rule, NULL, /**/ZEND_ACC_PUBLIC)
2636 PHP_ME(CairoContext, get_font_face, NULL, /**/ZEND_ACC_PUBLIC)
2637 PHP_ME(CairoContext, get_font_matrix, NULL, /**/ZEND_ACC_PUBLIC)
2638 PHP_ME(CairoContext, get_font_options, NULL, /**/ZEND_ACC_PUBLIC)
2639 PHP_ME(CairoContext, get_group_target, NULL, /**/ZEND_ACC_PUBLIC)
2640 PHP_ME(CairoContext, get_line_cap, NULL, /**/ZEND_ACC_PUBLIC)
2641 PHP_ME(CairoContext, get_line_join, NULL, /**/ZEND_ACC_PUBLIC)
2642 PHP_ME(CairoContext, get_line_width, NULL, /**/ZEND_ACC_PUBLIC)
2643 PHP_ME(CairoContext, get_matrix, NULL, /**/ZEND_ACC_PUBLIC)
2644 PHP_ME(CairoContext, get_matrix_limit, NULL, /**/ZEND_ACC_PUBLIC)
2645 PHP_ME(CairoContext, get_operator, NULL, /**/ZEND_ACC_PUBLIC)
2646 PHP_ME(CairoContext, get_scaled_font, NULL, /**/ZEND_ACC_PUBLIC)
2647 PHP_ME(CairoContext, get_source, NULL, /**/ZEND_ACC_PUBLIC)
2648 PHP_ME(CairoContext, get_target, NULL, /**/ZEND_ACC_PUBLIC)
2649 PHP_ME(CairoContext, get_tolerance, NULL, /**/ZEND_ACC_PUBLIC)
2650 PHP_ME(CairoContext, glyph_extents, CairoContext__glyph_extents_args, /**/ZEND_ACC_PUBLIC)
2651 PHP_ME(CairoContext, glyph_path, CairoContext__glyph_path_args, /**/ZEND_ACC_PUBLIC)
2652 PHP_ME(CairoContext, has_current_point, NULL, /**/ZEND_ACC_PUBLIC)
2653 PHP_ME(CairoContext, identity_matrix, NULL, /**/ZEND_ACC_PUBLIC)
2654 PHP_ME(CairoContext, in_fill, CairoContext__in_fill_args, /**/ZEND_ACC_PUBLIC)
2655 PHP_ME(CairoContext, in_stroke, CairoContext__in_stroke_args, /**/ZEND_ACC_PUBLIC)
2656 PHP_ME(CairoContext, line_to, CairoContext__line_to_args, /**/ZEND_ACC_PUBLIC)
2657 PHP_ME(CairoContext, mask, CairoContext__mask_args, /**/ZEND_ACC_PUBLIC)
2658 PHP_ME(CairoContext, mask_surface, CairoContext__mask_surface_args, /**/ZEND_ACC_PUBLIC)
2659 PHP_ME(CairoContext, move_to, CairoContext__move_to_args, /**/ZEND_ACC_PUBLIC)
2660 PHP_ME(CairoContext, new_path, NULL, /**/ZEND_ACC_PUBLIC)
2661 PHP_ME(CairoContext, new_sub_path, NULL, /**/ZEND_ACC_PUBLIC)
2662 PHP_ME(CairoContext, paint, NULL, /**/ZEND_ACC_PUBLIC)
2663 PHP_ME(CairoContext, paint_with_alpha, CairoContext__paint_with_alpha_args, /**/ZEND_ACC_PUBLIC)
2664 PHP_ME(CairoContext, path_extents, CairoContext__path_extents_args, /**/ZEND_ACC_PUBLIC)
2665 PHP_ME(CairoContext, pop_group, NULL, /**/ZEND_ACC_PUBLIC)
2666 PHP_ME(CairoContext, pop_group_to_source, NULL, /**/ZEND_ACC_PUBLIC)
2667 PHP_ME(CairoContext, push_group, NULL, /**/ZEND_ACC_PUBLIC)
2668 PHP_ME(CairoContext, push_group_with_content, CairoContext__push_group_with_content_args, /**/ZEND_ACC_PUBLIC)
2669 PHP_ME(CairoContext, rectangle, CairoContext__rectangle_args, /**/ZEND_ACC_PUBLIC)
2670 PHP_ME(CairoContext, rel_curve_to, CairoContext__rel_curve_to_args, /**/ZEND_ACC_PUBLIC)
2671 PHP_ME(CairoContext, rel_line_to, CairoContext__rel_line_to_args, /**/ZEND_ACC_PUBLIC)
2672 PHP_ME(CairoContext, rel_move_to, CairoContext__rel_move_to_args, /**/ZEND_ACC_PUBLIC)
2673 PHP_ME(CairoContext, reset_clip, NULL, /**/ZEND_ACC_PUBLIC)
2674 PHP_ME(CairoContext, restore, NULL, /**/ZEND_ACC_PUBLIC)
2675 PHP_ME(CairoContext, rotate, CairoContext__rotate_args, /**/ZEND_ACC_PUBLIC)
2676 PHP_ME(CairoContext, save, NULL, /**/ZEND_ACC_PUBLIC)
2677 PHP_ME(CairoContext, scale, CairoContext__scale_args, /**/ZEND_ACC_PUBLIC)
2678 PHP_ME(CairoContext, select_font_face, CairoContext__select_font_face_args, /**/ZEND_ACC_PUBLIC)
2679 PHP_ME(CairoContext, set_antialias, CairoContext__set_antialias_args, /**/ZEND_ACC_PUBLIC)
2680 PHP_ME(CairoContext, set_dash, CairoContext__set_dash_args, /**/ZEND_ACC_PUBLIC)
2681 PHP_ME(CairoContext, set_fill_rule, CairoContext__set_fill_rule_args, /**/ZEND_ACC_PUBLIC)
2682 PHP_ME(CairoContext, set_font_face, CairoContext__set_font_face_args, /**/ZEND_ACC_PUBLIC)
2683 PHP_ME(CairoContext, set_font_matrix, CairoContext__set_font_matrix_args, /**/ZEND_ACC_PUBLIC)
2684 PHP_ME(CairoContext, set_font_options, CairoContext__set_font_options_args, /**/ZEND_ACC_PUBLIC)
2685 PHP_ME(CairoContext, set_font_size, CairoContext__set_font_size_args, /**/ZEND_ACC_PUBLIC)
2686 PHP_ME(CairoContext, set_line_cap, CairoContext__set_line_cap_args, /**/ZEND_ACC_PUBLIC)
2687 PHP_ME(CairoContext, set_line_join, CairoContext__set_line_join_args, /**/ZEND_ACC_PUBLIC)
2688 PHP_ME(CairoContext, set_line_width, CairoContext__set_line_width_args, /**/ZEND_ACC_PUBLIC)
2689 PHP_ME(CairoContext, set_matrix, CairoContext__set_matrix_args, /**/ZEND_ACC_PUBLIC)
2690 PHP_ME(CairoContext, set_miter_limit, CairoContext__set_miter_limit_args, /**/ZEND_ACC_PUBLIC)
2691 PHP_ME(CairoContext, set_operator, CairoContext__set_operator_args, /**/ZEND_ACC_PUBLIC)
2692 PHP_ME(CairoContext, set_source, CairoContext__set_source_args, /**/ZEND_ACC_PUBLIC)
2693 PHP_ME(CairoContext, set_source_rgb, CairoContext__set_source_rgb_args, /**/ZEND_ACC_PUBLIC)
2694 PHP_ME(CairoContext, set_source_rgba, CairoContext__set_source_rgba_args, /**/ZEND_ACC_PUBLIC)
2695 PHP_ME(CairoContext, set_source_surface, CairoContext__set_source_surface_args, /**/ZEND_ACC_PUBLIC)
2696 PHP_ME(CairoContext, set_tolerance, CairoContext__set_tolerance_args, /**/ZEND_ACC_PUBLIC)
2697 PHP_ME(CairoContext, show_glyphs, CairoContext__show_glyphs_args, /**/ZEND_ACC_PUBLIC)
2698 PHP_ME(CairoContext, show_page, NULL, /**/ZEND_ACC_PUBLIC)
2699 PHP_ME(CairoContext, show_text, CairoContext__show_text_args, /**/ZEND_ACC_PUBLIC)
2700 PHP_ME(CairoContext, stroke, NULL, /**/ZEND_ACC_PUBLIC)
2701 PHP_ME(CairoContext, stroke_extents, NULL, /**/ZEND_ACC_PUBLIC)
2702 PHP_ME(CairoContext, stroke_preserve, NULL, /**/ZEND_ACC_PUBLIC)
2703 PHP_ME(CairoContext, text_extents, CairoContext__text_extents_args, /**/ZEND_ACC_PUBLIC)
2704 PHP_ME(CairoContext, text_path, CairoContext__text_path_args, /**/ZEND_ACC_PUBLIC)
2705 PHP_ME(CairoContext, transform, CairoContext__transform_args, /**/ZEND_ACC_PUBLIC)
2706 PHP_ME(CairoContext, translate, CairoContext__translate_args, /**/ZEND_ACC_PUBLIC)
2707 PHP_ME(CairoContext, user_to_device, CairoContext__user_to_device_args, /**/ZEND_ACC_PUBLIC)
2708 PHP_ME(CairoContext, user_to_device_distance, CairoContext__user_to_device_distance_args, /**/ZEND_ACC_PUBLIC)
2709 { NULL, NULL, NULL }
2712 /* }}} Methods */
2714 static zend_object_handlers CairoContext_handlers;
2717 typedef struct _context_object {
2718 zend_object std;
2719 cairo_t *context;
2720 } context_object;
2723 static void CairoContext_object_dtor(void *object)
2725 context_object *context = (context_object *)object;
2726 zend_hash_destroy(context->std.properties);
2727 FREE_HASHTABLE(context->std.properties);
2729 if(context->context){
2730 cairo_destroy(context->context);
2732 efree(object);
2735 static zend_object_value CairoContext_object_new(zend_class_entry *ce)
2737 zend_object_value retval;
2738 context_object *context;
2739 zval *temp;
2741 context=emalloc(sizeof(context_object));
2742 memset(context,0,sizeof(context_object));
2743 context->std.ce = ce;
2744 ALLOC_HASHTABLE(context->std.properties);
2745 zend_hash_init(context->std.properties, 0, NULL, ZVAL_PTR_DTOR,0);
2746 zend_hash_copy(context->std.properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &temp, sizeof(zval *));
2747 retval.handle = zend_objects_store_put(context, NULL, (zend_objects_free_object_storage_t)CairoContext_object_dtor, NULL TSRMLS_CC);
2748 retval.handlers = &CairoContext_handlers;
2749 return retval;
2754 static void class_init_CairoContext(void)
2756 zend_class_entry ce;
2757 INIT_CLASS_ENTRY(ce, "CairoContext", CairoContext_methods);
2758 CairoContext_ce_ptr = zend_register_internal_class(&ce);
2759 CairoContext_ce_ptr->create_object = CairoContext_object_new;
2760 memcpy(&CairoContext_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
2761 CairoContext_handlers.clone_obj=NULL;
2764 /* }}} Class CairoContext */