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

kviewshell

DjVuANT Class Reference

This class contains some trivial annotations of the page or of the document such as page border color, page alignment, initial zoom and display mode, hyperlinks and highlighted areas. More...

#include <DjVuAnno.h>

Inheritance diagram for DjVuANT:

Inheritance graph
[legend]

List of all members.


Public Types

enum  {
  MODE_UNSPEC = 0, MODE_COLOR, MODE_FORE, MODE_BACK,
  MODE_BW
}
enum  {
  ZOOM_STRETCH = -4, ZOOM_ONE2ONE = -3, ZOOM_WIDTH = -2, ZOOM_PAGE = -1,
  ZOOM_UNSPEC = 0
}
enum  alignment {
  ALIGN_UNSPEC = 0, ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT,
  ALIGN_TOP, ALIGN_BOTTOM
}

Public Member Functions

GP< DjVuANT > copy (void) const
void decode (ByteStream &bs)
void encode (ByteStream &bs)
GUTF8String encode_raw (void) const
unsigned int get_memory_usage () const
GUTF8String get_paramtags (void) const
GUTF8String get_xmlmap (const GUTF8String &name, const int height) const
bool is_empty (void) const
void merge (ByteStream &bs)
void writeMap (ByteStream &bs, const GUTF8String &name, const int height) const
void writeParam (ByteStream &out_str) const
virtual ~DjVuANT ()

Static Public Member Functions

static GP< DjVuANT > create (void)
static unsigned long int cvt_color (const char *color, unsigned long int def)

Public Attributes

unsigned long int bg_color
alignment hor_align
GPList< GMapArea > map_areas
GMap< GUTF8String, GUTF8String > metadata
int mode
alignment ver_align
int zoom

Protected Member Functions

 DjVuANT (void)

Detailed Description

This class contains some trivial annotations of the page or of the document such as page border color, page alignment, initial zoom and display mode, hyperlinks and highlighted areas.

All this information is put inside a textual chunk ANTa# in pseudo-lisp format. Decoding and encoding are normally done by {DjVuANT::decode}() and {DjVuANT::encode}() functions.

Definition at line 113 of file DjVuAnno.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
MODE_UNSPEC 
MODE_COLOR 
MODE_FORE 
MODE_BACK 
MODE_BW 

Definition at line 120 of file DjVuAnno.h.

anonymous enum

Enumerator:
ZOOM_STRETCH 
ZOOM_ONE2ONE 
ZOOM_WIDTH 
ZOOM_PAGE 
ZOOM_UNSPEC 

Definition at line 121 of file DjVuAnno.h.

enum DjVuANT::alignment

Enumerator:
ALIGN_UNSPEC 
ALIGN_LEFT 
ALIGN_CENTER 
ALIGN_RIGHT 
ALIGN_TOP 
ALIGN_BOTTOM 

Definition at line 123 of file DjVuAnno.h.


Constructor & Destructor Documentation

DjVuANT::DjVuANT ( void   )  [protected]

Constructs an empty annotation object.

Definition at line 674 of file DjVuAnno.cpp.

DjVuANT::~DjVuANT (  )  [virtual]

Definition at line 682 of file DjVuAnno.cpp.


Member Function Documentation

GP< DjVuANT > DjVuANT::copy ( void   )  const

Returns a copy of this object.

Definition at line 1375 of file DjVuAnno.cpp.

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

Creates an empty annotation object.

Definition at line 127 of file DjVuAnno.h.

unsigned long int DjVuANT::cvt_color ( const char *  color,
unsigned long int  def 
) [static]

Converts color from string in #RRGGBB notation to an unsigned integer.

Definition at line 824 of file DjVuAnno.cpp.

void DjVuANT::decode ( ByteStream &  bs  ) 

Decodes contents of annotation chunk ANTa#.

The chunk data is read from ByteStream bs# until reaching an end-of-stream marker. This function is normally called after a call to {IFFByteStream::get_chunk}().

Definition at line 772 of file DjVuAnno.cpp.

void DjVuANT::encode ( ByteStream &  bs  ) 

