caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] problem with get/draw_image
@ 2003-06-17 20:13 Jean-Baptiste Rouquier
  0 siblings, 0 replies; only message in thread
From: Jean-Baptiste Rouquier @ 2003-06-17 20:13 UTC (permalink / raw)
  To: caml-list

I've a problem using the Graphics library under Windows. Precisely,
get_image doesn't seem to work.
lineto and fil_rect work (I didn't take the time to test all the functions),
but I can't use the camlimages library.
Thanks for any help,
Jean-Baptiste.

Here is a code sample :
#load "graphics.cma";;
open Graphics;;
open_graph "";;
moveto 50 10; lineto 10 50;;
 (*I get a line, perfect.*)
let img = get_image 0 0 60 60;;
draw_image img 20 20;;
 (*the line is cut because of the clipped image, but no other line appear.*)



camlimages is able to clip images onto the graphics window, so make_image
and draw_image seem to work (I've also tested them). But when trying to
capture the graphics windows via Graphics.get_image and dump_image, I get
either a black image or a white one (perhaps depending on the size (!)).


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-17 20:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-17 20:13 [Caml-list] problem with get/draw_image Jean-Baptiste Rouquier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).