[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Camelot-discuss] Bindings librsvg
From: |
Sven Luther |
Subject: |
Re: [Camelot-discuss] Bindings librsvg |
Date: |
Tue, 11 Feb 2003 14:53:43 +0100 |
User-agent: |
Mutt/1.5.3i |
On Tue, Feb 11, 2003 at 02:46:46PM +0100, Olivier Andrieu wrote:
> > > | val render : string -> ?gz:bool -> ?dpi:float -> machin_bidule ->
> > > | Sdlvideo.surface
> > > |
> > > | type machin_didule =
> > > | | DEFAULT
> > > | | AT_SIZE of int * int
> > > | | AT_ZOOM of float * float
> > > | | AT_MAX_SIZE of int * int
> > > | | AT_ZOOM_WITH_MAX of float * float * int * int
> > > | | CALLBACK of (int -> int -> int * int)
> > > `----
> > > (je sais pas trop comment appeler machinbidule)
> >
> > Erm, ... oui machin_bidule, c'est une bonne approche pour remplacer tous
> > les ..._from_file, mais est-ce que :
> >
> > val render : string -> ?gz:bool -> ?dpi:float -> (int -> int -> int * int)
> -> Sdlvideo.surface
> >
> > n'est pas plus general ?
>
> y'a le cas CALLBACK dans machin_bidule qui sert à fournir une fonction
> quelconque.
>
> > Bien qu'on puisse avoir les deux versions, il faut juste trouver un bon
> > nom pour machin_bidule. rsvg_size ou quelque chose comme cela ?
>
> on peut faire aussi qqche comme ça :
> ,----
> | type size_fun = int -> int -> int * int
> |
> | val default : size_fun
> | val at_size : int -> int -> size_fun
> | val at_zoom : float -> float -> size_fun
> | ... etc ...
> |
> | val render : string -> ?gz:bool -> ?dpi:float -> size_fun ->
> Sdlvideo.surface
> `----
Oui, c'est a cela que je pensais.
methode 1) : let surf = render buf (AT_SIZE (5,6))
methode 2) : let surf = render buf (at_size 5 6)
Mmm, le deuxieme me parait a la fois plus general et plus lisible, donc
je serait partant pour cette derniere option moi meme.
Amicalement,
Sven Luther
- Re: [Camelot-discuss] Bindings librsvg, (continued)
- Re: [Camelot-discuss] Bindings librsvg, Luc Mazardo, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Sven Luther, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Jérôme Marant, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Sven Luther, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Jérôme Marant, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Sven Luther, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Jérôme Marant, 2003/02/11
Re: [Camelot-discuss] Bindings librsvg, Olivier Andrieu, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Sven Luther, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Olivier Andrieu, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg,
Sven Luther <=
- Re: [Camelot-discuss] Bindings librsvg, Olivier Andrieu, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Sven Luther, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Olivier Andrieu, 2003/02/11
- Re: [Camelot-discuss] Bindings librsvg, Sven Luther, 2003/02/12
- Re: [Camelot-discuss] Bindings librsvg, Olivier Andrieu, 2003/02/12
- Re: [Camelot-discuss] Bindings librsvg, Sven Luther, 2003/02/12
- Re: [Camelot-discuss] Bindings librsvg, Olivier Andrieu, 2003/02/12
- Re: [Camelot-discuss] Bindings librsvg, Sven Luther, 2003/02/12
- Re: [Camelot-discuss] Bindings librsvg, Olivier Andrieu, 2003/02/13
- Re: [Camelot-discuss] Bindings librsvg, Sven Luther, 2003/02/13