* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author unknown
+ * \author Lars Gullik Bjønnes
* \author John Levon
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
#include "XPainter.h"
-#include "LString.h"
-#include "debug.h"
-#include "XWorkArea.h"
-#include "xfont_metrics.h"
+
#include "ColorHandler.h"
-#include "lyxrc.h"
+#include "xfont_metrics.h"
+#include "xformsImage.h"
+#include "XWorkArea.h"
+
+#include "font_metrics.h"
+
#include "encoding.h"
#include "language.h"
+#include "LColor.h"
+#include "lyxfont.h"
+#include "lyxrc.h"
-#ifdef USE_XFORMS_IMAGE_LOADER
-#include "xformsImage.h"
-#else
-#include "graphics/GraphicsImageXPM.h"
-#endif
-
-#include "support/LAssert.h"
#include "support/lstrings.h"
-#include <boost/scoped_array.hpp>
-
-#include <cmath>
+using lyx::support::uppercase;
-using std::endl;
-using std::max;
+using std::string;
XPainter::XPainter(XWorkArea & xwa)
}
-Painter & XPainter::point(int x, int y, LColor::color c)
+Painter & XPainter::point(int x, int y, LColor_color c)
{
XDrawPoint(fl_get_display(), owner_.getPixmap(),
lyxColorHandler->getGCForeground(c), x, y);
Painter & XPainter::line(int x1, int y1,
int x2, int y2,
- LColor::color col,
+ LColor_color col,
line_style ls,
line_width lw)
{
Painter & XPainter::lines(int const * xp, int const * yp,
int np,
- LColor::color col,
+ LColor_color col,
line_style ls,
line_width lw)
{
Painter & XPainter::rectangle(int x, int y,
int w, int h,
- LColor::color col,
+ LColor_color col,
line_style ls,
line_width lw)
{
Painter & XPainter::fillRectangle(int x, int y,
int w, int h,
- LColor::color col)
+ LColor_color col)
{
XFillRectangle(fl_get_display(), owner_.getPixmap(),
lyxColorHandler->getGCForeground(col), x, y, w, h);
Painter & XPainter::fillPolygon(int const * xp, int const * yp,
- int np, LColor::color col)
+ int np, LColor_color col)
{
boost::scoped_array<XPoint> points(new XPoint[np]);
Painter & XPainter::arc(int x, int y,
unsigned int w, unsigned int h,
- int a1, int a2, LColor::color col)
+ int a1, int a2, LColor_color col)
{
XDrawArc(fl_get_display(), owner_.getPixmap(),
lyxColorHandler->getGCForeground(col),
Painter & XPainter::image(int x, int y,
- int w, int h,
- grfx::Image const & i)
+ int w, int h,
+ lyx::graphics::Image const & i)
{
-#ifdef USE_XFORMS_IMAGE_LOADER
- grfx::xformsImage const & image = static_cast<grfx::xformsImage const &>(i);
-#else
- grfx::ImageXPM const & image = static_cast<grfx::ImageXPM const &>(i);
-#endif
+ lyx::graphics::xformsImage const & image =
+ static_cast<lyx::graphics::xformsImage const &>(i);
XGCValues val;
val.function = GXcopy;