kviewshell
GMapPoly Class Reference
Implements polygonal map areas. More...
#include <GMapAreas.h>
Public Member Functions | |
int | add_vertex (int x, int y) |
char const *const | check_data (void) |
void | close_poly () |
bool | does_side_cross_rect (const GRect &grect, int side) |
void | get_coords (GList< int > &CoordList) const |
virtual GP< GMapArea > | get_copy (void) const |
virtual MapAreaType const | get_shape_type (void) const |
virtual GUTF8String | get_xmltag (const int height) const |
virtual void | map (GRectMapper &mapper) |
void | move_vertex (int i, int x, int y) |
void | optimize_data (void) |
virtual void | unmap (GRectMapper &mapper) |
virtual | ~GMapPoly () |
GMapAreas.h | |
Files #"GMapAreas.h"# and #"GMapAreas.cpp"# implement base objects used by the plugin to display and manage hyperlinks and highlighted areas inside a {DjVuImage} page. The currently supported areas can be rectangular ({GMapRect}), elliptical ({GMapOval}) and polygonal ({GMapPoly}). Every map area besides the definition of its shape contains information about display style and optional { URL}, which it may refer to. If this { URL} is not empty then the map area will work like a hyperlink. The classes also implement some useful functions to ease geometry manipulations Definition of base map area classes
| |
int | get_points_num (void) const |
virtual char const *const | get_shape_name (void) const |
int | get_sides_num (void) const |
int | get_x (int i) const |
int | get_y (int i) const |
Static Public Member Functions | |
static GP< GMapPoly > | create (const int xx[], const int yy[], const int points, const bool open=false) |
static GP< GMapPoly > | create (void) |
Protected Member Functions | |
virtual char const *const | gma_check_object (void) const |
virtual int | gma_get_xmax (void) const |
virtual int | gma_get_xmin (void) const |
virtual int | gma_get_ymax (void) const |
virtual int | gma_get_ymin (void) const |
virtual bool | gma_is_point_inside (const int x, const int y) const |
virtual void | gma_move (int dx, int dy) |
virtual GUTF8String | gma_print (void) |
virtual void | gma_resize (int new_width, int new_height) |
virtual void | gma_transform (const GRect &grect) |
GMapPoly (const int *xx, const int *yy, int points, bool open=false) | |
GMapPoly (void) |
Detailed Description
Implements polygonal map areas.The only supported types of border are NO_BORDER#, XOR_BORDER# and SOLID_BORDER#. Its contents can not be highlighted either. It's worth mentioning here that despite its name the polygon may be open, which basically makes it a broken line. This very specific mode is used by the hyperlink editor when creating the polygonal hyperlink.
Definition at line 348 of file GMapAreas.h.
Constructor & Destructor Documentation
GMapPoly::GMapPoly | ( | void | ) | [protected] |
Definition at line 925 of file GMapAreas.cpp.
GMapPoly::GMapPoly | ( | const int * | xx, | |
const int * | yy, | |||
int | points, | |||
bool | open = false | |||
) | [protected] |
Definition at line 694 of file GMapAreas.cpp.
GMapPoly::~GMapPoly | ( | ) | [virtual] |
Member Function Documentation
int GMapPoly::add_vertex | ( | int | x, | |
int | y | |||
) |
Adds a new vertex and returns number of vertices in the polygon.
Definition at line 711 of file GMapAreas.cpp.
char const *const GMapPoly::check_data | ( | void | ) |
void GMapPoly::close_poly | ( | ) |
bool GMapPoly::does_side_cross_rect | ( | const GRect & | grect, | |
int | side | |||
) |
Returns 1 if side side# crosses the specified rectangle rect#.
Definition at line 454 of file GMapAreas.cpp.
void GMapPoly::get_coords | ( | GList< int > & | CoordList | ) | const [virtual] |
Virtual function generating a list of defining coordinates.
Reimplemented from GMapArea.
Definition at line 746 of file GMapAreas.cpp.
int GMapPoly::get_points_num | ( | void | ) | const [inline] |
char const *const GMapPoly::get_shape_name | ( | void | ) | const [inline, virtual] |
virtual MapAreaType const GMapPoly::get_shape_type | ( | void | ) | const [inline, virtual] |
int GMapPoly::get_sides_num | ( | void | ) | const [inline] |
int GMapPoly::get_x | ( | int | i | ) | const [inline] |
GUTF8String GMapPoly::get_xmltag | ( | const int | height | ) | const [virtual] |
int GMapPoly::get_y | ( | int | i | ) | const [inline] |
char const *const GMapPoly::gma_check_object | ( | void | ) | const [protected, virtual] |
int GMapPoly::gma_get_xmax | ( | void | ) | const [protected, virtual] |
int GMapPoly::gma_get_xmin | ( | void | ) | const [protected, virtual] |
int GMapPoly::gma_get_ymax | ( | void | ) | const [protected, virtual] |
int GMapPoly::gma_get_ymin | ( | void | ) | const [protected, virtual] |
bool GMapPoly::gma_is_point_inside | ( | const int | x, | |
const int | y | |||
) | const [protected, virtual] |
void GMapPoly::gma_move | ( | int | dx, | |
int | dy | |||
) | [protected, virtual] |
GUTF8String GMapPoly::gma_print | ( | void | ) | [protected, virtual] |
void GMapPoly::gma_resize | ( | int | new_width, | |
int | new_height | |||
) | [protected, virtual] |
void GMapPoly::gma_transform | ( | const GRect & | grect | ) | [protected, virtual] |
void GMapPoly::map | ( | GRectMapper & | mapper | ) | [virtual] |
Virtual function maps polygon from one area to another using mapper.
Implements GMapArea.
Definition at line 756 of file GMapAreas.cpp.
void GMapPoly::move_vertex | ( | int | i, | |
int | x, | |||
int | y | |||
) |
void GMapPoly::optimize_data | ( | void | ) |
void GMapPoly::unmap | ( | GRectMapper & | mapper | ) | [virtual] |
Virtual function unmaps polygon from one area to another using mapper.
Implements GMapArea.
Definition at line 767 of file GMapAreas.cpp.
The documentation for this class was generated from the following files: