#include <djv_annotation.h>

Public Types | |
| enum | HorzAlign { haNone = 0, haLeft = 1, haCenter = 2, haRight = 3 } |
| enum | VertAlign { vaNone = 0, vaTop = 1, vaCenter = 2, vaBottom = 3 } |
| enum | SpecialZoom { szNone = 0, szStretch = -4, szOne2One = -3, szFitToWidth = -2, szFitToPage = -1 } |
| enum | ViewerMode { vmNone = 0, vmNormal = 1, vmBlackAndWhite = 2, vmForeground = 3, vmBackground = 4 } |
Public Member Functions | |
| virtual void | init (HorzAlign inHorzAlign=haNone, VertAlign inVertAlign=vaNone, Color inBgColor=Color::InvalidColor, int inZoom=szNone, ViewerMode inViewerMode=vmNone)=0 |
| virtual bool | isDefaultState () const =0 |
| virtual void | decode (Stream *inStream, const PageInfo &inPageInfo)=0 |
| virtual void | decode (const Chunk *inChunk, const PageInfo &inPageInfo)=0 |
| virtual void | decode (const String &inAnnoText, const PageInfo &inPageInfo)=0 |
| virtual void | decode (const UChar1 *inAnnoText, size_t inAnnoSize, const PageInfo &inPageInfo)=0 |
| virtual void | decode (Stream *inStream)=0 |
| virtual void | decode (const Chunk *inChunk)=0 |
| virtual void | decode (const String &inAnnoText)=0 |
| virtual void | decode (const UChar1 *inAnnoText, size_t inAnnoSize)=0 |
| virtual String | encode (const PageInfo &inPageInfo) const =0 |
| virtual void | encode (Stream *inStream, const PageInfo &inPageInfo) const =0 |
| virtual AutoPtr< Chunk > | encodeANTzChunk (const PageInfo &inPageInfo) const =0 |
| virtual AutoPtr< Chunk > | encodeANTaChunk (const PageInfo &inPageInfo) const =0 |
| virtual String | encode () const =0 |
| virtual void | encode (Stream *inStream) const =0 |
| virtual AutoPtr< Chunk > | encodeANTzChunk () const =0 |
| virtual AutoPtr< Chunk > | encodeANTaChunk () const =0 |
| virtual void | merge (const Annotation &inAnno, bool inOverridePageAttributes)=0 |
| virtual Rotation | getRotation ()=0 |
| virtual void | setRotation (Rotation inRotation)=0 |
Static Public Member Functions | |
| static AutoPtr< Annotation > | create (HorzAlign inHorzAlign=haNone, VertAlign inVertAlign=vaNone, Color inBgColor=Color::InvalidColor, int inZoom=szNone, ViewerMode inViewerMode=vmNone) |
| static AutoPtr< Annotation > | create (Stream *inStream, const PageInfo &inPageInfo) |
| static AutoPtr< Annotation > | create (const Chunk *inChunk, const PageInfo &inPageInfo) |
| static AutoPtr< Annotation > | create (const String &inAnnoText, const PageInfo &inPageInfo) |
| static AutoPtr< Annotation > | create (Stream *inStream) |
| static AutoPtr< Annotation > | create (const Chunk *inChunk) |
| static AutoPtr< Annotation > | create (const String &inAnnoText) |
Public Attributes | |
| HorzAlign | horzAlign |
| VertAlign | vertAlign |
| Color | bgColor |
| int | zoom |
| ViewerMode | viewerMode |
| SimpleArray< AutoPtr< MapArea > > | mapAreas |
| AutoPtr< PropertySet > | properties |
| AutoPtr< PrintHeader > | printHeader |
| AutoPtr< PrintHeader > | printFooter |
| SimpleArray< String > | others |
Definition at line 123 of file djv_annotation.h.
This enumeration defines the horizontal alignment of the pages.
| haNone | No specification. |
| haLeft | Align to Left. |
| haCenter | Align to Center. |
| haRight | Align to Right. |
Definition at line 129 of file djv_annotation.h.
This enumeration defines the vertical alignment of the pages.
| vaNone | No specification. |
| vaTop | Align to Top. |
| vaCenter | Align to Center. |
| vaBottom | Align to Bottom. |
Definition at line 140 of file djv_annotation.h.
This enumeration defines special zoom conditions.
Definition at line 151 of file djv_annotation.h.
This enumeration defines the viewer mode.
Definition at line 163 of file djv_annotation.h.
| static AutoPtr<Annotation> Celartem::DjVu::Annotation::create | ( | HorzAlign | inHorzAlign = haNone, |
|
| VertAlign | inVertAlign = vaNone, |
|||
| Color | inBgColor = Color::InvalidColor, |
|||
| int | inZoom = szNone, |
|||
| ViewerMode | inViewerMode = vmNone | |||
| ) | [static] |
Initializes Anotation instance with the specified parameters.
| inHorzAlign | The horizontal alignment of the page. See horzAlign. | |
| inVertAlign | The vertical alignment of the page. See vertAlign. | |
| inBgColor | The color of the background. See bgColor. | |
| inZoom | The zoom ratio of the page. See zoom. | |
| inViewerMode | The viewer mode. See viewerMode. |
| static AutoPtr<Annotation> Celartem::DjVu::Annotation::create | ( | Stream * | inStream, | |
| const PageInfo & | inPageInfo | |||
| ) | [static] |
Initializes Anotation instance by loading ANTa data from the specified stream.
If decoding ANTz data in a stream, you should use InflateStream to convert ANTz into ANTa.
This constructor is for advanced purpose and you had better use Annotation(const Chunk*).
| inStream | Pointer to a Stream which contains ANTa data. | |
| inPageInfo | The dimensions and rotation status of the page is used during decoding ANTa chunk. |
| static AutoPtr<Annotation> Celartem::DjVu::Annotation::create | ( | const Chunk * | inChunk, | |
| const PageInfo & | inPageInfo | |||
| ) | [static] |
Initializes Anotation instance by loading ANTa or ANTz data from the specified chunk.
| inChunk | Pointer to a Chunk which contains ANTa or ANTz data. | |
| inPageInfo | The dimensions and rotation status of the page is used during decoding ANT* chunk. |
| static AutoPtr<Annotation> Celartem::DjVu::Annotation::create | ( | const String & | inAnnoText, | |
| const PageInfo & | inPageInfo | |||
| ) | [static] |
Initializes Anotation instance by loading ANTa style string.
| inAnnoText | String which contains ANTa data. | |
| inPageInfo | The dimensions and rotation status of the page is used during decoding ANTa chunk. |
| static AutoPtr<Annotation> Celartem::DjVu::Annotation::create | ( | Stream * | inStream | ) | [static] |
Initializes Anotation instance by loading ANTa data from the specified stream.
If decoding ANTz data in a stream, you should use InflateStream to convert ANTz into ANTa.
This constructor is for advanced purpose and you had better use Annotation(const Chunk*).
Please note that this constructor cannot deal with mapAreas; if mapAreas has any elements in it, they're simply ignored.
| inStream | Pointer to a Stream which contains ANTa data. |
| static AutoPtr<Annotation> Celartem::DjVu::Annotation::create | ( | const Chunk * | inChunk | ) | [static] |
| static AutoPtr<Annotation> Celartem::DjVu::Annotation::create | ( | const String & | inAnnoText | ) | [static] |
| virtual void Celartem::DjVu::Annotation::init | ( | HorzAlign | inHorzAlign = haNone, |
|
| VertAlign | inVertAlign = vaNone, |
|||
| Color | inBgColor = Color::InvalidColor, |
|||
| int | inZoom = szNone, |
|||
| ViewerMode | inViewerMode = vmNone | |||
| ) | [pure virtual] |
Initializes Annotation instance with the specified values.
| virtual bool Celartem::DjVu::Annotation::isDefaultState | ( | ) | const [pure virtual] |
Determines whether the annotation attributes are modified from the default (the parameters initialized by the constructors or init method) or not.
true if the annotation attributes are not changed from the default state. | virtual void Celartem::DjVu::Annotation::decode | ( | Stream * | inStream, | |
| const PageInfo & | inPageInfo | |||
| ) | [pure virtual] |
Initializes Anotation instance by loading ANTa data from the specified stream.
If decoding ANTz data in a stream, you should use InflateStream to convert ANTz into ANTa.
This constructor is for advanced purpose and you had better use Annotation(const Chunk*).
| inStream | Pointer to a Stream which contains ANTa data. | |
| inPageInfo | The dimensions and rotation status of the page is used during decoding ANTa chunk. |
| virtual void Celartem::DjVu::Annotation::decode | ( | const Chunk * | inChunk, | |
| const PageInfo & | inPageInfo | |||
| ) | [pure virtual] |
Initializes Anotation instance by loading ANTa or ANTz data from the specified chunk.
| inStream | Pointer to a Stream which contains ANTa data. | |
| inPageInfo | The dimensions and rotation status of the page is used during decoding ANT* chunk. |
| virtual void Celartem::DjVu::Annotation::decode | ( | const String & | inAnnoText, | |
| const PageInfo & | inPageInfo | |||
| ) | [pure virtual] |
Initializes Anotation instance by loading ANTa style string.
| inAnnoText | String which contains ANTa data. | |
| inPageInfo | The dimensions and rotation status of the page is used during decoding ANTa chunk. |
| virtual void Celartem::DjVu::Annotation::decode | ( | const UChar1 * | inAnnoText, | |
| size_t | inAnnoSize, | |||
| const PageInfo & | inPageInfo | |||
| ) | [pure virtual] |
Initializes Anotation instance by loading ANTa style string.
| inAnnoText | Pointer to a buffer which contains ANTa data. | |
| inAnnoSize | The size of the data. | |
| inPageInfo | The dimensions and rotation status of the page is used during decoding ANTa chunk. |
| virtual void Celartem::DjVu::Annotation::decode | ( | Stream * | inStream | ) | [pure virtual] |
Initializes Anotation instance by loading ANTa data from the specified stream.
If decoding ANTz data in a stream, you should use InflateStream to convert ANTz into ANTa.
This constructor is for advanced purpose and you had better use Annotation(const Chunk*).
Please note that this function cannot deal with mapAreas; if mapAreas has any elements in it, they're simply ignored.
| inStream | Pointer to a Stream which contains ANTa data. |
| virtual void Celartem::DjVu::Annotation::decode | ( | const Chunk * | inChunk | ) | [pure virtual] |
| virtual void Celartem::DjVu::Annotation::decode | ( | const String & | inAnnoText | ) | [pure virtual] |
| virtual void Celartem::DjVu::Annotation::decode | ( | const UChar1 * | inAnnoText, | |
| size_t | inAnnoSize | |||
| ) | [pure virtual] |
| virtual String Celartem::DjVu::Annotation::encode | ( | const PageInfo & | inPageInfo | ) | const [pure virtual] |
Encodes the instance to the DjVu's ANTa block.
This method is for advanced purpose and for normal purpose, you had better use encodeANTzChunk or encodeANTaChunk. To encode ANTz chunk, you should compress the returned data using DeflateStream.
| inPageInfo | The dimensions and rotation status of the page is used during encoding ANTa chunk. |
ANTa data. | virtual void Celartem::DjVu::Annotation::encode | ( | Stream * | inStream, | |
| const PageInfo & | inPageInfo | |||
| ) | const [pure virtual] |
Encodes the instance to the DjVu's ANTa block.
This method is for advanced purpose and for normal purpose, you had better use encodeANTzChunk or encodeANTaChunk. To encode ANTz chunk, you should compress the returned data using DeflateStream.
| inStream | The stream to write on. | |
| inPageInfo | The dimensions and rotation status of the page is used during encoding ANTa chunk. |
| virtual AutoPtr<Chunk> Celartem::DjVu::Annotation::encodeANTzChunk | ( | const PageInfo & | inPageInfo | ) | const [pure virtual] |
Encodes the instance to the DjVu's ANTz chunk.
| inPageInfo | The dimensions and rotation status of the page is used during encoding ANTz chunk. |
ANTz Chunk. | virtual AutoPtr<Chunk> Celartem::DjVu::Annotation::encodeANTaChunk | ( | const PageInfo & | inPageInfo | ) | const [pure virtual] |
Encodes the instance to the DjVu's ANTa chunk.
| inPageInfo | The dimensions and rotation status of the page is used during encoding ANTa chunk. |
ANTa Chunk. | virtual String Celartem::DjVu::Annotation::encode | ( | ) | const [pure virtual] |
Encodes the instance to the DjVu's ANTa block.
This method is for advanced purpose and for normal purpose, you had better use encodeANTzChunk or encodeANTaChunk. To encode ANTz chunk, you should compress the returned data using DeflateStream.
Please note that this function cannot deal with mapAreas; if mapAreas has any elements in it, they're simply ignored.
ANTa data. | virtual void Celartem::DjVu::Annotation::encode | ( | Stream * | inStream | ) | const [pure virtual] |
Encodes the instance to the DjVu's ANTa block.
This method is for advanced purpose and for normal purpose, you had better use encodeANTzChunk or encodeANTaChunk. To encode ANTz chunk, you should compress the returned data using DeflateStream.
Please note that this function cannot deal with mapAreas; if mapAreas has any elements in it, they're simply ignored.
| inStream | The stream to write on. |
| virtual void Celartem::DjVu::Annotation::merge | ( | const Annotation & | inAnno, | |
| bool | inOverridePageAttributes | |||
| ) | [pure virtual] |
Merges the specified Annotation into this instance.
| inAnno | Annotation to merge. | |
| inOverridePageAttributes | If the configuration of this conflicts with the one of inAnno, this value controls which one is adopted. If inOverridePageAttributes is true, the values on inAnno are adopted; otherwise, the values of this instance are adopted. |
| virtual Rotation Celartem::DjVu::Annotation::getRotation | ( | ) | [pure virtual] |
Get the current rotation angle.
| virtual void Celartem::DjVu::Annotation::setRotation | ( | Rotation | inRotation | ) | [pure virtual] |
Specifies the horizontal alignment of the page(s).
If this annotation is shared by pages in the DjVu file, it may be overrode by page-by-page annotation.
Definition at line 177 of file djv_annotation.h.
Specifies the vertical alignment of the page(s).
If this annotation is shared by pages in the DjVu file, it may be overrode by page-by-page annotation.
Definition at line 184 of file djv_annotation.h.
Specifies the background color of the page(s).
If this annotation is shared by pages in the DjVu file, it may be overrode by page-by-page annotation.
If the color is invalid (i.e. Color::InvalidColor), the background color is considered to be not specified.
Definition at line 193 of file djv_annotation.h.
Specifies the zoom ratio either by a value within [1 999] or one of SpecialZoom enumeration values.
Definition at line 199 of file djv_annotation.h.
Specifies the viewer mode of the viewer.
If this annotation is shared by pages in the DjVu file, it may be overrode by page-by-page annotation.
Definition at line 206 of file djv_annotation.h.
The mapareas which annotate a page.
It cannot contain any MapArea instances if it is shared annotation.
Definition at line 213 of file djv_annotation.h.
Custom properties, known as Metadata.
Definition at line 218 of file djv_annotation.h.
Print header.
Definition at line 223 of file djv_annotation.h.
Print footer.
Definition at line 228 of file djv_annotation.h.
The annotation strings which cannot be recognized by the system. They're written back to the ANT* chunk on encode method just as a string; no syntax checks on them; you are responsible for these ones.
Definition at line 236 of file djv_annotation.h.