summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Andrieu <oandrieu@gmail.com>2005-01-30 16:34:01 +0000
committerHezekiah M. Carty <hcarty@atmos.umd.edu>2009-06-18 13:57:44 -0400
commit126b81b6e9fd1e79e06b9088c8619011bcc51757 (patch)
tree0bcd9c1958b8112c782cf0d8507c4ba828cb2542
parent9a131ac54231aaf31ac3e0ee7a13569abb3be036 (diff)
test the PDF backend
-rw-r--r--test/basket.ml14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/basket.ml b/test/basket.ml
index 0001b07..d5d031f 100644
--- a/test/basket.ml
+++ b/test/basket.ml
@@ -50,9 +50,7 @@ let main =
prerr_endline "PS" ;
begin
- let oc = open_out "basket.ps" in
- let file = Cairo_channel.of_out_channel oc in
- close_out oc ;
+ let file = Cairo_channel.open_out "basket.ps" in
Cairo.set_target_ps c file x_inches y_inches x_ppi y_ppi ;
draw ~print:true c ;
Cairo.show_page c ;
@@ -60,6 +58,16 @@ let main =
Cairo_channel.close file
end ;
+ prerr_endline "PDF" ;
+ begin
+ let file = Cairo_channel.open_out "basket.pdf" in
+ Cairo.set_target_pdf c file x_inches y_inches x_ppi y_ppi ;
+ draw c ;
+ Cairo.show_page c ;
+ Cairo.finalise_target c ;
+ Cairo_channel.close file
+ end ;
+
prerr_endline "Bigarray and PPM" ;
begin
let arr = Bigarray.Array2.create Bigarray.int Bigarray.c_layout