mirror of https://github.com/KLayout/klayout.git
Fixed non-Qt build
This commit is contained in:
parent
6feed82808
commit
51666eb439
|
|
@ -277,10 +277,18 @@ invert (unsigned char *data, unsigned int width, unsigned int height)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_QT)
|
||||
LayoutCanvas::LayoutCanvas (QWidget *parent, lay::LayoutViewBase *view, const char *name)
|
||||
: lay::ViewObjectWidget (parent, name),
|
||||
#else
|
||||
LayoutCanvas::LayoutCanvas (lay::LayoutViewBase *view)
|
||||
: lay::ViewObjectWidget (),
|
||||
#endif
|
||||
mp_view (view),
|
||||
mp_image (0), mp_image_bg (0), mp_pixmap (0),
|
||||
mp_image (0), mp_image_bg (0),
|
||||
#if defined(HAVE_QT)
|
||||
mp_pixmap (0),
|
||||
#endif
|
||||
m_background (0), m_foreground (0), m_active (0),
|
||||
m_oversampling (1),
|
||||
m_dpr (1),
|
||||
|
|
@ -447,10 +455,12 @@ LayoutCanvas::prepare_drawing ()
|
|||
delete mp_image;
|
||||
}
|
||||
mp_image = new lay::PixelBuffer (m_viewport_l.width (), m_viewport_l.height ());
|
||||
#if defined(HAVE_QT)
|
||||
if (mp_pixmap) {
|
||||
delete mp_pixmap;
|
||||
mp_pixmap = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
mp_image->fill (m_background);
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ static bool compare_images (const lay::BitmapBuffer &img, const lay::BitmapBuffe
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_QT) // @@@
|
||||
TEST(1)
|
||||
{
|
||||
lay::LayoutView lv (0, false, 0);
|
||||
|
|
@ -169,3 +170,4 @@ TEST(3)
|
|||
|
||||
EXPECT_EQ (compare_images (qimg, au), true);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ static bool compare_images_mono (const QImage &qimg, const std::string &au)
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static bool compare_images (const lay::PixelBuffer &img, const lay::PixelBuffer &img2)
|
||||
{
|
||||
if (img2.width () == img.width () && img2.height () == img.height ()) {
|
||||
|
|
@ -101,8 +103,6 @@ static bool compare_images (const lay::BitmapBuffer &img, const lay::BitmapBuffe
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
TEST(1)
|
||||
{
|
||||
lay::PixelBuffer img (15, 25);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "tlCommon.h"
|
||||
#include "tlThreads.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace tl
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue