wxPdfDocument 1.2.0
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
wxPdfImage Class Reference

Class representing image objects. (For internal use only) More...

#include <pdfimage.h>

Public Member Functions

 wxPdfImage (wxPdfDocument *document, int index, const wxString &name, const wxString &type)
 Constructor.
 
 wxPdfImage (wxPdfDocument *document, int index, const wxString &name, const wxImage &image, bool jpegFormat=false)
 Constructor.
 
 wxPdfImage (wxPdfDocument *document, int index, const wxString &name, wxInputStream &stream, const wxString &mimeType)
 Constructor.
 
virtual ~wxPdfImage ()
 Destructor.
 
void SetIndex (int index)
 Set image index.
 
int GetIndex ()
 Get image index.
 
void SetObjIndex (int n)
 Set object index.
 
int GetObjIndex ()
 Get object index.
 
void SetMaskImage (int maskImage)
 Set mask flag.
 
int GetMaskImage ()
 Check mask flag.
 
void SetType (const wxString &type)
 Set image type.
 
wxString GetType ()
 Get image type.
 
bool IsFormObject ()
 Check whether image has to be handled as a form object.
 
void SetName (const wxString &name)
 Set image file name.
 
wxString GetName ()
 Get image file name.
 
int GetWidth ()
 Get image width in pixels.
 
int GetHeight ()
 Get image height in pixels.
 
int GetX ()
 Get image offset in X direction.
 
int GetY ()
 Get image offset in Y direction.
 
wxString GetColourSpace ()
 Get colour space.
 
int GetBitsPerComponent ()
 Get bits per component.
 
wxString GetF ()
 Get compression filter specification.
 
wxString GetParms ()
 Get additional PDF parameter.
 
unsigned int GetPaletteSize ()
 Get palette size.
 
char * GetPalette ()
 Get palette data.
 
unsigned int GetTransparencySize ()
 Get transparency size.
 
char * GetTransparency ()
 Get transparency data.
 
unsigned int GetDataSize ()
 Get image data size.
 
char * GetData ()
 Get image data.
 
bool Parse ()
 Parse image file.
 

Protected Member Functions

bool ConvertWxImage (const wxImage &image, bool jpegFormat)
 Extract info from a wxImage.
 
bool ParseJPG (wxInputStream *imageStream)
 Extract info from a JPEG file.
 
bool ParsePNG (wxInputStream *imageStream)
 Extract info from a PNG file.
 
bool ParseGIF (wxInputStream *imageStream)
 Extract info from a GIF file.
 
bool ParseWMF (wxInputStream *imageStream)
 Extract info from a WMF file.
 
int ReadIntBE (wxInputStream *imageStream)
 Read a 4-byte integer from file (big endian)
 
int ReadIntLE (wxInputStream *imageStream)
 Read a 4-byte integer from file (little endian)
 
unsigned int ReadUIntBE (wxInputStream *imageStream)
 Read a 4-byte unsigned integer from file (big endian)
 
unsigned int ReadUIntLE (wxInputStream *imageStream)
 Read a 4-byte unsigned integer from file (little endian)
 
short ReadShortBE (wxInputStream *imageStream)
 Read a 2-byte integer from file (big endian)
 
short ReadShortLE (wxInputStream *imageStream)
 Read a 2-byte integer from file (little endian)
 
unsigned short ReadUShortBE (wxInputStream *imageStream)
 Read a unsigned 2-byte integer from file (big endian)
 
unsigned short ReadUShortLE (wxInputStream *imageStream)
 Read a unsigned 2-byte integer from file (little endian)
 

Static Protected Member Functions

static wxFileSystem * GetFileSystem ()
 Get the file system for accessing image files.
 

Protected Attributes

wxPdfDocumentm_document
 Document this image belongs to.
 
int m_index
 Index number of this image.
 
int m_n
 Image object index.
 
wxString m_type
 Image type.
 
wxString m_name
 Image name.
 
int m_maskImage
 Id of associated image mask.
 
int m_width
 Image width in pixels.
 
int m_height
 Image height in pixels.
 
wxString m_cs
 Colourspace.
 
char m_bpc
 Bits per colour.
 
wxString m_f
 Compression method.
 
wxString m_parms
 Additional PDF parameters.
 
unsigned int m_palSize
 Size of palette.
 
char * m_pal
 Palette data.
 
unsigned int m_trnsSize
 Transparency colour size.
 
char * m_trns
 Transparency colour data.
 
