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>
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 |
Definition at line 120 of file DjVuAnno.h.
anonymous enum |
Definition at line 121 of file DjVuAnno.h.
enum DjVuANT::alignment |
Definition at line 123 of file DjVuAnno.h.
Constructor & Destructor Documentation
DjVuANT::DjVuANT | ( | void | ) | [protected] |
DjVuANT::~DjVuANT | ( | ) | [virtual] |
Definition at line 682 of file DjVuAnno.cpp.
Member Function Documentation
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 |
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 |
GUTF8String DjVuANT::get_xmlmap | ( | const GUTF8String & | name, | |
const int | height | |||
) | const |
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 |
void DjVuANT::writeParam | ( | ByteStream & | out_str | ) | const |
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.
Horizontal page alignment.
Possible values are ALIGN_LEFT#, ALIGN_CENTER#, ALIGN_RIGHT# and ALIGN_UNSPEC#.
Definition at line 157 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.
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: