/*!\file grepday.c \brief Produce the graphics of the reports. */ /*! \def SARGgdImageStringFT Link to the proper function to draw a text on the GD image depending on the version of libgd. */ /*! \var static char *font1; The name of the TTF font file to use to draw the text on the GD image. */ /*! \fn char * I18NgdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist, double ptsize, double angle, int x, int y, char *string) Draw a text on the GD image after converting the current character set defined by ::CharSet into UTF-8 as requested by libgd. \param im The GD image to draw the text on. \param brect A variable to store the bounding rectangle of the text. \param fg The color to render the text. \param fontlist The name of the font to use to render the text. \param ptsize A scale factor to scale the text. \param angle The angle to rotate the text counter-clockwise in radian. \param x The X position of the text on the image. \param y The Y position of the text on the image. \param string The string to write. \return The return code of \c gdImageStringFTEx. It is NULL on success or an error string on failure. \note See the official documentation of gdImageStringFT at http://www.libgd.org/Font#char_.2AgdImageStringFT.28gdImagePtr_im.2C_int_.2Abrect.2C_int_fg.2C_char_.2Afontname.2C_double_ptsize.2C_double_angle.2C_int_x.2C_int_y.2C_char_.2Astring.29_.28FUNCTION.29 */ /*! \fn static void bar(int x1,long long int n) Draw one bar of the graph. \param x1 The X position of the bar. \param n The height of the bar. */ /*! \fn void greport_day(const char *user) Draw the graphic of the report for the user. \param user The name of the user for which to draw the graphic. */ /*! \fn void greport_cleanup(void) Free the memory allocated internally by libgd. It is not necessary to free up that memory as it is reclaimed by the kernel when sarg terminates but it clutters the valgrind reports. If this function is called before sarg terminates, the memory leaks reported by valgrind are to be addressed. */