116 unsigned int width = 1);
129 bool inferior =
true,
unsigned int width = 1);
199 unsigned int width = 1);
227 int x,
int y,
int radius,
229 unsigned int width = 1);
247 const double mean_x,
const double mean_y,
double confIntervalStds = 2,
249 unsigned int width = 1,
int nEllipsePoints = 20);
258 template <
class FEATURELIST>
261 const int cross_size = 5)
263 for (
size_t i = 0; i < list.size(); ++i)
265 const int x =
round(list.getFeatureX(i));
266 const int y =
round(list.getFeatureY(i));
279 template <
class FEATURELIST>
282 const bool showIDs =
false,
const bool showResponse =
false,
283 const bool showScale =
false,
const char marker =
'+')
285 for (
size_t i = 0; i < list.size(); ++i)
287 const int x =
round(list.getFeatureX(i));
288 const int y =
round(list.getFeatureY(i));
294 "%u", static_cast<unsigned int>(list.getFeatureID(i))),
301 static_cast<unsigned int>(list.getFeatureResponse(i))),
303 if (!list.isPointFeature(i))
310 x,
y + 20,
format(
"S:%.01f", list.getScale(i)),
virtual void drawCircle(int x, int y, int radius, const mrpt::img::TColor &color=mrpt::img::TColor(255, 255, 255), unsigned int width=1)
Draws a circle of a given radius.
A compile-time fixed-size numeric matrix container.
This virtual class defines the interface of any object accepting drawing primitives on it...
TPenStyle
Definition of pen styles.
virtual void line(int x0, int y0, int x1, int y1, const mrpt::img::TColor color, unsigned int width=1, TPenStyle penStyle=psSolid)
Draws a line.
GLenum GLenum GLenum GLenum GLenum scale
void drawFeaturesSimple(const FEATURELIST &list, const TColor &color=TColor::red(), const int cross_size=5)
Draws a set of marks onto the image, given a generic container of entities having just "x" and "y" fi...
virtual void setPixel(int x, int y, size_t color)=0
Changes the value of the pixel (x,y).
void triangle(int x0, int y0, int size, const mrpt::img::TColor color, bool inferior=true, unsigned int width=1)
Draws a triangle.
std::string m_selectedFont
The selected font name.
virtual void selectTextFont(const std::string &fontName)
Select the current font used when drawing text.
virtual void filledRectangle(int x0, int y0, int x1, int y1, const mrpt::img::TColor color)
Draws a filled rectangle.
void rectangle(int x0, int y0, int x1, int y1, const mrpt::img::TColor color, unsigned int width=1)
Draws a rectangle (an empty rectangle, without filling)
GLsizei const GLchar ** string
void ellipseGaussian(const mrpt::math::CMatrixFixed< double, 2, 2 > &cov2D, const double mean_x, const double mean_y, double confIntervalStds=2, const mrpt::img::TColor &color=mrpt::img::TColor(255, 255, 255), unsigned int width=1, int nEllipsePoints=20)
Draws an ellipse representing a given confidence interval of a 2D Gaussian distribution.
virtual ~CCanvas()=default
void drawMark(int x0, int y0, const mrpt::img::TColor color, char type, int size=5, unsigned int width=1)
Draw a mark.
virtual size_t getWidth() const =0
Returns the width of the image in pixels.
static constexpr TColor red()
Predefined colors.
void drawFeatures(const FEATURELIST &list, const TColor &color=TColor::red(), const bool showIDs=false, const bool showResponse=false, const bool showScale=false, const char marker='+')
Draws a set of marks (or scaled circles for features with scale) onto the image, given a generic cont...
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
virtual void textOut(int x0, int y0, const std::string &str, const mrpt::img::TColor color)
Renders 2D text using bitmap fonts.
virtual size_t getHeight() const =0
Returns the height of the image in pixels.
virtual void drawImage(int x, int y, const mrpt::img::CImage &img)
Draws an image as a bitmap at a given position.
unsigned __int32 uint32_t
GLuint GLuint GLsizei GLenum type
const uint32_t * m_selectedFontBitmaps
Direct access to character bitmaps.
A class for storing images as grayscale or RGB bitmaps.
int round(const T value)
Returns the closer integer (int) to x.