#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 inOverrideByNoneValues=false)=0 |
virtual AutoPtr< Annotation > | duplicate (bool inDupMapAreas) const =0 |
virtual Rotation | getRotation ()=0 |
virtual void | setRotation (Rotation inRotation)=0 |
Public Member Functions inherited from Celartem::Referable | |
Referable () | |
void | addRef () const |
void | releaseRef () const |
size_t | getReferenceCount () const |
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 (size_t inWidth, size_t inHeight, 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) |
Static Public Member Functions inherited from Celartem::Referable | |
static void | dumpDbgAllRefCount () |
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 |
String | xmp |
SimpleArray< String > | others |
This class is used to manipulate annotation and page attributes.
This enumeration defines special zoom conditions.
|
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 |
Initializes Anotation instance with the specified parameters.
inWidth | The width in pixels. |
inHeight | The height in pixels. |
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 |
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 |
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 |
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 |
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 |
|
static |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
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.
|
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. |
|
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.
|
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. |
|
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.
|
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.
|
pure virtual |
Get the current rotation angle.
|
pure virtual |
Initializes Annotation instance with the specified values.
|
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.
|
pure virtual |
Merges the specified Annotation into this instance.
inAnno | Annotation to merge. Please note that page attributes of this instance are completely overwritten by the ones of inAnno. |
inOverrideByNoneValues | Whether the values on this instance should be replaced by values like none/empty/nothing. |
|
pure virtual |
Color Celartem::DjVu::Annotation::bgColor |
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.
HorzAlign Celartem::DjVu::Annotation::horzAlign |
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.
SimpleArray< AutoPtr<MapArea> > Celartem::DjVu::Annotation::mapAreas |
The mapareas which annotate a page.
It cannot contain any MapArea instances if it is shared annotation.
SimpleArray<String> Celartem::DjVu::Annotation::others |
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.
AutoPtr<PrintHeader> Celartem::DjVu::Annotation::printFooter |
Print footer.
AutoPtr<PrintHeader> Celartem::DjVu::Annotation::printHeader |
Print header.
AutoPtr<PropertySet> Celartem::DjVu::Annotation::properties |
Custom properties, known as Metadata.
VertAlign Celartem::DjVu::Annotation::vertAlign |
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.
ViewerMode Celartem::DjVu::Annotation::viewerMode |
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.
String Celartem::DjVu::Annotation::xmp |
XMP metadata.
int Celartem::DjVu::Annotation::zoom |
Specifies the zoom ratio either by a value within [1 999] or one of SpecialZoom enumeration values.