diff --git a/build/cmake/tests/gui/CMakeLists.txt b/build/cmake/tests/gui/CMakeLists.txt index 698d3a1086..c3d5d6be9f 100644 --- a/build/cmake/tests/gui/CMakeLists.txt +++ b/build/cmake/tests/gui/CMakeLists.txt @@ -21,6 +21,7 @@ set(TEST_GUI_SRC graphics/measuring.cpp graphics/affinematrix.cpp graphics/boundingbox.cpp + graphics/clipper.cpp graphics/clippingbox.cpp graphics/coords.cpp graphics/graphbitmap.cpp diff --git a/tests/Makefile.in b/tests/Makefile.in index f17a546b63..15c96bfe8a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -188,6 +188,7 @@ TEST_GUI_OBJECTS = \ test_gui_measuring.o \ test_gui_affinematrix.o \ test_gui_boundingbox.o \ + test_gui_clipper.o \ test_gui_clippingbox.o \ test_gui_coords.o \ test_gui_graphbitmap.o \ @@ -929,6 +930,9 @@ test_gui_affinematrix.o: $(srcdir)/graphics/affinematrix.cpp $(TEST_GUI_ODEP) test_gui_boundingbox.o: $(srcdir)/graphics/boundingbox.cpp $(TEST_GUI_ODEP) $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/graphics/boundingbox.cpp +test_gui_clipper.o: $(srcdir)/graphics/clipper.cpp $(TEST_GUI_ODEP) + $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/graphics/clipper.cpp + test_gui_clippingbox.o: $(srcdir)/graphics/clippingbox.cpp $(TEST_GUI_ODEP) $(CXXC) -c -o $@ $(TEST_GUI_CXXFLAGS) $(srcdir)/graphics/clippingbox.cpp diff --git a/tests/graphics/clipper.cpp b/tests/graphics/clipper.cpp new file mode 100644 index 0000000000..f8e0ac8fd8 --- /dev/null +++ b/tests/graphics/clipper.cpp @@ -0,0 +1,759 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: tests/graphics/clipper.cpp +// Purpose: wxDCClipper unit tests +// Author: Artur Wieczorek +// Created: 2022-12-27 +// Copyright: (c) 2022 wxWidgets development team +/////////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "testprec.h" + +#include + +#include "wx/bitmap.h" +#include "wx/dcclient.h" +#include "wx/dcgraph.h" +#include "wx/dcmemory.h" +#include "wx/dcsvg.h" +#include "wx/app.h" +#include "wx/window.h" + +#include "testfile.h" +#include "waitforpaint.h" + +static const wxSize s_dcSize(260, 300); + +static inline wxRect DeviceToLogical(wxDC& dc, const wxRect& r) +{ + return wxRect(dc.DeviceToLogical(r.GetPosition()), dc.DeviceToLogicalRel(r.GetSize())); +} + +static void NoTransform(wxDC& dc) +{ + wxRect initClipBox; + dc.GetClippingBox(initClipBox); + { + const wxRect r(10, 20, 30, 40); + wxDCClipper clipper(dc, r); + + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(r == clipBox); + } + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(initClipBox == clipBox); +} + +static void ExternalTransform(wxDC& dc, bool useTransformMatrix) +{ +#if wxUSE_DC_TRANSFORM_MATRIX + if ( useTransformMatrix && !dc.CanUseTransformMatrix() ) + return; +#endif // wxUSE_DC_TRANSFORM_MATRIX + +#if wxUSE_DC_TRANSFORM_MATRIX + if ( useTransformMatrix ) + { + wxAffineMatrix2D m; + m.Translate(40, 75); + m.Scale(2.0, 3.0); + dc.SetTransformMatrix(m); + } + else +#endif // wxUSE_DC_TRANSFORM_MATRIX + { + dc.SetDeviceOrigin(10, 15); + dc.SetUserScale(0.5, 1.5); + dc.SetLogicalScale(4.0, 2.0); + dc.SetLogicalOrigin(-15, -20); + } + + wxRect initClipBox; + dc.GetClippingBox(initClipBox); + { + const wxRect r(10, 20, 30, 40); + wxDCClipper clipper(dc, r); + + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(r == clipBox); + } + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(initClipBox == clipBox); +} + +static void InternalTransform(wxDC& dc, bool useTransformMatrix) +{ +#if wxUSE_DC_TRANSFORM_MATRIX + if ( useTransformMatrix && !dc.CanUseTransformMatrix() ) + return; +#endif // wxUSE_DC_TRANSFORM_MATRIX + + wxRect initClipBox; + dc.GetClippingBox(initClipBox); + { + const wxRect r(10, 20, 30, 40); + wxDCClipper clipper(dc, r); + +#if wxUSE_DC_TRANSFORM_MATRIX + if ( useTransformMatrix ) + { + wxAffineMatrix2D m; + m.Translate(40, 75); + m.Scale(2.0, 3.0); + dc.SetTransformMatrix(m); + } + else +#endif // wxUSE_DC_TRANSFORM_MATRIX + { + dc.SetDeviceOrigin(10, 15); + dc.SetUserScale(0.5, 1.5); + dc.SetLogicalScale(4.0, 2.0); + dc.SetLogicalOrigin(-15, -20); + } + + wxRect clipExpected = DeviceToLogical(dc, r); + + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(clipExpected == clipBox); + } + wxRect initClipExpected = DeviceToLogical(dc, initClipBox); + + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(initClipExpected == clipBox); +} + +static void SpecificClipping(wxDC& dc) +{ + wxRect initClipBox; + dc.GetClippingBox(initClipBox); + { + const wxRect r(10, 20, 30, 40); + wxDCClipper clipper(dc, r); + + const wxRect r1(16, 25, 20, 30); + dc.SetClippingRegion(r1); + + wxRect clipExpected = DeviceToLogical(dc, r1); + + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(clipExpected == clipBox); + } + wxRect initClipExpected = DeviceToLogical(dc, initClipBox); + + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(initClipExpected == clipBox); +} + +static void InternalTransformSpecificClipping(wxDC& dc, bool useTransformMatrix) +{ +#if wxUSE_DC_TRANSFORM_MATRIX + if ( useTransformMatrix && !dc.CanUseTransformMatrix() ) + return; +#endif // wxUSE_DC_TRANSFORM_MATRIX + + wxRect initClipBox; + dc.GetClippingBox(initClipBox); + { + const wxRect r(10, 20, 30, 40); + wxDCClipper clipper(dc, r); + + const wxRect r1(16, 25, 20, 30); + dc.SetClippingRegion(r1); + +#if wxUSE_DC_TRANSFORM_MATRIX + if ( useTransformMatrix ) + { + wxAffineMatrix2D m; + m.Translate(40, 75); + m.Scale(2.0, 3.0); + dc.SetTransformMatrix(m); + } + else +#endif // wxUSE_DC_TRANSFORM_MATRIX + { + dc.SetDeviceOrigin(10, 15); + dc.SetUserScale(0.5, 1.5); + dc.SetLogicalScale(4.0, 2.0); + dc.SetLogicalOrigin(-15, -20); + } + + wxRect clipExpected = DeviceToLogical(dc, r1); + + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(clipExpected == clipBox); + } + wxRect initClipExpected = DeviceToLogical(dc, initClipBox); + + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(initClipExpected == clipBox); +} + +static void NoTransformEmbeddedClip(wxDC& dc) +{ + wxRect initClipBox; + dc.GetClippingBox(initClipBox); + { + const wxRect r1(10, 20, 30, 40); + wxDCClipper clipper1(dc, r1); + { + const wxRect r2(15, 25, 20, 30); + wxDCClipper clipper2(dc, r2); + + wxRect clipBox2; + dc.GetClippingBox(clipBox2); + CHECK(r2 == clipBox2); + } + + wxRect clipBox1; + dc.GetClippingBox(clipBox1); + CHECK(r1 == clipBox1); + } + wxRect clipBox; + dc.GetClippingBox(clipBox); + CHECK(initClipBox == clipBox); +} + +static void DCAttributes(wxDC& dc) +{ + // Check if wxDC atrributes left unchanged + wxFont font = dc.GetFont().Bold().Smaller(); + wxPen pen(*wxYELLOW, 2); + wxBrush brush = *wxBLUE_BRUSH; + + wxDCFontChanger fontChanger(dc, font); + wxDCPenChanger penChanger(dc,pen); + wxDCBrushChanger brushChanger(dc, brush); + wxCoord chWidth = dc.GetCharWidth(); + wxCoord chHeight = dc.GetCharHeight(); + wxFontMetrics fm = dc.GetFontMetrics(); + { + wxDCClipper clipper(dc, 10, 20, 30, 40); + } + CHECK(dc.GetFont() == font); + CHECK(dc.GetPen() == pen); + CHECK(dc.GetBrush() == brush); + CHECK(dc.GetCharWidth() == chWidth); + CHECK(dc.GetCharHeight() == chHeight); + wxFontMetrics fm2 = dc.GetFontMetrics(); + CHECK(fm2.ascent == fm.ascent); + CHECK(fm2.averageWidth == fm.averageWidth); + CHECK(fm2.descent == fm.descent); + CHECK(fm2.externalLeading == fm.externalLeading); + CHECK(fm2.height == fm.height); + CHECK(fm2.internalLeading == fm.internalLeading); +} + +TEST_CASE("ClipperTestCase::wxDC", "[clipper][dc]") +{ + wxBitmap bmp(s_dcSize); + wxMemoryDC dc(bmp); + dc.SetBackground(*wxWHITE_BRUSH); + dc.Clear(); + + SECTION("NoTransform") + { + NoTransform(dc); + } + + SECTION("ExternalTransform 1") + { + ExternalTransform(dc, false); + } + + SECTION("ExternalTransform 2") + { + ExternalTransform(dc, true); + } + + SECTION("InternalTransform 1") + { + InternalTransform(dc, false); + } + + SECTION("InternalTransform 2") + { + InternalTransform(dc, true); + } + + SECTION("SpecificClipping") + { + SpecificClipping(dc); + } + + SECTION("InternalTransformSpecificClipping 1") + { + InternalTransformSpecificClipping(dc, false); + } + + SECTION("InternalTransformSpecificClipping 2") + { + InternalTransformSpecificClipping(dc, true); + } + + SECTION("NoTransformEmbeddedClip") + { + NoTransformEmbeddedClip(dc); + } + + SECTION("DCAttributes") + { + DCAttributes(dc); + } +} + +#if wxUSE_GRAPHICS_CONTEXT +TEST_CASE("ClipperTestCase::wxGCDC", "[clipper][dc][gcdc]") +{ +#ifdef __WXMSW__ + int depth = GENERATE(24, 32); + + wxBitmap bmp(s_dcSize, depth); +#else + wxBitmap bmp(s_dcSize); +#endif + wxMemoryDC mdc(bmp); + mdc.SetBackground(*wxWHITE_BRUSH); + mdc.Clear(); + wxGCDC dc(mdc); + dc.GetGraphicsContext()->SetAntialiasMode(wxANTIALIAS_NONE); + dc.GetGraphicsContext()->DisableOffset(); + + SECTION("NoTransform") + { + NoTransform(dc); + } + + SECTION("ExternalTransform 1") + { + ExternalTransform(dc, false); + } + + SECTION("ExternalTransform 2") + { + ExternalTransform(dc, true); + } + + SECTION("InternalTransform 1") + { + InternalTransform(dc, false); + } + + SECTION("InternalTransform 2") + { + InternalTransform(dc, true); + } + + SECTION("SpecificClipping") + { + SpecificClipping(dc); + } + + SECTION("InternalTransformSpecificClipping 1") + { + InternalTransformSpecificClipping(dc, false); + } + + SECTION("InternalTransformSpecificClipping 2") + { + InternalTransformSpecificClipping(dc, true); + } + + SECTION("NoTransformEmbeddedClip") + { + NoTransformEmbeddedClip(dc); + } + + SECTION("DCAttributes") + { + DCAttributes(dc); + } +} + +#ifdef __WXMSW__ +#if wxUSE_GRAPHICS_GDIPLUS +TEST_CASE("ClipperTestCase::wxGCDC(GDI+)", "[clipper][dc][gcdc][gdiplus]") +{ + int depth = GENERATE(24, 32); + + wxBitmap bmp(s_dcSize, depth); + wxMemoryDC mdc(bmp); + mdc.SetBackground(*wxWHITE_BRUSH); + mdc.Clear(); + wxGraphicsRenderer* rend = wxGraphicsRenderer::GetGDIPlusRenderer(); + REQUIRE(rend); + wxGraphicsContext* gc = rend->CreateContext(mdc); + gc->SetAntialiasMode(wxANTIALIAS_NONE); + gc->DisableOffset(); + wxGCDC dc(gc); + + SECTION("NoTransform") + { + NoTransform(dc); + } + + SECTION("ExternalTransform 1") + { + ExternalTransform(dc, false); + } + + SECTION("ExternalTransform 2") + { + ExternalTransform(dc, true); + } + + SECTION("InternalTransform 1") + { + InternalTransform(dc, false); + } + + SECTION("InternalTransform 2") + { + InternalTransform(dc, true); + } + + SECTION("SpecificClipping") + { + SpecificClipping(dc); + } + + SECTION("InternalTransformSpecificClipping 1") + { + InternalTransformSpecificClipping(dc, false); + } + + SECTION("InternalTransformSpecificClipping 2") + { + InternalTransformSpecificClipping(dc, true); + } + + SECTION("NoTransformEmbeddedClip") + { + NoTransformEmbeddedClip(dc); + } + + SECTION("DCAttributes") + { + DCAttributes(dc); + } +} +#endif // wxUSE_GRAPHICS_GDIPLUS + +#if wxUSE_GRAPHICS_DIRECT2D +TEST_CASE("ClipperTestCase::wxGCDC(Direct2D)", "[clipper][dc][gcdc][direct2d]") +{ + if ( wxIsRunningUnderWine() ) + { + WARN("Skipping tests known to fail in Wine"); + } + else + { + int depth = GENERATE(24, 32); + + wxBitmap bmp(s_dcSize, depth); + wxMemoryDC mdc(bmp); + mdc.SetBackground(*wxWHITE_BRUSH); + mdc.Clear(); + wxGraphicsRenderer* rend = wxGraphicsRenderer::GetDirect2DRenderer(); + REQUIRE(rend); + wxGraphicsContext* gc = rend->CreateContext(mdc); + gc->SetAntialiasMode(wxANTIALIAS_NONE); + gc->DisableOffset(); + wxGCDC dc(gc); + + SECTION("NoTransform") + { + NoTransform(dc); + } + + SECTION("ExternalTransform 1") + { + ExternalTransform(dc, false); + } + + SECTION("ExternalTransform 2") + { + ExternalTransform(dc, true); + } + + SECTION("InternalTransform 1") + { + InternalTransform(dc, false); + } + + SECTION("InternalTransform 2") + { + InternalTransform(dc, true); + } + + SECTION("SpecificClipping") + { + SpecificClipping(dc); + } + + SECTION("InternalTransformSpecificClipping 1") + { + InternalTransformSpecificClipping(dc, false); + } + + SECTION("InternalTransformSpecificClipping 2") + { + InternalTransformSpecificClipping(dc, true); + } + + SECTION("NoTransformEmbeddedClip") + { + NoTransformEmbeddedClip(dc); + } + + SECTION("DCAttributes") + { + DCAttributes(dc); + } + } +} +#endif // wxUSE_GRAPHICS_DIRECT2D +#endif // __WXMSW__ + +#if wxUSE_CAIRO +TEST_CASE("ClipperTestCase::wxGCDC(Cairo)", "[clipper][dc][gcdc][cairo]") +{ +#ifdef __WXMSW__ + int depth = GENERATE(24, 32); + + wxBitmap bmp(s_dcSize, depth); +#else + wxBitmap bmp(s_dcSize); +#endif + wxMemoryDC mdc(bmp); + mdc.SetBackground(*wxWHITE_BRUSH); + mdc.Clear(); + wxGraphicsRenderer* rend = wxGraphicsRenderer::GetCairoRenderer(); + REQUIRE(rend); + wxGraphicsContext* gc = rend->CreateContext(mdc); + gc->SetAntialiasMode(wxANTIALIAS_NONE); + gc->DisableOffset(); + wxGCDC dc(gc); + + SECTION("NoTransform") + { + NoTransform(dc); + } + + SECTION("ExternalTransform 1") + { + ExternalTransform(dc, false); + } + + SECTION("ExternalTransform 2") + { + ExternalTransform(dc, true); + } + + SECTION("InternalTransform 1") + { + InternalTransform(dc, false); + } + + SECTION("InternalTransform 2") + { + InternalTransform(dc, true); + } + + SECTION("SpecificClipping") + { + SpecificClipping(dc); + } + + SECTION("InternalTransformSpecificClipping 1") + { + InternalTransformSpecificClipping(dc, false); + } + + SECTION("InternalTransformSpecificClipping 2") + { + InternalTransformSpecificClipping(dc, true); + } + + SECTION("NoTransformEmbeddedClip") + { + NoTransformEmbeddedClip(dc); + } + + SECTION("DCAttributes") + { + DCAttributes(dc); + } +} +#endif // wxUSE_CAIRO + +#endif // wxUSE_GRAPHICS_CONTEXT + +#if wxUSE_SVG +TEST_CASE("ClipperTestCase::wxSVGFileDC", "[clipper][dc][svgdc]") +{ + TestFile tf; + wxSVGFileDC dc(tf.GetName(), s_dcSize.x, s_dcSize.y); + dc.SetBackground(*wxWHITE_BRUSH); + dc.Clear(); + + SECTION("NoTransform") + { + NoTransform(dc); + } + + SECTION("ExternalTransform 1") + { + ExternalTransform(dc, false); + } + + SECTION("ExternalTransform 2") + { + ExternalTransform(dc, true); + } + + SECTION("InternalTransform 1") + { + InternalTransform(dc, false); + } + + SECTION("InternalTransform 2") + { + InternalTransform(dc, true); + } + + SECTION("SpecificClipping") + { + SpecificClipping(dc); + } + + SECTION("InternalTransformSpecificClipping 1") + { + InternalTransformSpecificClipping(dc, false); + } + + SECTION("InternalTransformSpecificClipping 2") + { + InternalTransformSpecificClipping(dc, true); + } + + SECTION("NoTransformEmbeddedClip") + { + NoTransformEmbeddedClip(dc); + } + + SECTION("DCAttributes") + { + DCAttributes(dc); + } +} +#endif // wxUSE_SVG + +TEST_CASE("ClipperTestCase::wxPaintDC", "[clipper][dc][paintdc]") +{ +#ifdef __WXOSX__ + WARN("Skipping tests known to fail in wxOSX"); +#else + // Ensure window is shown and large enough for testing + wxTheApp->GetTopWindow()->Raise(); + REQUIRE(wxTheApp->GetTopWindow()->IsShown()); + wxSize winSize = wxTheApp->GetTopWindow()->GetSize(); + winSize.x = wxMax(winSize.x, s_dcSize.x + 50); + winSize.y = wxMax(winSize.y, s_dcSize.y + 50); + wxTheApp->GetTopWindow()->SetSize(winSize); +#if defined(__WXGTK__) && !defined(__WXGTK3__) + // Under wxGTK2 we need to have two children (at least) because if there + // is exactly one child its size is set to fill the whole parent frame + // and the window cannot be resized - see wxTopLevelWindowBase::Layout(). + std::unique_ptr w0(new wxWindow(wxTheApp->GetTopWindow(), wxID_ANY)); +#endif // wxGTK 2 + std::unique_ptr win(new wxWindow(wxTheApp->GetTopWindow(), wxID_ANY, wxPoint(0, 0))); + win->SetClientSize(s_dcSize); + + // Wait for the first paint event to be sure + // that window really has its final size. + wxWindow* testWin = win.get(); + { + WaitForPaint waitForPaint(testWin); + testWin->Show(); + waitForPaint.YieldUntilPainted(); + } + + bool paintExecuted = false; + testWin->Bind(wxEVT_PAINT, [=, &paintExecuted](wxPaintEvent&) + { + wxPaintDC dc(testWin); + REQUIRE(dc.GetSize() == s_dcSize); + dc.SetBackground(*wxWHITE_BRUSH); + dc.Clear(); + + SECTION("NoTransform") + { + NoTransform(dc); + } + + SECTION("ExternalTransform 1") + { + ExternalTransform(dc, false); + } + + SECTION("ExternalTransform 2") + { + ExternalTransform(dc, true); + } + + SECTION("InternalTransform 1") + { + InternalTransform(dc, false); + } + + SECTION("InternalTransform 2") + { + InternalTransform(dc, true); + } + + SECTION("SpecificClipping") + { + SpecificClipping(dc); + } + + SECTION("InternalTransformSpecificClipping 1") + { + InternalTransformSpecificClipping(dc, false); + } + + SECTION("InternalTransformSpecificClipping 2") + { + InternalTransformSpecificClipping(dc, true); + } + + SECTION("NoTransformEmbeddedClip") + { + NoTransformEmbeddedClip(dc); + } + + SECTION("DCAttributes") + { + DCAttributes(dc); + } + + paintExecuted = true; + }); + + testWin->Refresh(); + testWin->Update(); + CHECK(paintExecuted == true); +#endif // !__WXOSX__ +} diff --git a/tests/makefile.gcc b/tests/makefile.gcc index 7f5a9ab402..4837241d19 100644 --- a/tests/makefile.gcc +++ b/tests/makefile.gcc @@ -161,6 +161,7 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_measuring.o \ $(OBJS)\test_gui_affinematrix.o \ $(OBJS)\test_gui_boundingbox.o \ + $(OBJS)\test_gui_clipper.o \ $(OBJS)\test_gui_clippingbox.o \ $(OBJS)\test_gui_coords.o \ $(OBJS)\test_gui_graphbitmap.o \ @@ -881,6 +882,9 @@ $(OBJS)\test_gui_affinematrix.o: ./graphics/affinematrix.cpp $(OBJS)\test_gui_boundingbox.o: ./graphics/boundingbox.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< +$(OBJS)\test_gui_clipper.o: ./graphics/clipper.cpp + $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< + $(OBJS)\test_gui_clippingbox.o: ./graphics/clippingbox.cpp $(CXX) -c -o $@ $(TEST_GUI_CXXFLAGS) $(CPPDEPS) $< diff --git a/tests/makefile.vc b/tests/makefile.vc index 711507c7d6..c3bf13ab72 100644 --- a/tests/makefile.vc +++ b/tests/makefile.vc @@ -174,6 +174,7 @@ TEST_GUI_OBJECTS = \ $(OBJS)\test_gui_measuring.obj \ $(OBJS)\test_gui_affinematrix.obj \ $(OBJS)\test_gui_boundingbox.obj \ + $(OBJS)\test_gui_clipper.obj \ $(OBJS)\test_gui_clippingbox.obj \ $(OBJS)\test_gui_coords.obj \ $(OBJS)\test_gui_graphbitmap.obj \ @@ -1176,6 +1177,9 @@ $(OBJS)\test_gui_affinematrix.obj: .\graphics\affinematrix.cpp $(OBJS)\test_gui_boundingbox.obj: .\graphics\boundingbox.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\graphics\boundingbox.cpp +$(OBJS)\test_gui_clipper.obj: .\graphics\clipper.cpp + $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\graphics\clipper.cpp + $(OBJS)\test_gui_clippingbox.obj: .\graphics\clippingbox.cpp $(CXX) /c /nologo /TP /Fo$@ $(TEST_GUI_CXXFLAGS) .\graphics\clippingbox.cpp diff --git a/tests/test.bkl b/tests/test.bkl index 850d890f0a..b6a962aa60 100644 --- a/tests/test.bkl +++ b/tests/test.bkl @@ -182,6 +182,7 @@ graphics/measuring.cpp graphics/affinematrix.cpp graphics/boundingbox.cpp + graphics/clipper.cpp graphics/clippingbox.cpp graphics/coords.cpp graphics/graphbitmap.cpp diff --git a/tests/test_gui.vcxproj b/tests/test_gui.vcxproj index 39134b6dc7..dec3d8a090 100644 --- a/tests/test_gui.vcxproj +++ b/tests/test_gui.vcxproj @@ -547,6 +547,7 @@ + diff --git a/tests/test_gui.vcxproj.filters b/tests/test_gui.vcxproj.filters index 00bf82c494..56ae8cf9ce 100644 --- a/tests/test_gui.vcxproj.filters +++ b/tests/test_gui.vcxproj.filters @@ -293,6 +293,9 @@ Source Files + + Source Files + Source Files