|
KiCad PCB EDA Suite
|
#include <boost/test/unit_test.hpp>#include <wx/filename.h>#include <wx/filefn.h>#include <wx/ffile.h>#include <wx/utils.h>#include <wx/image.h>#include <zlib.h>#include <plotters/plotters_pslike.h>#include <advanced_config.h>#include <render_settings.h>#include <trigo.h>#include <math/util.h>#include <font/font.h>#include <font/stroke_font.h>#include <qa_utils/wx_utils/unit_test_utils.h>#include <qa_utils/pdf_test_utils.h>Go to the source code of this file.
Functions | |
| static wxString | getTempPdfPath (const wxString &name) |
| BOOST_AUTO_TEST_CASE (PlotMultilingualAllStylesMappings) | |
| BOOST_AUTO_TEST_CASE (PlotMultilingualText) | |
| BOOST_AUTO_TEST_CASE (PlotMultilingualTextBold) | |
| BOOST_AUTO_TEST_CASE (PlotMultilingualTextItalic) | |
| BOOST_AUTO_TEST_CASE (PlotMultilingualTextBoldItalic) | |
| BOOST_AUTO_TEST_CASE (GlyphBBoxIncludesOffsetAndStrokeWidth) | |
| BOOST_AUTO_TEST_CASE (PlotMultilingualTextWithYOffset) | |
| BOOST_AUTO_TEST_CASE (PlotOutlineFontEmbedding) | |
| static std::vector< double > | ExtractStrokeTextOriginsX (const std::string &aBuffer) |
| BOOST_AUTO_TEST_CASE (PlotStrokeTextTabStopMatchesFont) | |
| BOOST_AUTO_TEST_CASE (StrokeFontVerticalAlignmentMatchesScreen) | |
| BOOST_AUTO_TEST_CASE (StrokeFontWordSpacingMatchesGlyphAdvance) | |
| BOOST_AUTO_TEST_CASE (SetDashZeroWidthNoIllegalDashArray) | |
| BOOST_AUTO_TEST_CASE (SetDashNonZeroWidthKeepsDashArray) | |
| BOOST_AUTO_TEST_CASE | ( | GlyphBBoxIncludesOffsetAndStrokeWidth | ) |
Definition at line 255 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), ADVANCED_CFG::GetCfg(), getTempPdfPath(), LoadStrokeFontUnique(), ADVANCED_CFG::m_PDFStrokeFontXOffset, MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | PlotMultilingualAllStylesMappings | ) |
Definition at line 51 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), BuildTextAttributes(), CountOccurrences(), PDF_PLOTTER::EndPlot(), getTempPdfPath(), LoadStrokeFontUnique(), MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | PlotMultilingualText | ) |
Definition at line 105 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), getTempPdfPath(), LoadStrokeFontUnique(), MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PdfContains(), PDF_PLOTTER::PlotText(), RasterizePdfCountDark(), ReadPdfWithDecompressedStreams(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | PlotMultilingualTextBold | ) |
Definition at line 172 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), getTempPdfPath(), LoadStrokeFontUnique(), MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PdfContains(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | PlotMultilingualTextBoldItalic | ) |
Definition at line 225 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), getTempPdfPath(), LoadStrokeFontUnique(), MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PdfContains(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | PlotMultilingualTextItalic | ) |
Definition at line 200 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), getTempPdfPath(), LoadStrokeFontUnique(), MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PdfContains(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | PlotMultilingualTextWithYOffset | ) |
Definition at line 343 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), ADVANCED_CFG::GetCfg(), getTempPdfPath(), LoadStrokeFontUnique(), ADVANCED_CFG::m_PDFStrokeFontYOffset, MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | PlotOutlineFontEmbedding | ) |
Definition at line 384 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), KIFONT::FONT::GetFont(), getTempPdfPath(), KI_TEST::GetTestDataRootDir(), MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | PlotStrokeTextTabStopMatchesFont | ) |
Definition at line 556 of file test_pdf_unicode_plot.cpp.
References std::abs(), ANGLE_0, BOOST_REQUIRE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), ExtractStrokeTextOriginsX(), getTempPdfPath(), KiROUND(), LoadStrokeFontUnique(), MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), scale, PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | SetDashNonZeroWidthKeepsDashArray | ) |
Definition at line 913 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), DASH, PDF_PLOTTER::EndPlot(), PLOTTER::FinishTo(), getTempPdfPath(), PLOTTER::MoveTo(), PDF_PLOTTER::OpenFile(), ReadPdfWithDecompressedStreams(), PSLIKE_PLOTTER::SetColor(), PDF_PLOTTER::SetDash(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | SetDashZeroWidthNoIllegalDashArray | ) |
Definition at line 856 of file test_pdf_unicode_plot.cpp.
References BOOST_REQUIRE(), DASH, DASHDOT, DASHDOTDOT, DOT, PDF_PLOTTER::EndPlot(), FILLED_SHAPE, getTempPdfPath(), MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), ReadPdfWithDecompressedStreams(), PDF_PLOTTER::Rect(), PSLIKE_PLOTTER::SetColor(), PDF_PLOTTER::SetDash(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | StrokeFontVerticalAlignmentMatchesScreen | ) |
Definition at line 635 of file test_pdf_unicode_plot.cpp.
References std::abs(), BOOST_REQUIRE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), getTempPdfPath(), GR_TEXT_V_ALIGN_BOTTOM, GR_TEXT_V_ALIGN_CENTER, GR_TEXT_V_ALIGN_TOP, LoadStrokeFontUnique(), TEXT_ATTRIBUTES::m_Valign, MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
| BOOST_AUTO_TEST_CASE | ( | StrokeFontWordSpacingMatchesGlyphAdvance | ) |
Definition at line 760 of file test_pdf_unicode_plot.cpp.
References std::abs(), ANGLE_0, BOLD, BOOST_REQUIRE(), BuildTextAttributes(), PDF_PLOTTER::EndPlot(), getTempPdfPath(), GR_TEXT_H_ALIGN_LEFT, GR_TEXT_V_ALIGN_BOTTOM, LoadStrokeFontUnique(), TEXT_ATTRIBUTES::m_Halign, TEXT_ATTRIBUTES::m_Valign, MaybeRemoveFile(), PDF_PLOTTER::OpenFile(), PDF_PLOTTER::PlotText(), ReadPdfWithDecompressedStreams(), scale, PLOTTER::SetRenderSettings(), PDF_PLOTTER::SetViewport(), and PDF_PLOTTER::StartPlot().
|
static |
Definition at line 507 of file test_pdf_unicode_plot.cpp.
References end.
Referenced by BOOST_AUTO_TEST_CASE().
|
static |
Definition at line 47 of file test_pdf_unicode_plot.cpp.
References getTempPdfPath(), MakeTempPdfPath(), and name.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and getTempPdfPath().