2 /* This file is part of
3 * =================================================
5 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich.
7 * Copyright 1995-2000 The LyX Team.
9 * This file Copyright 2000 Baruch Even
10 * ================================================= */
13 #pragma implementation
19 #include FORMS_H_LOCATION
20 #include "support/filetools.h"
22 #include "frontends/support/LyXImage.h"
25 : width_(0), height_(0), pixmapLoaded_(false)
33 bool Renderer::setFilename(string const & filename)
35 // Make sure file exists and is readable.
36 if (! IsFileReadable(filename)) {
40 // Verify that the file format is correct.
41 if (! isImageFormatOK(filename)) {
49 bool Renderer::renderImage()
54 bool Renderer::isImageFormatOK(string const & /*filename*/) const
59 void Renderer::setPixmap(LyXImage * pixmap, unsigned int width, unsigned int height)
69 LyXImage * Renderer::getPixmap() const
74 unsigned int Renderer::getWidth() const
77 unsigned int Renderer::getHeight() const
82 string const & Renderer::getFilename() const
87 void Renderer::freePixmap()
90 XFreePixmap(fl_get_display(), pixmap_->getPixmap());