vnstat  2.9
About: vnStat is a console-based network traffic monitor (using the /proc filesystem).
  Fossies Dox: vnstat-2.9.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

image_support.h File Reference
#include "image.h"
Include dependency graph for image_support.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void imageinit (IMAGECONTENT *ic, const int width, const int height)
 
void colorinitcheck (const char *color, const int value, const char *cfgtext, const int *rgb)
 
void layoutinit (IMAGECONTENT *ic, const char *title, const int width, const int height)
 
void drawlegend (IMAGECONTENT *ic, const int x, const int y, const short israte)
 
void drawbar (IMAGECONTENT *ic, const int x, const int y, const int len, const uint64_t rx, const uint64_t tx, const uint64_t max, const short isestimate)
 
void drawpoles (IMAGECONTENT *ic, const int x, const int y, const int len, const uint64_t rx, const uint64_t tx, const uint64_t max)
 
void drawdonut (IMAGECONTENT *ic, const int x, const int y, const float rxp, const float txp, const int size, const int holesize)
 
void drawdonut_libgd_bug_workaround (IMAGECONTENT *ic, const int x, const int y, const float rxp, const float txp, const int size, const int holesize)
 
void drawdonut_libgd_native (IMAGECONTENT *ic, const int x, const int y, const float rxp, const float txp, const int size, const int holesize)
 
void drawpole (IMAGECONTENT *ic, const int x, const int y, const int length, const int direction, const int maincolor)
 
void drawarrowup (IMAGECONTENT *ic, const int x, const int y)
 
void drawarrowright (IMAGECONTENT *ic, const int x, const int y)
 
void hextorgb (const char *input, int *rgb)
 
void modcolor (int *rgb, const int offset, const int force)
 
char * getimagevalue (const uint64_t b, const int len, const int rate)
 
char * getimagescale (const uint64_t b, const int rate)
 
uint64_t getscale (const uint64_t input, const int rate)
 

Function Documentation

◆ colorinitcheck()

void colorinitcheck ( const char *  color,
const int  value,
const char *  cfgtext,
const int *  rgb 
)

Definition at line 84 of file image_support.c.

Referenced by imageinit().

◆ drawarrowright()

void drawarrowright ( IMAGECONTENT ic,
const int  x,
const int  y 
)

Definition at line 357 of file image_support.c.

References IMAGECONTENT::ctext, and IMAGECONTENT::im.

Referenced by drawfiveminutes(), and drawhours().

◆ drawarrowup()

void drawarrowup ( IMAGECONTENT ic,
const int  x,
const int  y 
)

Definition at line 349 of file image_support.c.

References IMAGECONTENT::ctext, and IMAGECONTENT::im.

Referenced by drawfiveminutes(), and drawhours().

◆ drawbar()

void drawbar ( IMAGECONTENT ic,
const int  x,
const int  y,
const int  len,
const uint64_t  rx,
const uint64_t  tx,
const uint64_t  max,
const short  isestimate 
)

◆ drawdonut()

void drawdonut ( IMAGECONTENT ic,
const int  x,
const int  y,
const float  rxp,
const float  txp,
const int  size,
const int  holesize 
)

Definition at line 252 of file image_support.c.

References drawdonut_libgd_bug_workaround(), and drawdonut_libgd_native().

Referenced by drawsummary_digest().

◆ drawdonut_libgd_bug_workaround()

void drawdonut_libgd_bug_workaround ( IMAGECONTENT ic,
const int  x,
const int  y,
const float  rxp,
const float  txp,
const int  size,
const int  holesize 
)

◆ drawdonut_libgd_native()

void drawdonut_libgd_native ( IMAGECONTENT ic,
const int  x,
const int  y,
const float  rxp,
const float  txp,
const int  size,
const int  holesize 
)

◆ drawlegend()

void drawlegend ( IMAGECONTENT ic,
const int  x,
const int  y,
const short  israte 
)

◆ drawpole()

void drawpole ( IMAGECONTENT ic,
const int  x,
const int  y,
const int  length,
const int  direction,
const int  maincolor 
)

Definition at line 331 of file image_support.c.

References IMAGECONTENT::im.

Referenced by drawfiveminutes().

◆ drawpoles()

void drawpoles ( IMAGECONTENT ic,
const int  x,
const int  y,
const int  len,
const uint64_t  rx,
const uint64_t  tx,
const uint64_t  max 
)

Definition at line 233 of file image_support.c.

References IMAGECONTENT::crx, IMAGECONTENT::ctx, IMAGECONTENT::im, and IMAGECONTENT::large.

Referenced by drawhours().

◆ getimagescale()

char * getimagescale ( const uint64_t  b,
const int  rate 
)

Definition at line 458 of file image_support.c.

References getrateunitprefix(), getunit(), getunitprefix(), and UNITPREFIXCOUNT.

Referenced by drawfiveminutes(), and drawhours().

◆ getimagevalue()

char * getimagevalue ( const uint64_t  b,
const int  len,
const int  rate 
)

Definition at line 432 of file image_support.c.

References getunit(), getunitdivisor(), and UNITPREFIXCOUNT.

Referenced by drawfiveminutes(), and drawhours().

◆ getscale()

uint64_t getscale ( const uint64_t  input,
const int  rate 
)

Definition at line 486 of file image_support.c.

References getunit().

Referenced by drawfiveminutes(), and drawhours().

◆ hextorgb()

void hextorgb ( const char *  input,
int *  rgb 
)

Definition at line 365 of file image_support.c.

References debug.

Referenced by imageinit().

◆ imageinit()

◆ layoutinit()

◆ modcolor()

void modcolor ( int *  rgb,
const int  offset,
const int  force 
)

Definition at line 391 of file image_support.c.

References debug.

Referenced by imageinit().