Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvSVGStreamer Class Reference

Bitmap streamer class. More...

#include <ilviews/bitmaps/svg.h>

Inheritance diagram for IlvSVGStreamer:
IlvBitmapStreamer IlvValueInterface

Public Member Functions

 IlvSVGStreamer ()
 Constructor.
 
IlBoolean canRead () const override
 Indicates that the instance can read from a stream. More...
 
IlBoolean checkSignature (const IlUChar *data, IlUInt size) override
 Checks the signature of the input stream. More...
 
IlUInt getAlphaLevel () const
 Gets the alpha level of the SVG streamer. More...
 
IlvBitmapDataread (ILVSTDPREF istream &stream) override
 Not supported for SVG images. Use readBitmap instead. More...
 
IlvBitmapreadBitmap (IlvDisplay *display, IL_STDPREF istream &stream) override
 Reads an SVG image from a stream. More...
 
IlvBitmapreadBitmap (IlvDisplay *display, IL_STDPREF istream &stream, const IlvTransformer *t)
 Reads transformed SVG image from a stream. More...
 
IlvBitmapreadBitmap (IlvDisplay *display, IL_STDPREF istream &stream, IlUInt width, IlUInt height)
 Reads an SVG image of a specified size from a stream. More...
 
void setAlphaLevel (IlUInt level)
 Sets the alpha level for the SVG stream. More...
 
- Public Member Functions inherited from IlvBitmapStreamer
virtual void callReadProgressCallback (IlUInt current, IlUInt max)
 Calls the callback for read progression. More...
 
virtual void callWriteProgressCallback (IlUInt current, IlUInt max)
 Calls the callback for write progression. More...
 
virtual IlBoolean canWrite () const
 Indicates whether the instance can write to a stream. Default is IlFalse. More...
 
virtual const char * getName () const
 Returns the internal name of the streamer. More...
 
IlvQuantizergetQuantizer () const
 Returns the quantizer used by this streamer. More...
 
virtual IlvBitmapDataread (std::istream &stream)
 Reads from a stream. More...
 
virtual IlvBitmapreadBitmap (IlvDisplay *display, std::istream &stream)
 Reads IlvBitmap from a stream. More...
 
virtual IlvBitmapInformationreadInfo (std::istream &stream)
 Reads information from a stream. More...
 
void setQuantizer (IlvQuantizer *quantizer)
 Sets the quantizer used (if needed) by this streamer. More...
 
virtual void setReadProgressCallback (IlvProgressCallback rpCallback, IlAny arg=0)
 Sets the callback for read progression. More...
 
virtual void setWriteProgressCallback (IlvProgressCallback wpCallback, IlAny arg=0)
 Sets the callback for write progression. More...
 
virtual IlBoolean write (IlvBitmapData *bitmapData, std::ostream &stream)
 Writes an IlvBitmapData to a stream. More...
 
- Public Member Functions inherited from IlvValueInterface
virtual IlBoolean applyValue (const IlvValue &value)
 Apply an accessor. More...
 
virtual IlBoolean changeValue (const IlvValue &val)
 Changes the value of an accessor. More...
 
virtual IlBoolean changeValues (const IlvValue *values, IlUShort count=0)
 Changes several accessor values simultaneously. More...
 
virtual void getAccessors (const IlSymbol *const **names, const IlvValueTypeClass *const **types, IlUInt &count) const
 Retrieves the list of available accessors of an object. More...
 
virtual IlvValuequeryValue (IlvValue &val) const
 Retrieves an accessor value. More...
 
virtual void queryValues (IlvValue *values, IlUShort count) const
 Retrieves multiple accessor values simultaneously. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvBitmapStreamer
static IlvBitmapStreamerGet (const char *name)
 Returns a streamer from its name. More...
 
static IlvBitmapStreamer ** GetRegisteredStreamers (IlUInt &count)
 Returns the registered streamers. More...
 
static IlvBitmapRead (IlvDisplay *display, std::istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads a bitmap using the registered streamers. More...
 
static IlvBitmapDataReadBitmapData (std::istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads bitmap data using the registered streamers. More...
 
static IlvBitmapInformationReadInfo (std::istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads bitmap information using the registered streamers. More...
 
static void Register (IlvBitmapStreamer *streamer)
 Registers the given streamer. More...
 
static IlBoolean UnRegister (IlvBitmapStreamer *streamer)
 Unregisters the given streamer. More...
 

Detailed Description

Bitmap streamer class.

Library: ilvsvg

This streamer provides methods to deal with a stream containing a SVG image.
This streamer can read and write.
When reading or writing, callbacks will be called at each scanline. The data is written in binary mode.

Member Function Documentation

◆ canRead()

IlBoolean IlvSVGStreamer::canRead ( ) const
overridevirtual

Indicates that the instance can read from a stream.

Returns
Always IlTrue.

Reimplemented from IlvBitmapStreamer.

◆ checkSignature()

IlBoolean IlvSVGStreamer::checkSignature ( const IlUChar data,
IlUInt  size 
)
overridevirtual

Checks the signature of the input stream.

Parameters
dataThe data containing the signature of the stream.
sizeThe size of the data containing the signature.
Returns
IlTrue if the data contains a SVG signature.

Implements IlvBitmapStreamer.

◆ getAlphaLevel()

IlUInt IlvSVGStreamer::getAlphaLevel ( ) const

Gets the alpha level of the SVG streamer.

Returns
The alpha level.

◆ read()

IlvBitmapData* IlvSVGStreamer::read ( ILVSTDPREF istream &  stream)
override

Not supported for SVG images. Use readBitmap instead.

Parameters
streamThe stream to read from.
Returns
nullptr.

◆ readBitmap() [1/3]

IlvBitmap* IlvSVGStreamer::readBitmap ( IlvDisplay display,
IL_STDPREF istream &  stream 
)
override

Reads an SVG image from a stream.

Parameters
streamThe stream to read from.
Returns
An instance of IlvBitmap.

◆ readBitmap() [2/3]

IlvBitmap* IlvSVGStreamer::readBitmap ( IlvDisplay display,
IL_STDPREF istream &  stream,
const IlvTransformer t 
)

Reads transformed SVG image from a stream.

Parameters
streamThe stream to read from.
tTransformation.
Returns
An instance of IlvBitmap.

◆ readBitmap() [3/3]

IlvBitmap* IlvSVGStreamer::readBitmap ( IlvDisplay display,
IL_STDPREF istream &  stream,
IlUInt  width,
IlUInt  height 
)

Reads an SVG image of a specified size from a stream.

Parameters
streamThe stream to read from.
widthRequested width.
heightRequested height.
Returns
An instance of IlvBitmap.

◆ setAlphaLevel()

void IlvSVGStreamer::setAlphaLevel ( IlUInt  level)

Sets the alpha level for the SVG stream.

Alpha levels greater than the given argument are converted to a fully opaque value while alpha levels smaller than the given argument are converted to a fully transparent value.

Parameters
levelThe alpha level.