mirror of https://github.com/KLayout/klayout.git
Merge branch 'issue-234'
This commit is contained in:
commit
50c73dbae8
|
|
@ -2066,7 +2066,7 @@ MainWindow::cm_print ()
|
||||||
text_rect.setBottom (text_rect.bottom () - hh / 2);
|
text_rect.setBottom (text_rect.bottom () - hh / 2);
|
||||||
text_rect.setTop (text_rect.top () + hh / 2);
|
text_rect.setTop (text_rect.top () + hh / 2);
|
||||||
|
|
||||||
QImage img = current_view ()->get_image_with_options (page_rect.width (), page_rect.height () - 4 * hh, 2, 1, 1.0 / 3.0, Qt::white, Qt::black, Qt::black, db::DBox (), false);
|
QImage img = current_view ()->get_image_with_options (page_rect.width (), page_rect.height () - 4 * hh, 1, 1, 1.0 / 3.0, Qt::white, Qt::black, Qt::black, db::DBox (), false);
|
||||||
|
|
||||||
painter.drawImage (QPoint (page_rect.left (), page_rect.top () + hh * 2), img);
|
painter.drawImage (QPoint (page_rect.left (), page_rect.top () + hh * 2), img);
|
||||||
painter.setFont (header_font);
|
painter.setFont (header_font);
|
||||||
|
|
|
||||||
|
|
@ -350,8 +350,8 @@ public:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint32_t *dc = ff.data () + size_t (ch - ff.first_char ()) * ff.height ();
|
const uint32_t *dc = ff.data () + size_t (ch - ff.first_char ()) * ff.height () * ff.stride ();
|
||||||
for (unsigned int i = 0; i < ff.height (); ++i, ++dc) {
|
for (unsigned int i = 0; i < ff.height (); ++i, dc += ff.stride ()) {
|
||||||
|
|
||||||
int iy = y - ff.height () + i + 1;
|
int iy = y - ff.height () + i + 1;
|
||||||
if (iy >= 0 || iy < mp_img->height ()) {
|
if (iy >= 0 || iy < mp_img->height ()) {
|
||||||
|
|
@ -359,10 +359,21 @@ public:
|
||||||
uint32_t *d = (uint32_t *) mp_img->scanLine (y - ff.height () + i);
|
uint32_t *d = (uint32_t *) mp_img->scanLine (y - ff.height () + i);
|
||||||
uint32_t m = 1;
|
uint32_t m = 1;
|
||||||
int ix = x;
|
int ix = x;
|
||||||
for (unsigned int j = 0; j < ff.width (); ++j, m <<= 1, ++ix) {
|
const uint32_t *ds = dc;
|
||||||
if (*dc & m && ix >= 0 && ix < mp_img->width ()) {
|
|
||||||
|
for (unsigned int j = 0; j < ff.width (); ++j, ++ix) {
|
||||||
|
|
||||||
|
if ((*ds & m) && ix >= 0 && ix < mp_img->width ()) {
|
||||||
d[ix] = c.rgb ();
|
d[ix] = c.rgb ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m <<= 1;
|
||||||
|
// word wrap
|
||||||
|
if (m == 0) {
|
||||||
|
++ds;
|
||||||
|
m = 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -844,7 +844,7 @@ LayoutCanvas::image_with_options (unsigned int width, unsigned int height, int l
|
||||||
do_render_bg (vp, vo_canvas);
|
do_render_bg (vp, vo_canvas);
|
||||||
|
|
||||||
// paint the layout bitmaps
|
// paint the layout bitmaps
|
||||||
rd_canvas.to_image (m_view_ops, dither_pattern (), line_styles (), background, foreground, active, this, vo_canvas.bg_image (), vp.width (), vp.height ());
|
rd_canvas.to_image (view_ops, dither_pattern (), line_styles (), background, foreground, active, this, vo_canvas.bg_image (), vp.width (), vp.height ());
|
||||||
|
|
||||||
// subsample current image to provide the background for the foreground objects
|
// subsample current image to provide the background for the foreground objects
|
||||||
vo_canvas.make_background ();
|
vo_canvas.make_background ();
|
||||||
|
|
@ -860,7 +860,7 @@ LayoutCanvas::image_with_options (unsigned int width, unsigned int height, int l
|
||||||
|
|
||||||
// TODO: Painting of background objects???
|
// TODO: Painting of background objects???
|
||||||
// paint the layout bitmaps
|
// paint the layout bitmaps
|
||||||
rd_canvas.to_image (m_view_ops, dither_pattern (), line_styles (), background, foreground, active, this, vo_canvas.bg_image (), vp.width (), vp.height ());
|
rd_canvas.to_image (view_ops, dither_pattern (), line_styles (), background, foreground, active, this, vo_canvas.bg_image (), vp.width (), vp.height ());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue