caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Open Graphics on Windows
@ 2010-03-26 13:07 Marcel @ DIMAp
  2010-03-26 19:55 ` [Caml-list] " Florent Monnier
  2010-03-26 21:30 ` ygrek
  0 siblings, 2 replies; 3+ messages in thread
From: Marcel @ DIMAp @ 2010-03-26 13:07 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 590 bytes --]

Hi There,

I am running Windows XP and I am trying to open a window with dimension 20 x
20. I have tried many approaches and all of them open a window but not with
the dimension specified. The command I am using to open this window is 

Graphics.open_graph ":0 10x10+50-0";;

Just as a way of illustrating the problem: I start OcamlWinPlus v1.9RC4 and
type:

#load "graphics.cma";;
Graphics.open_graph ":0 10x10+50-0";;

And the window opens but not a 20x20 window.

How should I proceed? 

Besides, I have CigWin installed. Is it really necessary to run OCAMl
Graphics?

Cheers,
Marcel




[-- Attachment #2: Type: text/html, Size: 2659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Open Graphics on Windows
  2010-03-26 13:07 Open Graphics on Windows Marcel @ DIMAp
@ 2010-03-26 19:55 ` Florent Monnier
  2010-03-26 21:30 ` ygrek
  1 sibling, 0 replies; 3+ messages in thread
From: Florent Monnier @ 2010-03-26 19:55 UTC (permalink / raw)
  To: caml-list

Le vendredi 26 mars 2010 14:07:34, Marcel @ DIMAp a écrit :
> Hi There,
> 
> I am running Windows XP and I am trying to open a window with dimension 20
>  x 20. I have tried many approaches and all of them open a window but not
>  with the dimension specified. The command I am using to open this window
>  is
> 
> Graphics.open_graph ":0 10x10+50-0";;
> 
> Just as a way of illustrating the problem: I start OcamlWinPlus v1.9RC4 and
> type:
> 
> #load "graphics.cma";;
> Graphics.open_graph ":0 10x10+50-0";;
> 
> And the window opens but not a 20x20 window.
> 
> How should I proceed?
> 
> Besides, I have CigWin installed. Is it really necessary to run OCAMl
> Graphics?

Hello Marcel,

maybe this is a typo in your post, or maybe not, but did you notice that in 
the code you provide you request a window of size 10x10 and not 20x20 ?

Also you don't tell us the kind of application you're working on, but you 
should know that the module Graphics is just for minimal purposes, for example 
for short example when you just need a quick/minimal plotting solution.

For more advanced usage you should use the SDL bindings:
http://ocamlsdl.sourceforge.net/

-- 
Cheers
Florent


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Open Graphics on Windows
  2010-03-26 13:07 Open Graphics on Windows Marcel @ DIMAp
  2010-03-26 19:55 ` [Caml-list] " Florent Monnier
@ 2010-03-26 21:30 ` ygrek
  1 sibling, 0 replies; 3+ messages in thread
From: ygrek @ 2010-03-26 21:30 UTC (permalink / raw)
  To: caml-list

On Fri, 26 Mar 2010 10:07:34 -0300
"Marcel @ DIMAp" <marcel@dimap.ufrn.br> wrote:

> I am running Windows XP and I am trying to open a window with dimension 20 x
> 20. I have tried many approaches and all of them open a window but not with
> the dimension specified. The command I am using to open this window is 
> 
> Graphics.open_graph ":0 10x10+50-0";;

The format of this string is implementation defined.
On windows the following format is recognized - "%dx%d+%d+%d"
See otherlibs/win32graph/open.c

And keep in mind http://caml.inria.fr/mantis/view.php?id=4755

-- 
 ygrek
 http://ygrek.org.ua


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-26 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-26 13:07 Open Graphics on Windows Marcel @ DIMAp
2010-03-26 19:55 ` [Caml-list] " Florent Monnier
2010-03-26 21:30 ` ygrek

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).