Hello Everyone,

I don't now if this is the best place to report this because I'm not on
the development team, if not I'm sorry. I have a big document (more
then 1800 pages) and saw that this document was not show in full.
Luckely when I posted this as a bug Joris van der Hoeven provided me
with a solution where I had to change '#define SI_32' into '#define
SI_64' in the file basic.hpp and recompile. This fully solved the
problem and I have used this version without any problems. Yesterday
however I downloaded the latest source version via 'svn co
svn://svn.savannah.gnu.org/texmacs/trunk/src', made the changes in
basic.hpp file and did a compile. Unfortunately the compile failed with
a type error. After examing the compilation error I have found a
solution that I want to share with you (see below for the code). I hope
this helps in the development of TeXmacs. Also thank you very much for
the development of this excelent mathematical tool.

Best regards

Marc Mertens

*** Old Version ***

#if QT_VERSION < 0x060000
static QPixmap
impress (qt_simple_widget_rep* wid) {
  int width, height;

  wid->handle_get_size_hint (width, height);
  QSize s = to_qsize (width, height);
  QSize phys_s = s; phys_s *= retina_factor;
  QPixmap pxm (phys_s);
  if (DEBUG_QT)
    debug_qt << "impress (" << s.width() << "," << s.height() << ")\n";
  pxm.fill (Qt::transparent);
  {
    qt_renderer_rep *ren = the_qt_renderer();
    ren->begin (static_cast<QPaintDevice*>(&pxm));
    rectangle r = rectangle (0, 0,  phys_s.width(), phys_s.height());
    ren->set_origin (0, 0);
    ren->encode (r->x1, r->y1);
    ren->encode (r->x2, r->y2);
    ren->set_clipping (r->x1, r->y2, r->x2, r->y1);
    {
        // we do not want to be interrupted here...
      the_gui->set_check_events (false);
      wid->handle_repaint (ren, r->x1, r->y2, r->x2, r->y1);
      the_gui->set_check_events (true);
    }
    ren->end();
  }
  return pxm;
}
#endif


** New version ***

#if QT_VERSION < 0x060000
static QPixmap
impress (qt_simple_widget_rep* wid) {
  //int width, height;
#ifdef SI_32
  int width, height;
#else
  long int width, height;
#endif
  wid->handle_get_size_hint (width, height);
  QSize s = to_qsize (width, height);
  QSize phys_s = s; phys_s *= retina_factor;
  QPixmap pxm (phys_s);
  if (DEBUG_QT)
    debug_qt << "impress (" << s.width() << "," << s.height() << ")\n";
  pxm.fill (Qt::transparent);
  {
    qt_renderer_rep *ren = the_qt_renderer();
    ren->begin (static_cast<QPaintDevice*>(&pxm));
    rectangle r = rectangle (0, 0,  phys_s.width(), phys_s.height());
    ren->set_origin (0, 0);
    ren->encode (r->x1, r->y1);
    ren->encode (r->x2, r->y2);
    ren->set_clipping (r->x1, r->y2, r->x2, r->y1);
    {
        // we do not want to be interrupted here...
      the_gui->set_check_events (false);
      wid->handle_repaint (ren, r->x1, r->y2, r->x2, r->y1);
      the_gui->set_check_events (true);
    }
    ren->end();
  }
  return pxm;
}
#endif





_______________________________________________
Texmacs-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to