Version: 0.6.0

#include <legend.h>

Public Member Functions

 Legend (int vertPosition, int horizPosition, AreaDraw *background=new FillAreaDraw(), int symbolTextGap=2, int margin=2)
 
void Draw (wxDC &dc, wxRect rc, DatasetArray &datasets)
 
void Draw (wxDC &dc, wxRect rc, CategoryDataset &dataset)
 
int GetVertPosition ()
 
int GetHorizPosition ()
 
void SetTextFont (wxFont font)
 
wxFont GetTextFont ()
 
wxSize GetExtent (wxDC &dc, DatasetArray &datasets)
 
wxSize GetExtent (wxDC &dc, CategoryDataset &dataset)
 

Static Public Attributes

static const wxCoord labelsSpacing = 2
 

Detailed Description

Legend. Performs legend drawing.

Constructor & Destructor Documentation

Legend::Legend ( int  vertPosition,
int  horizPosition,
AreaDraw background = new FillAreaDraw(),
int  symbolTextGap = 2,
int  margin = 2 
)

Constructs new legend.

Parameters
vertPositionvertical position, can be wxTOP, wxCENTER, wxBOTTOM
horizPositionhorizontal position, can be wxLEFT, wxCENTER, wxRIGHT
backgroundbackground for legend area
symbolTextGapdistance between symbol and text
marginlegend margin

Member Function Documentation

void Legend::Draw ( wxDC &  dc,
wxRect  rc,
DatasetArray datasets 
)

Draw legend.

Parameters
dcdevice context
rcrectangle where to draw
datasetsdatasets array

Here is the call graph for this function:

Here is the caller graph for this function:

wxSize Legend::GetExtent ( wxDC &  dc,
DatasetArray datasets 
)

Returns size of area to draw legend.

Parameters
dcdevice context
datasetesdataset array
Returns
size needed for legend area

Here is the call graph for this function:

Here is the caller graph for this function:

int Legend::GetHorizPosition ( )
inline

Returns legend horizontal position.

Returns
legend horizontal position

Here is the caller graph for this function:

wxFont Legend::GetTextFont ( )
inline

Returns font to draw legend labels.

Returns
font to draw legend labels
int Legend::GetVertPosition ( )
inline

Returns legend vertical position.

Returns
legend vertical position

Here is the caller graph for this function:

void Legend::SetTextFont ( wxFont  font)
inline

Sets font to draw legend labels.

Parameters
fontnew font to draw legend labels

Member Data Documentation

const wxCoord Legend::labelsSpacing = 2
static

Space between serie labels.


The documentation for this class was generated from the following files:
  • /home/bishop/work/projects/nextgismanager/include/freechart/wx/legend.h
  • /home/bishop/work/projects/nextgismanager/src/freechart/legend.cpp