diff options
Diffstat (limited to 'frontends/qt/plotters.cpp')
-rw-r--r-- | frontends/qt/plotters.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/frontends/qt/plotters.cpp b/frontends/qt/plotters.cpp index 4d56a8522..9dda469ac 100644 --- a/frontends/qt/plotters.cpp +++ b/frontends/qt/plotters.cpp @@ -36,6 +36,7 @@ extern "C" { } #include "qt/window.h" +#include "qt/layout.h" #include "qt/plotters.h" @@ -296,22 +297,13 @@ nsqt_plot_bitmap(const struct redraw_context *ctx, */ static nserror nsqt_plot_text(const struct redraw_context *ctx, - const struct plot_font_style *fstyle, - int x, - int y, - const char *text, - size_t length) + const struct plot_font_style *fstyle, + int x, + int y, + const char *text, + size_t length) { - QPainter* painter = (QPainter*)ctx->priv; - QColor strokecolour(fstyle->foreground & 0xFF, - (fstyle->foreground & 0xFF00) >>8, - (fstyle->foreground & 0xFF0000) >>16); - QPen pen(strokecolour); - painter->setPen(pen); - - painter->drawText(x,y, QString::fromUtf8(text,length)); - - return NSERROR_OK; + return nsqt_layout_plot((QPainter*)ctx->priv, fstyle, x, y, text, length); } |