Strategy proposal for general optional arguments

2002-02-25 Thread Martin Vermeer
On Fri, Feb 15, 2002 at 04:46:54PM +0100, Jean-Marc Lasgouttes wrote: ... There could be a C++ solution to the problem, which would not be too difficult. It would go like this Style ShortVersion LatexType OptArg ... End Style Caption LatexType Command UseOptArg 1

coding style question

2002-02-25 Thread Angus Leeming
When rotating the image I sometimes have to add a color none to the XpmImage color table. Since this struct is controlled by libXPM, I use malloc rather than new, so that XpmFreeXpmImage(XpmImage *) works correctly. My question. Should I use c or c++ style casts with malloc. This:

Re: coding style question

2002-02-25 Thread Angus Leeming
On Monday 25 February 2002 11:22 am, Lars Gullik Bjønnes wrote: Angus Leeming [EMAIL PROTECTED] writes: | My question. Should I use c or c++ style casts with malloc. This: the C++ variant. Done Would be nice if you coult wrap the use of malloc and XpmFreeXpmImage in a RAII object.

Re: coding style question

2002-02-25 Thread Asger K. Alstrup Nielsen
On Mon, 25 Feb 2002, Angus Leeming wrote: void GImageXPM::scale(GParams const params) { if (!xpm_image_) return; } The principle behind scaling is simple: It's raytracing. So, for each destination pixel, calculate which pixel it corresponds to in the source picture.

Re: Idea on key bindings.

2002-02-25 Thread Jean-Marc Lasgouttes
Joao == Joao Luis Meloni Assirati [EMAIL PROTECTED] writes: Joao Hello lyx developers. Joao When I input an iso character (via a deadkey keymap), assuming Joao that I have latinkeys.bind included in my bind file, I get this Joao character even if in some math environment. This situation can

Re: {PATCH} fix gcc 3.1 comnfigure problem

2002-02-25 Thread Jean-Marc Lasgouttes
Duncan == Duncan Simpson [EMAIL PROTECTED] writes: Duncan the first lien is fine but the rest also gets included in the Duncan version number and causes sed indigestion. The attatched patch Duncan is a proposed fix Why do you reinstantiate the AC_PROG_RANLIB call? Note that 1.2.0cvs uses

Re: coding style question

2002-02-25 Thread Dekel Tsur
On Mon, Feb 25, 2002 at 01:49:35PM +, Angus Leeming wrote: The principle behind scaling is simple: It's raytracing. So, for each destination pixel, calculate which pixel it corresponds to in the source picture. Ok, the idea is easy enough. The devil, as they say, is in the detail.

Re: coding style question

2002-02-25 Thread Angus Leeming
On Monday 25 February 2002 3:48 pm, Dekel Tsur wrote: Don't try to code it your self. Just grab the code from some GPL project. Two reasons not to: 1. simple cropping, rotation, scaling is easy and simple is enough for GImageXPM which is just a proof of concept image loader. The real image

a fully working graphics patch

2002-02-25 Thread Angus Leeming
* Lazy loading. Don't try and load the file till you try to draw it. * asynchronous conversion to a loadable format. * simple clipping, roation, scaling of the view in LyX. The patch is at http://www.devel.lyx.org/~leeming/graphics.diff.bz2 It's 37kB in size. As far as I'm concerned, it's

graphics-bug

2002-02-25 Thread Herbert Voss
a snapshot with the new graphics. it was the second image, the first worked well. if I choose don't display LyX prints the graphic name with Error scaling etc. Opning the graphics again gave the right view. scaling, rotating worked wonderful! :-) Herbert -- http://www.lyx.org/help/

Re: a fully working graphics patch

2002-02-25 Thread John Levon
On Mon, Feb 25, 2002 at 07:04:37PM +, Angus Leeming wrote: The patch is at http://www.devel.lyx.org/~leeming/graphics.diff.bz2 can we have xformsGraphics* files too please ? (btw, your diffs are broken thanks to cvs - see Amir's fixcvsdiff at http://www.movement.uklinux.net/) regards

[PATCH] various little cleanups + docs

2002-02-25 Thread John Levon
please apply thanks john p.s. shouldn't we have a 1.2.0 branch ? -- Yes, I understand your point, but This Is UA, and not some fluffy creche. - Topper various.diff.gz Description: application/gunzip

Excessive code?

