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)
34 bool Renderer::setFilename(string const & filename)
36 // Make sure file exists and is readable.
37 if (! IsFileReadable(filename)) {
41 // Verify that the file format is correct.
42 if (! isImageFormatOK(filename)) {
51 bool Renderer::renderImage()
57 bool Renderer::isImageFormatOK(string const & /*filename*/) const
63 void Renderer::setPixmap(Pixmap pixmap,
64 unsigned int width, unsigned int height)
75 Pixmap Renderer::getPixmap() const
81 unsigned int Renderer::getWidth() const
87 unsigned int Renderer::getHeight() const
93 string const & Renderer::getFilename() const
99 void Renderer::freePixmap()
102 XFreePixmap(fl_get_display(), pixmap_);