#include "language.h"
#include "frontends/GUIRunTime.h"
-#include "frontends/support/LyXImage.h"
+#include "graphics/GraphicsImage.h"
#include "support/LAssert.h"
#include "support/lstrings.h"
}
-PainterBase & Painter::image(int x, int y, int w, int h, LyXImage const * image)
+PainterBase & Painter::image(int x, int y, int w, int h,
+ grfx::GImage const & image)
{
- Pixmap bitmap = image->getPixmap();
-
- return pixmap(x, y, w, h, bitmap);
+ return pixmap(x, y, w, h, image.getPixmap());
}
smallfont.decSize().decSize().setShape(LyXFont::UP_SHAPE);
int tmpx = x;
for (size_t i = 0; i < ls; ++i) {
- char c = s[i];
- if (islower(static_cast<unsigned char>(c))) {
- c = toupper(c);
+ char const c = uppercase(s[i]);
+ if (c != s[i]) {
lyxfont::XSetFont(display, gc, smallfont);
- XDrawString(display, owner.getPixmap(),
- gc, tmpx, y, &c, 1);
+ XDrawString(display, owner.getPixmap(), gc,
+ tmpx, y, &c, 1);
tmpx += lyxfont::XTextWidth(smallfont, &c, 1);
} else {
lyxfont::XSetFont(display, gc, f);
- XDrawString(display, owner.getPixmap(),
- gc, tmpx, y, &c, 1);
+ XDrawString(display, owner.getPixmap(), gc,
+ tmpx, y, &c, 1);
tmpx += lyxfont::XTextWidth(f, &c, 1);
}
}
static XChar2b c;
int tmpx = x;
for (int i = 0; i < ls; ++i) {
- if (s[i].byte1 == 0 && islower(s[i].byte2)) {
- c.byte2 = toupper(s[i].byte2);
+ if (s[i].byte1)
+ c = s[i];
+ else {
+ c.byte1 = s[i].byte1;
+ c.byte2 = uppercase(s[i].byte2);
+ }
+ if (c.byte2 != s[i].byte2) {
lyxfont::XSetFont(display, gc, smallfont);
- XDrawString16(display, owner.getPixmap(),
- gc, tmpx, y, &c, 1);
+ XDrawString16(display, owner.getPixmap(), gc,
+ tmpx, y, &c, 1);
tmpx += lyxfont::XTextWidth16(smallfont, &c, 1);
} else {
lyxfont::XSetFont(display, gc, f);
- XDrawString16(display, owner.getPixmap(),
- gc, tmpx, y, &s[i], 1);
- tmpx += lyxfont::XTextWidth16(f, const_cast<XChar2b *>(&s[i]), 1);
+ XDrawString16(display, owner.getPixmap(), gc,
+ tmpx, y, &c, 1);
+ tmpx += lyxfont::XTextWidth16(f, &c, 1);
}
}
}