Public Types | Public Member Functions | Static Public Member Functions

Celartem::DjVu::Shape Class Reference

#include <djv_jb2common.h>

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

List of all members.

Public Types

enum  Type { Normal = 0, Matched = 1, Refined = 2, NonMark = 3 }
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 size_t getX () const =0
virtual size_t getY () const =0
virtual void setPosition (size_t inX, size_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

Static Public Member Functions

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

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.


Member Function Documentation

static AutoPtr<Shape> Celartem::DjVu::Shape::create ( const PackedBitmap inBitmap,
size_t  inX = 0,
size_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,
size_t  inX = 0,
size_t  inY = 0,
Type  inType = Normal 
) [static]

Normal or NonMark

static AutoPtr<Shape> Celartem::DjVu::Shape::create ( const Shape inReference,
const PackedBitmap inBitmap,
size_t  inX = 0,
size_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,
size_t  inX = 0,
size_t  inY = 0 
) [static]

Refined

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

Mached

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 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 size_t Celartem::DjVu::Shape::getX (  )  const [pure virtual]

Get X-coordination of this shape.

Returns:
X-coordination of this shape.
virtual size_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:
inBitmap Reference to a PackedBitmap instance.
virtual void Celartem::DjVu::Shape::setColor ( const Color inColor  )  [pure virtual]

Set the color of this shape.

Parameters:
inColor New color of this shape.
virtual void Celartem::DjVu::Shape::setMatch ( const Shape inReference  )  [pure virtual]

Set the match against the specified shape.

Parameters:
inReference A reference shape which this shape will match against.
virtual void Celartem::DjVu::Shape::setPosition ( size_t  inX,
size_t  inY 
) [pure virtual]

Set the position of this shape.

Parameters:
inX X-coordination of this shape.
inY Y-coordination of this shape.
virtual void Celartem::DjVu::Shape::setRefinement ( const Shape inReference  )  [pure virtual]

Set the refinement against the specified shape.

Parameters:
inReference A reference shape which this shape will refine against.

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

This document is made with doxygen 1.7.1 at Thu Feb 17 2011 15:40:20.
Caminova Logo