• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kviewshell

GMapPoly Class Reference

Implements polygonal map areas. More...

#include <GMapAreas.h>

Inheritance diagram for GMapPoly:

Inheritance graph
[legend]

List of all members.


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

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
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]

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.

GUTF8String GMapPoly::get_xmltag ( const int  height  )  const [virtual]

Implements GMapArea.

Definition at line 1038 of file GMapAreas.cpp.

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

Returns y coordinate of vertex number i#.

Definition at line 524 of file GMapAreas.h.

char const *const GMapPoly::gma_check_object ( void   )  const [protected, virtual]

Implements GMapArea.

Definition at line 684 of file GMapAreas.cpp.

int GMapPoly::gma_get_xmax ( void   )  const [protected, virtual]

Implements GMapArea.

Definition at line 622 of file GMapAreas.cpp.

int GMapPoly::gma_get_xmin ( void   )  const [protected, virtual]

Implements GMapArea.

Definition at line 613 of file GMapAreas.cpp.

int GMapPoly::gma_get_ymax ( void   )  const [protected, virtual]

Implements GMapArea.

Definition at line 640 of file GMapAreas.cpp.

int GMapPoly::gma_get_ymin ( void   )  const [protected, virtual]

Implements GMapArea.

Definition at line 631 of file GMapAreas.cpp.

bool GMapPoly::gma_is_point_inside ( const int  x,
const int  y 
) const [protected, virtual]

Implements GMapArea.

Definition at line 571 of file GMapAreas.cpp.

void GMapPoly::gma_move ( int  dx,
int  dy 
) [protected, virtual]

Implements GMapArea.

Definition at line 649 of file GMapAreas.cpp.

GUTF8String GMapPoly::gma_print ( void   )  [protected, virtual]

Implements GMapArea.

Definition at line 731 of file GMapAreas.cpp.

void GMapPoly::gma_resize ( int  new_width,
int  new_height 
) [protected, virtual]

Implements GMapArea.

Definition at line 658 of file GMapAreas.cpp.

void GMapPoly::gma_transform ( const GRect &  grect  )  [protected, virtual]

Implements GMapArea.

Definition at line 671 of file GMapAreas.cpp.

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:
  • GMapAreas.h
  • GMapAreas.cpp

kviewshell

Skip menu "kviewshell"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kviewshell
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal