A fuzzy logic C++ library
|
A table cell, identified by origin point and size. See GRID. More...
#include <grid_cell.hpp>
Public Member Functions | |
GRID_CELL (const GRID &t) | |
We build a cell from a table, to share pointers on image and font. | |
void | SetSize (int w, int h) |
int | GetW () const |
int | GetH () const |
void | SetPos (int x, int y) |
GAPI_POINT | GetPos () const |
int | GetX () const |
int | GetY () const |
void | Fill (GAPI_COLOR color) |
Fills the cell with given color. | |
void | GC_DrawText (const std::string &txt, GAPI_COLOR text_color, EN_TEXT_POS_H=TEXT_POS_HC, EN_TEXT_POS_V=TEXT_POS_VC, EN_TEXT_ORIENTATION=EN_TXT_HORIZ) |
Draws txt in the cell, with given color text_color and alignement hpos and vpos . | |
void | Print (FILE *) |
Private Attributes | |
GAPI_POINT | _org |
int | _width |
int | _height |
GAPI_IMAGE * | p_im_cell |
GAPI_FONT * | p_font_cell |
A table cell, identified by origin point and size. See GRID.
slifis_plot::GRID_CELL::GRID_CELL | ( | const GRID & | t | ) |
We build a cell from a table, to share pointers on image and font.
References slifis_plot::GRID::p_font_table, and slifis_plot::GRID::pp_im_table.
void slifis_plot::GRID_CELL::SetSize | ( | int | w, |
int | h | ||
) | [inline] |
References _height, and _width.
Referenced by slifis_plot::GRID::GetCell(), and slifis_plot::GRID::GetRow().
int slifis_plot::GRID_CELL::GetW | ( | ) | const [inline] |
References _width.
Referenced by slifis_plot::PLOT_RB::GetIndexCoordinates().
int slifis_plot::GRID_CELL::GetH | ( | ) | const [inline] |
References _height.
Referenced by slifis_plot::PLOT_RB::GetIndexCoordinates().
void slifis_plot::GRID_CELL::SetPos | ( | int | x, |
int | y | ||
) | [inline] |
References _org, slifis_plot::GAPI_POINT::x, and slifis_plot::GAPI_POINT::y.
Referenced by slifis_plot::GRID::GetCell(), and slifis_plot::GRID::GetRow().
GAPI_POINT slifis_plot::GRID_CELL::GetPos | ( | ) | const [inline] |
References _org.
int slifis_plot::GRID_CELL::GetX | ( | ) | const [inline] |
References _org, and slifis_plot::GAPI_POINT::x.
Referenced by slifis_plot::PLOT_RB::GetIndexCoordinates().
int slifis_plot::GRID_CELL::GetY | ( | ) | const [inline] |
References _org, and slifis_plot::GAPI_POINT::y.
Referenced by slifis_plot::PLOT_RB::GetIndexCoordinates().
void slifis_plot::GRID_CELL::Fill | ( | GAPI_COLOR | color | ) |
Fills the cell with given color.
References __IN__, __OUT__, slifis_plot::GAPI_BuildPoint(), and slifis_plot::GAPI_DrawRectangle().
Referenced by slifis_plot::PLOT_RB_2D::Draw(), slifis_plot::PLOT_RB_2D::P_DrawFiringStrength(), and slifis_plot::PLOT_RB_TEXT::p_DrawSelection().
void slifis_plot::GRID_CELL::GC_DrawText | ( | const std::string & | txt, |
GAPI_COLOR | text_color, | ||
EN_TEXT_POS_H | hpos = TEXT_POS_HC , |
||
EN_TEXT_POS_V | vpos = TEXT_POS_VC , |
||
EN_TEXT_ORIENTATION | text_or = EN_TXT_HORIZ |
||
) |
Draws txt
in the cell, with given color text_color
and alignement hpos
and vpos
.
References __IN__, __OUT__, slifis_plot::GAPI_BuildPoint(), slifis_plot::GAPI_DrawText(), slifis_plot::GAPI_GetTextSize(), slifis_plot::TEXT_POS_HC, slifis_plot::TEXT_POS_HR, slifis_plot::TEXT_POS_VB, slifis_plot::TEXT_POS_VC, slifis_plot::GAPI_POINT::x, and slifis_plot::GAPI_POINT::y.
Referenced by slifis_plot::PLOT_RB_2D::Draw(), slifis_plot::PLOT_RB_2D::P_DrawFiringStrength(), slifis_plot::PLOT_RB_2D::P_DrawIndexes(), and slifis_plot::PLOT_RB_TEXT::P_PrintCell().
void slifis_plot::GRID_CELL::Print | ( | FILE * | f | ) |
GAPI_POINT slifis_plot::GRID_CELL::_org [private] |
int slifis_plot::GRID_CELL::_width [private] |
int slifis_plot::GRID_CELL::_height [private] |
GAPI_IMAGE* slifis_plot::GRID_CELL::p_im_cell [private] |
GAPI_FONT* slifis_plot::GRID_CELL::p_font_cell [private] |