Public Types | Public Member Functions | Static Public Member Functions | List of all members
Celartem::DjVu::Shape Class Referenceabstract

#include <djv_jb2common.h>

Inheritance diagram for Celartem::DjVu::Shape:
Inheritance graph
[legend]

Public Types

enum  Type {
  Normal = 0, Matched = 1, Refined = 2, NonMark = 3,
  Comment = 4
}
 
enum  { INITIAL_NUM_OF_SHAPES = 32 }
 
typedef SimpleArray< AutoPtr
< Shape > > 
Array
 

Public Member Functions

virtual Type getType () const =0
 
virtual size_t getWidth () const =0
 
virtual size_t getHeight () const =0
 
virtual ssize_t getX () const =0
 
virtual ssize_t getY () const =0
 
virtual void setPosition (ssize_t inX, ssize_t inY)=0
 
virtual Rect getRect () const =0
 
virtual const PackedBitmapgetBitmap () const =0
 
virtual void replaceBitmap (const PackedBitmap &inBitmap)=0
 
virtual void setRefinement (const Shape *inReference)=0
 
virtual void setMatch (const Shape *inReference)=0
 
virtual void flatten ()=0
 
virtual Color getColor () const =0
 
virtual void setColor (const Color &inColor)=0
 
virtual const ShapegetReferenceShape () const =0
 
virtual u32 getFlags () const =0
 
virtual void setFlags (u32 inFlags)=0
 
- Public Member Functions inherited from Celartem::ReferableNoTS
 ReferableNoTS ()
 
void addRef () const
 
void releaseRef () const
 
size_t getReferenceCount () const
 

Static Public Member Functions

static AutoPtr< Shapecreate (const PackedBitmap &inBitmap, ssize_t inX=0, ssize_t inY=0, Type inType=Normal)
 
static AutoPtr< Shapecreate (size_t inWidth, size_t inHeight, ssize_t inRowStride, const u8 *inUnpackedImagePtr, ssize_t inX=0, ssize_t inY=0, Type inType=Normal)
 
static AutoPtr< Shapecreate (const Shape *inReference, const PackedBitmap &inBitmap, ssize_t inX=0, ssize_t inY=0)
 
static AutoPtr< Shapecreate (const Shape *inReference, size_t inWidth, size_t inHeight, ssize_t inRowStride, const u8 *inUnpackedImagePtr, ssize_t inX=0, ssize_t inY=0)
 
static AutoPtr< Shapecreate (const Shape *inReference, ssize_t inX, ssize_t inY)
 
static AutoPtr< Shapecreate (const String &inComment)
 

Detailed Description

This class defines shape structure used by JB2 decoder/encoder.

Member Typedef Documentation

Array of pointers to Shape instances.

Member Enumeration Documentation

anonymous enum
Enumerator
INITIAL_NUM_OF_SHAPES 

For internal use.

Types of shapes.

Enumerator
Normal 

Normal shapes.

Matched 

Mached shapes.

Refined 

Refined shapes.

NonMark 

Non-Mark shapes.

Comment 

Preserved Comments.

Member Function Documentation

static AutoPtr<Shape> Celartem::DjVu::Shape::create ( const PackedBitmap inBitmap,
ssize_t  inX = 0,
ssize_t  inY = 0,
Type  inType = Normal 
)
static

Normal or NonMark

static AutoPtr<Shape> Celartem::DjVu::Shape::create ( size_t  inWidth,
size_t  inHeight,
ssize_t  inRowStride,
const u8 inUnpackedImagePtr,
ssize_t  inX = 0,
ssize_t  inY = 0,
Type  inType = Normal 
)
static

Normal or NonMark

static AutoPtr<Shape> Celartem::DjVu::Shape::create ( const Shape inReference,
const PackedBitmap inBitmap,
ssize_t  inX = 0,
ssize_t  inY = 0 
)
static

Refined

static AutoPtr<Shape> Celartem::DjVu::Shape::create ( const Shape inReference,
size_t  inWidth,
size_t  inHeight,
ssize_t  inRowStride,
const u8 inUnpackedImagePtr,
ssize_t  inX = 0,
ssize_t  inY = 0 
)
static

Refined

static AutoPtr<Shape> Celartem::DjVu::Shape::create ( const Shape inReference,
ssize_t  inX,
ssize_t  inY 
)
static

Mached

static AutoPtr<Shape> Celartem::DjVu::Shape::create ( const String inComment)
static

For preserving a JB2 comment; not actually a shape.

virtual void Celartem::DjVu::Shape::flatten ( )
pure virtual

Remove refinement/match information from the shape.

virtual const PackedBitmap& Celartem::DjVu::Shape::getBitmap ( ) const
pure virtual

Get the bitmap of this shape.

Returns
Reference to a PackedBitmap instance.
virtual Color Celartem::DjVu::Shape::getColor ( ) const
pure virtual

Get the color of this shape.

Returns
The color of this shape.
virtual u32 Celartem::DjVu::Shape::getFlags ( ) const
pure virtual

Get the flags associated to the shape.

Returns
The flags associated to the shape.
See Also
ShapeFlags
virtual size_t Celartem::DjVu::Shape::getHeight ( ) const
pure virtual

Get the height of this shape in pixels.

Returns
The height of this shape in pixels.
virtual Rect Celartem::DjVu::Shape::getRect ( ) const
pure virtual

Get the rectangle of this shape.

Returns
The rectangle of this shape.
virtual const Shape* Celartem::DjVu::Shape::getReferenceShape ( ) const
pure virtual

Get the reference shape if available.

Returns
Pointer to the reference shape if available; otherwise NULL.
virtual Type Celartem::DjVu::Shape::getType ( ) const
pure virtual

Get the type of this shape.

Returns
The type of this shape.
virtual size_t Celartem::DjVu::Shape::getWidth ( ) const
pure virtual

Get the width of this shape in pixels.

Returns
The width of this shape in pixels.
virtual ssize_t Celartem::DjVu::Shape::getX ( ) const
pure virtual

Get X-coordination of this shape.

Returns
X-coordination of this shape.
virtual ssize_t Celartem::DjVu::Shape::getY ( ) const
pure virtual

Get Y-coordination of this shape.

Returns
Y-coordination of this shape.
virtual void Celartem::DjVu::Shape::replaceBitmap ( const PackedBitmap inBitmap)
pure virtual

Replace the bitmap of this shape.
This method only works on Normal or Refined shapes.

Parameters
inBitmapReference to a PackedBitmap instance.
virtual void Celartem::DjVu::Shape::setColor ( const Color inColor)
pure virtual

Set the color of this shape.

Parameters
inColorNew color of this shape.
virtual void Celartem::DjVu::Shape::setFlags ( u32  inFlags)
pure virtual

Set the flags to the shape.

Parameters
inFlagsThe flags.
See Also
ShapeFlags
virtual void Celartem::DjVu::Shape::setMatch ( const Shape inReference)
pure virtual

Set the match against the specified shape.

Parameters
inReferenceA reference shape which this shape will match against.
virtual void Celartem::DjVu::Shape::setPosition ( ssize_t  inX,
ssize_t  inY 
)
pure virtual

Set the position of this shape.

Parameters
inXX-coordination of this shape.
inYY-coordination of this shape.
virtual void Celartem::DjVu::Shape::setRefinement ( const Shape inReference)
pure virtual

Set the refinement against the specified shape.

Parameters
inReferenceA reference shape which this shape will refine against.

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

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:07.
Cuminas Logo