Encodes the ANTa# chunk.

The annotation data is simply written into ByteStream bs# with no IFF header. This function is normally called after a call to {IFFByteStream::put_chunk}().

Definition at line 788 of file DjVuAnno.cpp.

GUTF8String DjVuANT::encode_raw ( void   )  const

Encodes data back into raw annotation data.

Definition at line 1280 of file DjVuAnno.cpp.

unsigned int DjVuANT::get_memory_usage (  )  const

Returns the number of bytes needed by this data structure.

It's used by caching routines to estimate the size of a {DjVuImage}.

Definition at line 795 of file DjVuAnno.cpp.

GUTF8String DjVuANT::get_paramtags ( void   )  const

Obtain the XML flags for the default specifications.

Definition at line 687 of file DjVuAnno.cpp.

GUTF8String DjVuANT::get_xmlmap ( const GUTF8String &  name,
const int  height 
) const

Obtain the <MAP></MAP> tag for these annotations.

Definition at line 723 of file DjVuAnno.cpp.

bool DjVuANT::is_empty ( void   )  const

Returns TRUE if no features are specified or specified features are not different from default ones.

Definition at line 1365 of file DjVuAnno.cpp.

void DjVuANT::merge ( ByteStream &  bs  ) 

Same as {decode}() but adds the new data to what has been decoded before.

Definition at line 779 of file DjVuAnno.cpp.

void DjVuANT::writeMap ( ByteStream &  bs,
const GUTF8String &  name,
const int  height 
) const

Write the <MAP></MAP> tag for these annotations.

Definition at line 734 of file DjVuAnno.cpp.

void DjVuANT::writeParam ( ByteStream &  out_str  )  const

Write the XML flags for the default specifications.

Definition at line 717 of file DjVuAnno.cpp.


Member Data Documentation

unsigned long int DjVuANT::bg_color

Background color.

Is in #0x00RRBBGG# format. #0xffffffff# if there were no background color records in the annotation chunk.

Definition at line 132 of file DjVuAnno.h.

alignment DjVuANT::hor_align

Horizontal page alignment.

Possible values are ALIGN_LEFT#, ALIGN_CENTER#, ALIGN_RIGHT# and ALIGN_UNSPEC#.

Definition at line 157 of file DjVuAnno.h.

GPList<GMapArea> DjVuANT::map_areas

List of defined map areas.

They may be just areas of highlighting or hyperlink. Please refer to {GMapArea}, {GMapRect}, {GMapPoly} and {GMapOval} for details.

Definition at line 164 of file DjVuAnno.h.

GMap<GUTF8String,GUTF8String> DjVuANT::metadata

Metainformations like title, author .

..

Definition at line 167 of file DjVuAnno.h.

int DjVuANT::mode

Initial mode.

Possible values are: {description} [MODE_COLOR] color mode. [MODE_FORE] foreground mode. [MODE_BACK] background mode. [MODE_BW] black and white mode. [MODE_UNSPEC] Annotation does not specify a display mode. [Any positive number] Zoom in %. Please note that all constants above are either negative or ZERO. Thus it's possible to distinguish numerical zoom from those special cases. {description}

Definition at line 154 of file DjVuAnno.h.

alignment DjVuANT::ver_align

Vertical page alignment.

Possible values are ALIGN_TOP#, ALIGN_CENTER#, ALIGN_BOTTOM# and ALIGN_UNSPEC#.

Definition at line 160 of file DjVuAnno.h.

int DjVuANT::zoom

Initial zoom.

Possible values are: {description} [ZOOM_STRETCH] the image is stretched to the viewport. [ZOOM_ONE2ONE] the image is displayed pixel-to-pixel. [ZOOM_WIDTH] "Fit width" mode. [ZOOM_PAGE] "Fit page" mode. [ZOOM_UNSPEC] Annotation does not specify a zoom factor. {description}

Definition at line 141 of file DjVuAnno.h.


The documentation for this class was generated from the following files:
  • DjVuAnno.h
  • DjVuAnno.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