Logo Search packages:      
Sourcecode: djvulibre version File versions

GMapOval Class Reference

#include <GMapAreas.h>

Inheritance diagram for GMapOval:

GMapArea GPEnabled

List of all members.


Detailed Description

Implements elliptical map areas. The only supported types of border are NO_BORDER#, XOR_BORDER# and SOLID_BORDER#. Its contents can not be highlighted either.

Definition at line 435 of file GMapAreas.h.


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
#

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
int get_a (void) const
 Returns (xmax-xmin)/2.
int get_b (void) const
 Returns (ymax-ymin)/2.
int get_rmax (void) const
 Returns the greater of {get_a}() and {get_b}().
int get_rmin (void) const
 Returns the lesser of {get_a}() and {get_b}().
virtual char const *const get_shape_name (void) const
 Returns #"oval"#.

Public Types

enum  BorderType {
  NO_BORDER = 0, XOR_BORDER = 1, SOLID_BORDER = 2, SHADOW_IN_BORDER = 3,
  SHADOW_OUT_BORDER = 4, SHADOW_EIN_BORDER = 5, SHADOW_EOUT_BORDER = 6
}
enum  MapAreaType { UNKNOWN, RECT, OVAL, POLY }
enum  Special_Hilite_Color { NO_HILITE = 0xFFFFFFFF, XOR_HILITE = 0xFF000000 }

Public Member Functions

char const *const check_object (void)
GRect get_bound_rect (void) const
 Returns the hyperlink bounding rectangle.
virtual void get_coords (GList< int > &CoordList) const
virtual GP< GMapAreaget_copy (void) const
 Returns a copy of the oval.
int get_count (void) const
virtual MapAreaType const get_shape_type (void) const
 Returns MapOval.
int get_xmax (void) const
int get_xmin (void) const
 Returns xmin of the bounding rectangle.
virtual GUTF8String get_xmltag (const int height) const
int get_ymax (void) const
int get_ymin (void) const
 Returns ymin of the bounding rectangle.
bool is_point_inside (int x, int y) const
 Returns 1 if the given point is inside the hyperlink area.
virtual void map (GRectMapper &mapper)
 Virtual function maps oval from one area to another using mapper.
void move (int dx, int dy)
GUTF8String print (void)
void resize (int new_width, int new_height)
void transform (const GRect &grect)
virtual void unmap (GRectMapper &mapper)
 Virtual function unmaps oval from one area to another using mapper.
virtual ~GMapOval ()
 Virtual destructor.

Static Public Member Functions

static GP< GMapOvalcreate (const GRect &rect)
 Create from the specified GRect.
static GP< GMapOvalcreate (void)
 Default creator.

Public Attributes

bool border_always_visible
unsigned long int border_color
 Border color (when relevant) in #0x00RRGGBB# format.
BorderType border_type
int border_width
 Border width in pixels.
GUTF8String comment
unsigned long int hilite_color
GUTF8String target
GUTF8String url

Static Public Attributes

static const char BORDER_AVIS_TAG [] = "border_avis"
static const char HILITE_TAG [] = "hilite"
static const char MAPAREA_TAG [] = "maparea"
static const char NO_BORDER_TAG [] = "none"
static const char OVAL_TAG [] = "oval"
static const char POLY_TAG [] = "poly"
static const char RECT_TAG [] = "rect"
static const char SHADOW_EIN_BORDER_TAG [] = "shadow_ein"
static const char SHADOW_EOUT_BORDER_TAG [] = "shadow_eout"
static const char SHADOW_IN_BORDER_TAG [] = "shadow_in"
static const char SHADOW_OUT_BORDER_TAG [] = "shadow_out"
static const char SOLID_BORDER_TAG [] = "border"
static const char TARGET_SELF [] = "_self"
static const char URL_TAG [] = "url"
static const char XOR_BORDER_TAG [] = "xor"

Protected Member Functions

void clear_bounds (void)
virtual char const *const gma_check_object (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)
 GMapOval (const GRect &rect)

Protected Attributes

volatile int count
 The reference counter.

Private Member Functions

void initialize (void)

Private Attributes

int a
int b
int rmax
int rmin
int xf1
int xf2
int xmax
int xmin
int yf1
int yf2
int ymax
int ymin

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index