unsigned int m_dataSize
 Image data size.
 
char * m_data
 Image data.
 
bool m_isFormObj
 Flag whether image must be treated as form object.
 
int m_x
 Offset in X direction.
 
int m_y
 Offset in Y direction.
 
bool m_fromWxImage
 Flag whether image originated from wxImage.
 
bool m_validWxImage
 Flag whether wxImage conversion went ok.
 
wxFSFile * m_imageFile
 File system file of image.
 
wxInputStream * m_imageStream
 Stream containing the image data.
 

Static Protected Attributes

static wxFileSystem * ms_fileSystem
 File system for accessing image files.
 

Detailed Description

Class representing image objects. (For internal use only)

Constructor & Destructor Documentation

◆ wxPdfImage() [1/3]

wxPdfImage::wxPdfImage ( wxPdfDocument * document,
int index,
const wxString & name,
const wxString & type )

Constructor.

◆ wxPdfImage() [2/3]

wxPdfImage::wxPdfImage ( wxPdfDocument * document,
int index,
const wxString & name,
const wxImage & image,
bool jpegFormat = false )

Constructor.

◆ wxPdfImage() [3/3]

wxPdfImage::wxPdfImage ( wxPdfDocument * document,
int index,
const wxString & name,
wxInputStream & stream,
const wxString & mimeType )

Constructor.

◆ ~wxPdfImage()

virtual wxPdfImage::~wxPdfImage ( )
virtual

Destructor.

Member Function Documentation

◆ ConvertWxImage()

bool wxPdfImage::ConvertWxImage ( const wxImage & image,
bool jpegFormat )
protected

Extract info from a wxImage.

◆ GetBitsPerComponent()

int wxPdfImage::GetBitsPerComponent ( )
inline

Get bits per component.

◆ GetColourSpace()

wxString wxPdfImage::GetColourSpace ( )
inline

Get colour space.

◆ GetData()

char * wxPdfImage::GetData ( )
inline

Get image data.

◆ GetDataSize()

unsigned int wxPdfImage::GetDataSize ( )
inline

Get image data size.

◆ GetF()

wxString wxPdfImage::GetF ( )
inline

Get compression filter specification.

◆ GetFileSystem()

static wxFileSystem * wxPdfImage::GetFileSystem ( )
staticprotected

Get the file system for accessing image files.

◆ GetHeight()

int wxPdfImage::GetHeight ( )
inline

Get image height in pixels.

◆ GetIndex()

int wxPdfImage::GetIndex ( )
inline

Get image index.

◆ GetMaskImage()

int wxPdfImage::GetMaskImage ( )
inline

Check mask flag.

◆ GetName()

wxString wxPdfImage::GetName ( )
inline

Get image file name.

◆ GetObjIndex()

int wxPdfImage::GetObjIndex ( )
inline

Get object index.

◆ GetPalette()

char * wxPdfImage::GetPalette ( )
inline

Get palette data.

◆ GetPaletteSize()

unsigned int wxPdfImage::GetPaletteSize ( )
inline

Get palette size.

◆ GetParms()

wxString wxPdfImage::GetParms ( )
inline

Get additional PDF parameter.

◆ GetTransparency()

char * wxPdfImage::GetTransparency ( )
inline

Get transparency data.

◆ GetTransparencySize()

unsigned int wxPdfImage::GetTransparencySize ( )
inline

Get transparency size.

◆ GetType()

wxString wxPdfImage::GetType ( )
inline

Get image type.

◆ GetWidth()

int wxPdfImage::GetWidth ( )
inline

Get image width in pixels.

◆ GetX()

int wxPdfImage::GetX ( )
inline

Get image offset in X direction.

◆ GetY()

int wxPdfImage::GetY ( )
inline

Get image offset in Y direction.

◆ IsFormObject()

bool wxPdfImage::IsFormObject ( )
inline

Check whether image has to be handled as a form object.

◆ Parse()

bool wxPdfImage::Parse ( )

Parse image file.

◆ ParseGIF()

bool wxPdfImage::ParseGIF ( wxInputStream * imageStream)
protected

Extract info from a GIF file.

◆ ParseJPG()

bool wxPdfImage::ParseJPG ( wxInputStream * imageStream)
protected

Extract info from a JPEG file.

◆ ParsePNG()

bool wxPdfImage::ParsePNG ( wxInputStream * imageStream)
protected

Extract info from a PNG file.

◆ ParseWMF()

