[cairo-commit] cairo-ocaml/src ml_cairo.c,1.3,1.4

Olivier Andrieu commit at pdx.freedesktop.org
Sat Dec 13 06:10:44 PST 2003


Committed by: oandrieu

Update of /cvs/cairo/cairo-ocaml/src
In directory pdx:/tmp/cvs-serv6293/src

Modified Files:
	ml_cairo.c 
Log Message:
optional PS backend

Index: ml_cairo.c
===================================================================
RCS file: /cvs/cairo/cairo-ocaml/src/ml_cairo.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ml_cairo.c	22 Nov 2003 15:27:06 -0000	1.3
--- ml_cairo.c	13 Dec 2003 14:10:42 -0000	1.4
***************
*** 66,69 ****
--- 66,70 ----
  }
  
+ #ifdef CAIRO_HAS_PS_SURFACE
  CAMLprim value
  ml_cairo_set_target_ps(value v_cr, value v_file, value v_width_inches,
***************
*** 78,81 ****
--- 79,89 ----
    return Val_unit;
  }
+ #else
+ CAMLprim value
+ ml_cairo_set_target_ps(value v_cr, value v_file, value v_width_inches,
+ 		       value v_height_inches, value v_x_pixels_per_inch,
+ 		       value v_y_pixels_per_inch)
+ { failwith("Cairo library does not support this backend") ; return Val_unit; }
+ #endif /* CAIRO_HAS_PS_SURFACE */
  ML_bc6(cairo_set_target_ps)
  
***************
*** 859,863 ****
--- 867,878 ----
    return Val_cairo_surface_t(s);
  }
+ 
+ #ifdef CAIRO_HAS_PS_SURFACE
  ML_5(cairo_ps_surface_create, FILE_val, Double_val, Double_val, Double_val, Double_val, Val_cairo_surface_t)
+ #else
+ CAMLprim value 
+ ml_cairo_ps_surface_create(value v1, value v2, value v3, value v4, value v5)
+ { failwith("Cairo library does not support this backend") ; return Val_unit; }
+ #endif /* CAIRO_HAS_PS_SURFACE */
  
  ML_0(cairo_matrix_create, Val_cairo_matrix_t)





More information about the cairo-commit mailing list