Test draw text with vpFont.
Test draw text with vpFont.
#include <visp3/core/vpConfig.h>
#if defined(VISP_HAVE_CATCH2)
#include "common.hpp"
#include <catch_amalgamated.hpp>
#include <visp3/core/vpFont.h>
#ifdef ENABLE_VISP_NAMESPACE
#endif
TEST_CASE("Segmentation fault reproducer", "[draw_text_font]")
{
std::ostringstream oss;
oss << "Computation time: " << std::fixed << std::setprecision(2) << 10.5168 << " ms/";
SECTION("GENERIC_MONOSPACE")
{
SECTION("unsigned char")
{
REQUIRE_NOTHROW([&]() {
}());
}
SECTION("vpRGBa")
{
REQUIRE_NOTHROW([&]() {
}());
}
}
SECTION("TRUETYPE_FILE")
{
SECTION("unsigned char")
{
REQUIRE_NOTHROW([&]() {
}());
}
SECTION("vpRGBa")
{
REQUIRE_NOTHROW([&]() {
}());
}
}
}
TEST_CASE("Sanity check", "[draw_text_font]")
{
const std::string text = "ViSP standing for Visual Servoing Platform is a modular cross platform library. "
"0123456789 ,;:!?./§ &é'(-è_çà)=";
SECTION("GENERIC_MONOSPACE")
{
SECTION("unsigned char")
{
REQUIRE_NOTHROW([&]() {
}());
}
SECTION("vpRGBa")
{
REQUIRE_NOTHROW([&]() {
}());
}
}
SECTION("TRUETYPE_FILE")
{
SECTION("unsigned char")
{
REQUIRE_NOTHROW([&]() {
}());
}
SECTION("vpRGBa")
{
REQUIRE_NOTHROW([&]() {
}());
}
}
}
int main(int argc, char *argv[])
{
Catch::Session session;
session.applyCommandLine(argc, argv);
int numFailed = session.run();
return numFailed;
}
#else
int main() { return EXIT_SUCCESS; }
#endif
Font drawing functions for image.
bool drawText(vpImage< unsigned char > &I, const std::string &text, const vpImagePoint &position, unsigned char color) const
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition of the vpImage class member functions.