Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

class PixBase : public Raster

This is the base class of Leptonica raster objects, Pix and PixRaster.

It has the sole purpose to provide a common base class for Leptonica raster pointers,

with some common function prototypes for pointer access.

Used mainly inside PixRasterCtrl

PixBase is an abstract class and cannot be instantiated.

 

 

Internal handling of Leptonica objects

 


 

virtual PIX *GetPIX(int page = PIXRASTER_CURPAGE) = 0

Gets underlying Leptonica PIX object for page.

 

 

Page handling functions

 


 

virtual void SeekPage(int page)

Sets active page.

 


 

virtual int GetPageCount()

Gets number of images on PixRaster

 


 

virtual int GetActivePage()

Gets number of currently active page

 

 

Miscellaneous Raster functions

 


 

virtual Size GetSize()

Returns the size of Raster's active page in pixels.

 


 

virtual Size GetSizeEx(int page)

Returns the size of Raster in pixels for page.

 


 

virtual int GetWidth()

Returns the width of Raster in pixels for active page.

 


 

virtual int GetWidthEx(int page)

Returns the width of Raster in pixels for page.

 


 

virtual int GetHeight()

Returns the height of Raster in pixels for active page.

 


 

virtual int GetHeightEx(int page)

Returns the height of Raster in pixels for page.

 


 

virtual Info GetInfo()

Returns the information about Raster's active page.

 


 

virtual Info GetInfoEx(int page)

Returns the information about Raster for page.

 


 

virtual Line GetLine(int line)

Reads a single scanline line from the raster's active page. If possible, Raster should be optimized for reading scanlines in ascending order - this what most processing functions (should) require.

 


 

virtual Line GetLineEx(int line, int page)

Reads a single scanline line from page ot the raster. If possible, Raster should be optimized for reading scanlines in ascending order - this what most processing functions (should) require.

 


 

virtual int GetPaletteCount()

Returns the size of palette for raster's active page. If there is no palette, returns 0

 


 

virtual int GetPaletteCountEx(int page)

Returns the size of palette for raster's page. If there is no palette, returns 0..

 


 

virtual const RGBA *GetPalette()

Returns active pages'current palette, NULL if there is no palette.

 


 

virtual const RGBA *GetPaletteEx(int page)

Returns page's current palette, NULL if there is no palette

 


 

virtual const RasterFormat *GetFormat()

Returns the format of Raster's active page, can return NULL if format is RGBA.

 


 

virtual const RasterFormat *GetFormatEx(int page)

Returns the format of Raster's page, can return NULL if format is RGBA.

 


 

bool IsEmpty()

Returns true if raster contains no images.

 


 

operator bool()

Returns true if raster has some content, false otherwise

 


 

virtual void Clear() = 0

Clears raster content

 

 

Polygon markers access

 


 

virtual PolyMarkers *GetPolyMarkers()

Returns array of polygon markers for current raster page

 


 

virtual PolyMarkers *GetPolyMarkersEx(int page)

Returns array of polygon markers for raster page

 

 

Do you want to contribute?