bool wxPdfImage::ParseWMF ( wxInputStream * imageStream)
protected

Extract info from a WMF file.

◆ ReadIntBE()

int wxPdfImage::ReadIntBE ( wxInputStream * imageStream)
protected

Read a 4-byte integer from file (big endian)

◆ ReadIntLE()

int wxPdfImage::ReadIntLE ( wxInputStream * imageStream)
protected

Read a 4-byte integer from file (little endian)

◆ ReadShortBE()

short wxPdfImage::ReadShortBE ( wxInputStream * imageStream)
protected

Read a 2-byte integer from file (big endian)

◆ ReadShortLE()

short wxPdfImage::ReadShortLE ( wxInputStream * imageStream)
protected

Read a 2-byte integer from file (little endian)

◆ ReadUIntBE()

unsigned int wxPdfImage::ReadUIntBE ( wxInputStream * imageStream)
protected

Read a 4-byte unsigned integer from file (big endian)

◆ ReadUIntLE()

unsigned int wxPdfImage::ReadUIntLE ( wxInputStream * imageStream)
protected

Read a 4-byte unsigned integer from file (little endian)

◆ ReadUShortBE()

unsigned short wxPdfImage::ReadUShortBE ( wxInputStream * imageStream)
protected

Read a unsigned 2-byte integer from file (big endian)

◆ ReadUShortLE()

unsigned short wxPdfImage::ReadUShortLE ( wxInputStream * imageStream)
protected

Read a unsigned 2-byte integer from file (little endian)

◆ SetIndex()

void wxPdfImage::SetIndex ( int index)
inline

Set image index.

◆ SetMaskImage()

void wxPdfImage::SetMaskImage ( int maskImage)
inline

Set mask flag.

◆ SetName()

void wxPdfImage::SetName ( const wxString & name)
inline

Set image file name.

◆ SetObjIndex()

void wxPdfImage::SetObjIndex ( int n)
inline

Set object index.

◆ SetType()

void wxPdfImage::SetType ( const wxString & type)
inline

Set image type.

Member Data Documentation

◆ m_bpc

char wxPdfImage::m_bpc
protected

Bits per colour.

◆ m_cs

wxString wxPdfImage::m_cs
protected

Colourspace.

◆ m_data

char* wxPdfImage::m_data
protected

Image data.

◆ m_dataSize

unsigned int wxPdfImage::m_dataSize
protected

Image data size.

◆ m_document

wxPdfDocument* wxPdfImage::m_document
protected

Document this image belongs to.

◆ m_f

wxString wxPdfImage::m_f
protected

Compression method.

◆ m_fromWxImage

bool wxPdfImage::m_fromWxImage
protected

Flag whether image originated from wxImage.

◆ m_height

int wxPdfImage::m_height
protected

Image height in pixels.

◆ m_imageFile

wxFSFile* wxPdfImage::m_imageFile
protected

File system file of image.

◆ m_imageStream

wxInputStream* wxPdfImage::m_imageStream
protected

Stream containing the image data.

◆ m_index

int wxPdfImage::m_index
protected

Index number of this image.

◆ m_isFormObj

bool wxPdfImage::m_isFormObj
protected

Flag whether image must be treated as form object.

◆ m_maskImage

int wxPdfImage::m_maskImage
protected

Id of associated image mask.

◆ m_n

int wxPdfImage::m_n
protected

Image object index.

◆ m_name

wxString wxPdfImage::m_name
protected

Image name.

◆ m_pal

char* wxPdfImage::m_pal
protected

Palette data.

◆ m_palSize

unsigned int wxPdfImage::m_palSize
protected

Size of palette.

◆ m_parms

wxString wxPdfImage::m_parms
protected

Additional PDF parameters.

◆ m_trns

char* wxPdfImage::m_trns
protected

Transparency colour data.

◆ m_trnsSize

unsigned int wxPdfImage::m_trnsSize
protected

Transparency colour size.

◆ m_type

wxString wxPdfImage::m_type
protected

Image type.

◆ m_validWxImage

bool wxPdfImage::m_validWxImage
protected

Flag whether wxImage conversion went ok.

◆ m_width

int wxPdfImage::m_width
protected

Image width in pixels.

◆ m_x

int wxPdfImage::m_x
protected

Offset in X direction.

◆ m_y

int wxPdfImage::m_y
protected

Offset in Y direction.

◆ ms_fileSystem

wxFileSystem* wxPdfImage::ms_fileSystem
staticprotected

File system for accessing image files.


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