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"
24 : width_(0), height_(0), pixmapLoaded_(false)
32 bool Renderer::setFilename(string const & filename)
34 // Make sure file exists and is readable.
35 if (! IsFileReadable(filename)) {
39 // Verify that the file format is correct.
40 if (! isImageFormatOK(filename)) {
48 bool Renderer::renderImage()
53 bool Renderer::isImageFormatOK(string const & /*filename*/) const
58 void Renderer::setPixmap(Pixmap pixmap, unsigned int width, unsigned int height)
68 Pixmap Renderer::getPixmap() const
71 unsigned int Renderer::getWidth() const
74 unsigned int Renderer::getHeight() const
77 string const & Renderer::getFilename() const
80 void Renderer::freePixmap()
83 XFreePixmap(fl_display, pixmap_);