1 2002-06-28 Angus Leeming <leeming@lyx.org>
3 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
4 by moving those SignalPtrs into the grfx::Image and grfx::Converter
5 classes where they really belong.
6 Use the Pimpl idiom to hide the class internals from public view.
8 * GraphicsTypes: remove the typedefs, leaving only the enums.
10 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
11 passed a reference to one in the load() method.
13 * GraphicsConverter.[Ch]: totally refactored. An instance of
14 grfx::Converter now represents a single conversion process.
15 Thus grfx::CachItem now has a grfx::Converter * that is set when the
16 conversion is initiated and destroyed on completion.
19 * GraphicsCacheItem.[Ch]:
20 * GraphicsConverter.[Ch]:
21 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
23 Note that I have done this only after making the above changes,
24 so not only should we have a clean, minimal and well documented
25 interface to these classes in the header files, but the class internals
26 should be much clearer too.
29 grfx::GCache -> grfx::Cache,
30 grfx::GCacheItem -> grfx::CacheItem,
31 grfx::GConverter -> grfx::Converter,
32 grfx::GImage -> grfx::Image,
33 grfx::GImageXPM -> grfx::ImageXPM,
34 grfx::GParams -> grfx::Params.
36 2002-06-26 Angus Leeming <leeming@lyx.org>
38 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
39 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
42 2002-06-26 Angus Leeming <leeming@lyx.org>
44 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
45 move the DisplayType enum out of grfx::GParams to here.
47 * GraphicsCacheItem.h: re-write preliminary description to reflect
50 * GraphicsParams.[Ch]:
51 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
52 grfx::DisplayType out of grfx::GParams.
54 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
55 that was in frontends/screen.C and insets/insetgraphics.C into a
56 single, easy-to-use class.
58 * Makefile.am: add these files.
60 2002-06-25 Angus Leeming <leeming@lyx.org>
63 * GraphicsCacheItem.[Ch]:
64 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
65 file into memory. The cache no longer controls the generation of the
66 pixmap. Instead, it just emits a signal when the loading status of an
68 The cache no longer stores InsetGraphics pointers and nor does it
69 assume responsibility for modifying an image (scaling, rotating etc).
70 Instead, that must now be performed elsewhere.
72 2002-06-19 Angus Leeming <leeming@lyx.org>
74 * GraphicsConverter.C: add using std::endl directive.
76 2002-06-17 Herbert Voss <voss@lyx.org>
78 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
79 default when nothing different was found
80 (convertToDisplayFormat): handle zipped files in the right way and
81 choose always convert as a default converter when no other
84 * GraphicsConverter.C: add more lyxerr comments and choose
85 convert when no other userdefined converter was found
87 2002-06-10 Herbert Voss <voss@lyx.org>
89 * GraphicsImageXPM.C (convertTo7chars): get another special color
90 format from convert work in the right way
92 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
94 * GraphicsCache.C: use right colormap incantation
96 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
98 * GraphicsCache.C: use lyx_gui namespace
100 * GraphicsImageXPM.C: back down to using xforms
103 2002-06-07 Angus Leeming <leeming@lyx.org>
105 Fixes needed to compile with Compaq cxx 6.5.
106 * GraphicsConverter.h: forward declare class ConvProcess.
108 * GraphicsImageXPM.C:
109 all c-library variables have been moved into namespace std.
110 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
112 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
114 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
116 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
118 * GraphicsImageXPM.C: SigC to boot::signals changes.
119 (newImage): fix () bug when using new.
121 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
123 * switch from SigC signals to boost::signals.
125 2002-05-29 André Pönitz <poenitz@gmx.net>
127 * GraphicsParam.C: remove unneeded #include, move vomment
129 2002-05-28 André Pönitz <poenitz@gmx.net>
131 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
133 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
135 * GraphicsImageXPM.C: ColorHandler moved
137 2002-05-24 Juergen Vigna <jug@sad.it>
140 * GraphicsImage.h: include LString.h first.
142 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
144 * GraphicsCacheItem.h: use more specific smart_ptr header.
145 * GraphicsTypes.h: ditto
146 * GraphicsImage.h: ditto
147 * GraphicsConverter.h: ditto
149 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
151 * GraphicsImageXPM.C: understand convert's use of "opaque"
154 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
156 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
157 GImage::loadableFormats() that ensures that the signal is connected
158 to the derived class' method.
160 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
162 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
163 only work on the string.
165 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
167 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
168 the simple image loader when it encounters colour strings like
171 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
173 * GraphicsCacheItem.C (convertToDisplayFormat):
174 * GraphicsConverter.C (build_script): remove the Alerts when things go
175 wrong as the inset displays the message anyway. Moreover, Alert seems
176 pretty temperamemtal at the moment.
178 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
179 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
181 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
183 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
184 a reference to a temp object that's going out of scope...
186 2002-04-09 Herbert Voss <voss@lyx.org>
188 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
189 LyXLength::inBP instead of inPixels.
191 2002-04-10 Herbert Voss <voss@perce.de>
193 * GraphicsCache.[Ch]:
194 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
195 to read the "Bounding Box" from non (e)ps files.
197 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
199 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
200 the EPS file too, to ensure that the clipped Bounding Box is relative
201 to the original. (From Herbert.)
203 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
205 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
206 variables are initialised. Clean-up parsing of the string (with thanks
209 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
211 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
212 if the file can't be found.
214 * GraphicsParams.h (c-tor): remove string() as default argument.
216 * GraphicsCacheItem.C: a couple of changes as a result.
218 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
220 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
221 path to graphics file.
223 * GraphicsParams.[Ch] (c-tor): now passed filepath.
225 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
227 * most files: ws cleanup
229 * Makefile.am: remove ld -r stuff
231 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
233 * Makefile.am: special rules if partial linking
235 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
237 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
239 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
241 * GraphicsConverter.[Ch] (converted): make first arg const ref.
243 * GraphicsCacheItem.h: doxy change
245 * GraphicsCacheItem.C: ws change
247 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
249 * Makefile.am: if there is no image loading class leveraging the power
250 of the appropriate gui library, then compile the basic alternative
251 found in GraphicsImageXPM.[Ch].
253 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
255 * GraphicsCache.C: change associated with move of initialiseGraphics
258 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
260 * GraphicsParams.[Ch]:
262 * GraphicsImageXPM.C: properly resolve more warnings about comparison
263 between signed and unsigned integer expressions.
265 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
267 * GraphicsCache.C: move connections to the GImage-derived classes to
270 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
272 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
273 conversion, then do that.
275 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
277 * GraphicsCache.C: improve commentary to graphicsInit and where it
280 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
281 that became a memory leak properly. (Let the shared_c_ptr free the
283 (reset, mapcolor): tidy up and introduce a work around for XPM files
284 with crappy color entries. Print out a nice friendly message on what's
285 gone wrong and how to resolve it properly.
287 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
289 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
290 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
292 (unique_color_string): use the correct string c-tor.
294 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
297 * ImageLoaderXPM.[Ch]: removed.
299 * GraphicsConverter.[Ch]:
300 * GraphicsImage.[Ch]:
301 * GraphicsImageXPM.[Ch]:
302 * GraphicsParams.[Ch]:
303 * GraphicsTypes.h: new files.
305 * All files. A total re-write of the graphics cache. The cache now
306 supports asynchronous file conversion and file loading. Images
307 can be cropped, rotated and scaled for display on the LyX screen.
308 The old LyXImage and ImageLoader have been combined in a new class
309 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
312 2002-02-07 Herbert Voss <voss@lyx.org>
314 * GraphicsCacheItem.C: use unzipFile() from support/filetools
316 2002-01-31 Herbert Voss <voss@lyx.org>
318 * GraphicsCacheItem.h: handle filetype without the file extension;
319 getting type from contents; handle zipped files
321 2002-01-27 Herbert Voss <voss@lyx.org>
323 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
325 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
327 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
329 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
331 * GraphicsCacheItem.h: do not include <config.h> in header files
333 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
335 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
336 transparent colour, then set it to the colour of the background.
337 Also take account of the monochrome, grayscale of color
340 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
342 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
343 are different. Thus, don't delete the "to" if it's the original!
345 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
347 * ImageLoadXPM.C: remove setting of alloc colour mask,
348 led to crash as we don't define a callback
350 2001-07-29 Baruch Even <baruch@lyx.org>
352 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
353 colors with closeness of 10000.
355 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
357 2001-07-29 Baruch Even <baruch@lyx.org>
359 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
362 2001-07-23 Baruch Even <baruch@lyx.org>
364 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
365 the image after conversion.
367 2001-07-17 Baruch Even <baruch@lyx.org>
369 * GraphicsCacheItem.h:
370 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
371 from synchronous to asynchronous and to ease the coming changes.
373 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
375 * ImageLoaderXPM.C (runImageLoader): get display information from
378 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
381 * GraphicsCacheItem.C:
383 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
385 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
387 * GraphicsCache.h: inherit privately from noncopyable
388 * ImageLoader.h: ditto
389 * GraphicsCacheItem.h: ditto
391 2001-04-16 Allan Rae <rae@lyx.org>
393 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
394 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
397 2001-04-02 Baruch Even <baruch@lyx.org>
399 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
400 of hard coding ImageMagick.
402 2001-03-10 Baruch Even <baruch@lyx.org>
404 * GraphicsCache.C: Style change from (*it).field to it->field
406 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
408 * GraphicsCache.h: noncopyable is in namespace boost
409 * ImageLoader.h: ditto
410 * GraphicsCacheItem.h: ditto
412 2001-03-07 Baruch Even <baruch@lyx.org>
414 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
415 was false and it's not needed anyhow since the shared_ptr's in the cache
416 will destroy everything on exit.
418 2001-02-28 Baruch Even <baruch@ev-en.org>
421 * GraphicsCache.C: Changed the singleton pattern implementation, the
422 former version "leaked" in the sense that it was not deallocated at
425 2001-02-20 Baruch Even <baruch@ev-en.org>
427 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
428 instead of a pure pointer.
430 * GraphicsCacheItem.[Ch]:
431 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
432 removed the reference counting that was inside. Also fixed a bug where
433 a temporary file wouldn't get erased.
435 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
436 Ownership is now dropped when the caller requests the image_ pointer.
438 2001-02-20 Baruch Even <baruch@ev-en.org>
440 * GraphicsCache.C: Cleared up the confusion on when and how it is
443 * GraphicsCacheItem.C: Indentation change.
445 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
446 figure correctly when the image has been loaded successfully.
448 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
450 * ImageLoader.C: add a "using" directive.
452 * ImageLoader.h: remove extra comma at the end of enum; add an
453 std:: qualifier for vector.
455 2001-01-21 Baruch Even <baruch@ev-en.org>
457 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
458 height in the image itself and minor cleanups.
460 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
461 new ImageLoader class instead of the older Renderer class. This
462 means change of responsibilities.