]>
Commit | Line | Data |
---|---|---|
c274f011 FM |
1 | /*!\file grepday.c |
2 | \brief Produce the graphics of the reports. | |
3 | */ | |
4 | ||
5 | ||
c274f011 FM |
6 | |
7 | ||
8 | ||
9 | ||
c274f011 FM |
10 | |
11 | ||
12 | ||
13 | ||
14 | ||
1f482a8d FM |
15 | /*! \fn static void Sarg_gdImageStringFT (struct GraphDataStruct *gdata, int fg, char *fontlist, |
16 | double ptsize, double angle, int x, int y, const char *string,enum TextRefPos RefPos) | |
c274f011 FM |
17 | Draw a text on the GD image after converting the current character set defined by ::CharSet into UTF-8 |
18 | as requested by libgd. | |
19 | ||
1f482a8d | 20 | \param gdata The data about the graphic. |
c274f011 FM |
21 | \param fg The color to render the text. |
22 | \param fontlist The name of the font to use to render the text. | |
23 | \param ptsize A scale factor to scale the text. | |
24 | \param angle The angle to rotate the text counter-clockwise in radian. | |
25 | \param x The X position of the text on the image. | |
26 | \param y The Y position of the text on the image. | |
27 | \param string The string to write. | |
1f482a8d | 28 | \param RefPos How to lay out the text with respect of the (x,y) coordinate. |
c274f011 FM |
29 | |
30 | \return The return code of \c gdImageStringFTEx. It is NULL on success or an error | |
31 | string on failure. | |
32 | ||
33 | \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 | |
34 | */ | |
35 | ||
36 | ||
37 | ||
38 | ||
39 | ||
1f482a8d | 40 | /*! \fn static void bar(struct GraphDataStruct *gdata,int x1,long long int n) |
c274f011 FM |
41 | Draw one bar of the graph. |
42 | ||
1f482a8d | 43 | \param gdata The data of the graphic. |
c274f011 FM |
44 | \param x1 The X position of the bar. |
45 | \param n The height of the bar. | |
46 | */ | |
47 | ||
48 | ||
49 | ||
50 | ||
51 | ||
1f482a8d FM |
52 | /*! \fn void greport_prepare(void) |
53 | Prepare the drawing of the graphics by checking the availability | |
54 | of the selected font and by preparing iconv to translate the strings | |
55 | from the locale character set to UTF-8. | |
56 | */ | |
57 | ||
58 | ||
59 | ||
60 | ||
61 | ||
62 | /*! \fn void greport_day(const struct userinfostruct *uinfo) | |
63 | Draw the graphic of the report for the user. The action must have been prepared | |
64 | by greport_prepare(). | |
c274f011 | 65 | |
1f482a8d | 66 | \param uinfo The informations about the user for which to draw the graphic. |
c274f011 | 67 | */ |
95ea8ef6 FM |
68 | |
69 | ||
70 | ||
71 | ||
72 | ||
73 | /*! \fn void greport_cleanup(void) | |
1f482a8d | 74 | Free the memory allocated internally by libgd and the resources prepared by greport_prepare(). |
95ea8ef6 FM |
75 | |
76 | It is not necessary to free up that memory as it is reclaimed by the kernel when sarg terminates but | |
77 | it clutters the valgrind reports. If this function is called before sarg terminates, the memory leaks | |
78 | reported by valgrind are to be addressed. | |
79 | */ |