GMapPoly Class Reference

#include <GMapAreas.h>

Inheritance diagram for GMapPoly:

GMapArea GPEnabled List of all members.

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.


Public Member Functions

virtual ~GMapPoly ()
bool does_side_cross_rect (const GRect &grect, int side)
void move_vertex (int i, int x, int y)
int add_vertex (int x, int y)
void close_poly ()
void optimize_data (void)
char const *const check_data (void)
virtual GUTF8String get_xmltag (const int height) const
virtual MapAreaType const get_shape_type (void) const
virtual GP< GMapAreaget_copy (void) const
void get_coords (GList< int > &CoordList) const
virtual void map (GRectMapper &mapper)
virtual void unmap (GRectMapper &mapper)
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

Author:
Andrei Erofeev <eaf@geocities.com>
Version:
#
Id
GMapAreas.h,v 1.8 2003/11/07 22:08:21 leonb Exp
#


int get_points_num (void) const
int get_sides_num (void) const
int get_x (int i) const
int get_y (int i) const
virtual char const *const get_shape_name (void) const

Static Public Member Functions

static GP< GMapPolycreate (void)
static GP< GMapPolycreate (const int xx[], const int yy[], const int points, const bool open=false)

Protected Member Functions

 GMapPoly (void)
 GMapPoly (const int *xx, const int *yy, int points, bool open=false)
virtual int gma_get_xmin (void) const
virtual int gma_get_ymin (void) const
virtual int gma_get_xmax (void) const
virtual int gma_get_ymax (void) const
virtual void gma_move (int dx, int dy)
virtual void gma_resize (int new_width, int new_height)
virtual void gma_transform (const GRect &grect)
virtual bool gma_is_point_inside (const int x, const int y) const
virtual char const *const gma_check_object (void) const
virtual GUTF8String gma_print (void)

Constructor & Destructor Documentation

GMapPoly::~GMapPoly (  )  [virtual]

Virtual destructor.

Definition at line 114 of file GMapAreas.cpp.


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   ) 

Checks validity of the polygon.

Definition at line 513 of file GMapAreas.cpp.

void GMapPoly::close_poly (  ) 

Closes the polygon if it is not closed.

Definition at line 724 of file GMapAreas.cpp.

static GP<GMapPoly> GMapPoly::create ( const int  xx[],
const int  yy[],
const int  points,
const bool  open = false 
) [inline, static]

Create from specified coordinates.

Definition at line 358 of file GMapAreas.h.

static GP<GMapPoly> GMapPoly::create ( void   )  [inline, static]

Default creator.

Definition at line 355 of file GMapAreas.h.

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.

GP< GMapArea > GMapPoly::get_copy ( void   )  const [virtual]

Returns a copy of the polygon.

Implements GMapArea.

Definition at line 935 of file GMapAreas.cpp.

int GMapPoly::get_points_num ( void   )  const [inline]

Returns the number of vertices in the polygon.

Definition at line 515 of file GMapAreas.h.

char const *const GMapPoly::get_shape_name ( void   )  const [inline, virtual]

Returns #"poly"# all the time.

Implements GMapArea.

Definition at line 527 of file GMapAreas.h.

virtual MapAreaType const GMapPoly::get_shape_type ( void   )  const [inline, virtual]

Returns MapPoly.

Reimplemented from GMapArea.

Definition at line 395 of file GMapAreas.h.

int GMapPoly::get_sides_num ( void   )  const [inline]

Returns the number sides in the polygon.

Definition at line 518 of file GMapAreas.h.

int GMapPoly::get_x ( int  i  )  const [inline]

Returns x coordinate of vertex number i#.

Definition at line 521 of file GMapAreas.h.

int GMapPoly::get_y ( int  i  )  const [inline]

Returns y coordinate of vertex number i#.

Definition at line 524 of file GMapAreas.h.

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 
)

Moves vertex i# to position (x#, y#).

Definition at line 928 of file GMapAreas.cpp.

void GMapPoly::optimize_data ( void   ) 

Optimizes the polygon.

Definition at line 535 of file GMapAreas.cpp.

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:
KDE Home | KDE Accessibility Home | Description of Access Keys