3 * \file RenderGraphic.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
12 #ifndef RENDERGRAPHIC_H
13 #define RENDERGRAPHIC_H
15 #include "RenderBase.h"
17 #include "graphics/GraphicsLoader.h"
18 #include "graphics/GraphicsParams.h"
24 class RenderGraphic : public RenderBase
27 RenderGraphic(Inset const *);
28 RenderGraphic(RenderGraphic const &, Inset const *);
29 RenderBase * clone(Inset const *) const;
31 /// compute the size of the object returned in dim
32 void metrics(MetricsInfo & mi, Dimension & dim) const;
34 void draw(PainterInfo & pi, int x, int y) const;
36 /// Refresh the info about which file to display and how to display it.
37 void update(graphics::Params const & params);
39 /// equivalent to dynamic_cast
40 virtual RenderGraphic * asGraphic() { return this; }
44 RenderGraphic & operator=(RenderGraphic const &);
47 graphics::Loader loader_;
48 graphics::Params params_;
55 #endif // NOT RENDERGRAPHIC_H