2002-02-25 Thread Martin Vermeer
In the file text2.C around line 550 we find the following code: while (cur.par() != send_cur.par()) { (17 lines) cur.par(cur.par()-next()); } (functionally the same 17 lines, AFAICS) Do I miss something or could this be done simply by do { (17 lines)

Strategy proposal for general optional arguments

2002-02-25 Thread Martin Vermeer
On Fri, Feb 15, 2002 at 04:46:54PM +0100, Jean-Marc Lasgouttes wrote: ... > There could be a C++ solution to the problem, which would not be too > difficult. It would go like this > > Style ShortVersion > LatexType OptArg > ... > End > > Style Caption > LatexType Command >

coding style question

2002-02-25 Thread Angus Leeming
When rotating the image I sometimes have to add a color "none" to the XpmImage color table. Since this struct is controlled by libXPM, I use malloc rather than new, so that XpmFreeXpmImage(XpmImage *) works correctly. My question. Should I use c or c++ style casts with malloc. This:

Re: coding style question

2002-02-25 Thread Angus Leeming
On Monday 25 February 2002 11:22 am, Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > | My question. Should I use c or c++ style casts with malloc. This: > the C++ variant. Done > Would be nice if you coult wrap the use of malloc and XpmFreeXpmImage > in a RAII object.

Re: coding style question

2002-02-25 Thread Asger K. Alstrup Nielsen
On Mon, 25 Feb 2002, Angus Leeming wrote: > void GImageXPM::scale(GParams const & params) > { > if (!xpm_image_) > return; > > } The principle behind scaling is simple: It's raytracing. So, for each destination pixel, calculate which pixel it corresponds to in the source

Re: Idea on key bindings.

2002-02-25 Thread Jean-Marc Lasgouttes
> "Joao" == Joao Luis Meloni Assirati <[EMAIL PROTECTED]> writes: Joao> Hello lyx developers. Joao> When I input an iso character (via a deadkey keymap), assuming Joao> that I have latinkeys.bind included in my bind file, I get this Joao> character even if in some math environment. This

Re: {PATCH} fix gcc 3.1 comnfigure problem

2002-02-25 Thread Jean-Marc Lasgouttes
> "Duncan" == Duncan Simpson <[EMAIL PROTECTED]> writes: Duncan> the first lien is fine but the rest also gets included in the Duncan> version number and causes sed indigestion. The attatched patch Duncan> is a proposed fix Why do you reinstantiate the AC_PROG_RANLIB call? Note that

Re: coding style question

2002-02-25 Thread Dekel Tsur
On Mon, Feb 25, 2002 at 01:49:35PM +, Angus Leeming wrote: > > The principle behind scaling is simple: It's raytracing. > > > > So, for each destination pixel, calculate which pixel it corresponds > > to in the source picture. > > Ok, the idea is easy enough. The devil, as they say, is in

Re: coding style question

2002-02-25 Thread Angus Leeming
On Monday 25 February 2002 3:48 pm, Dekel Tsur wrote: > Don't try to code it your self. Just grab the code from some GPL project. Two reasons not to: 1. "simple" cropping, rotation, scaling is easy and "simple" is enough for GImageXPM which is just a proof of concept image loader. The real

a fully working graphics patch

2002-02-25 Thread Angus Leeming
* Lazy loading. Don't try and load the file till you try to draw it. * asynchronous conversion to a loadable format. * "simple" clipping, roation, scaling of the view in LyX. The patch is at http://www.devel.lyx.org/~leeming/graphics.diff.bz2 It's 37kB in size. As far as I'm concerned, it's

graphics-bug

2002-02-25 Thread Herbert Voss
a snapshot with the new graphics. it was the second image, the first worked well. if I choose "don't display" LyX prints the graphic name with "Error scaling etc". Opning the graphics again gave the right view. scaling, rotating worked wonderful! :-) Herbert -- http://www.lyx.org/help/

Re: a fully working graphics patch

2002-02-25 Thread John Levon
On Mon, Feb 25, 2002 at 07:04:37PM +, Angus Leeming wrote: > The patch is at http://www.devel.lyx.org/~leeming/graphics.diff.bz2 can we have xformsGraphics* files too please ? (btw, your diffs are broken thanks to cvs - see Amir's fixcvsdiff at http://www.movement.uklinux.net/) regards

[PATCH] various little cleanups + docs

2002-02-25 Thread John Levon
please apply thanks john p.s. shouldn't we have a 1.2.0 branch ? -- "Yes, I understand your point, but This Is UA, and not some fluffy creche." - Topper various.diff.gz Description: application/gunzip

Excessive code?

2002-02-25 Thread Martin Vermeer
In the file text2.C around line 550 we find the following code: while (cur.par() != send_cur.par()) { (17 lines) cur.par(cur.par()->next()); } (functionally the same 17 lines, AFAICS) Do I miss something or could this be done simply by do { (17 lines)