Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
List of all members | Public Types | Public Member Functions
IlvSVGDevice Class Reference

Class implementing a dump device in SVG. More...

#include <ilviews/svg/IlvSVGDevice.h>

Inheritance diagram for IlvSVGDevice:
IlvPort IlvValueInterface

Public Types

enum  StyleMode { Inline, Class }
 Values to specify the style exporting mode. More...
 

Public Member Functions

 IlvSVGDevice (IlvDisplay *display)
 Constructor. More...
 
void clip (const IlvRect *) const override
 Limits the drawing to the given rectangular area. More...
 
void clip (const IlvRegion *) const override
 Limits the drawing to the given region. More...
 
void drawArc (const IlvPalette *, const IlvRect &, IlFloat, IlFloat) const override
 Draws an arc. More...
 
void drawBezier (const IlvPalette *, IlUInt, const IlvPoint *) const override
 Draws a set of Bézier curves. More...
 
void drawBitmap (const IlvPalette *, const IlvBitmap *, const IlvRect &, const IlvRegion *=0, IlvPosition=IlvCenter, IlBoolean=IlFalse) const override
 Draws an image. More...
 
void drawBitmap (const IlvPalette *, const IlvSystemPort *, const IlvRect &, const IlvPoint &) const override
 Draws an image. More...
 
void drawClosedBezier (const IlvPalette *, IlUInt, const IlvPoint *) const override
 Appends a closing curve to a set of Bézier curves. More...
 
void drawIString (const IlvPalette *, const IlvPoint &, const char *, int, IlvPosition=IlvLeft) const override
 Draws a string at the given position. More...
 
void drawLine (const IlvPalette *, const IlvPoint &, const IlvPoint &) const override
 Draws a line between 2 points. More...
 
void drawPoint (const IlvPalette *, const IlvPoint &) const override
 Draws a point at the given position. More...
 
void drawPolyLine (const IlvPalette *, IlUInt count, const IlvPoint *) const override
 Draws a series of connected lines. More...
 
void drawRectangle (const IlvPalette *, const IlvRect &) const override
 Draws the given rectangle. More...
 
void drawRoundRectangle (const IlvPalette *palette, const IlvRect &rect, IlUShort rr) const override
 Draws a round rectangle. More...
 
void drawRoundRectangleDifferentRadiuses (const IlvPalette *palette, const IlvRoundRect &rect) const override
 Draws a round rectangle. More...
 
void drawSegments (const IlvPalette *, IlUInt, const IlvPoint *, const IlvPoint *) const override
 Draws a set of segments. More...
 
void drawString (const IlvPalette *, const IlvPoint &, const char *, int, IlvPosition=IlvLeft) const override
 Draws a string at the given position. More...
 
void drawTransformedString (const IlvPalette *, const char *, int, const IlvTransformer &, const IlvRegion *=0, IlvValueInterface *drawingObj=nullptr) override
 Draws a transformed string. More...
 
void drawTransparentBitmap (const IlvPalette *, const IlvSystemPort *, const IlvRect &, const IlvPoint &) const override
 Draws a transparent bitmap. More...
 
void end () override
 Closed the dump device. More...
 
void fillArc (const IlvPalette *, const IlvRect &, IlFloat, IlFloat) const override
 Fills the arc. More...
 
void fillBezier (const IlvPalette *, IlUInt, const IlvPoint *) const override
 Fills an area specified by a set of Bézier curves. More...
 
void fillPaths (const IlvPalette *, IlUInt, const IlvPointArray *) const override
 Fills the shape defined by the given paths. More...
 
void fillPolyLine (const IlvPalette *, IlUInt, const IlvPoint *, IlBoolean) const override
 Fills a polygon. More...
 
void fillRectangle (const IlvPalette *, const IlvRect &) const override
 Fills the given rectangle. More...
 
void fillRoundRectangle (const IlvPalette *palette, const IlvRect &rect, IlUShort rr) const override
 Deprecated Fills a round rectangle. More...
 
void fillRoundRectangleDifferentRadiuses (const IlvPalette *palette, const IlvRoundRect &rect) const override
 Fills a round rectangle, with different radiuses, in the css way. More...
 
IlBoolean initDevice (const char *, IlvRect *=0) override
 Initializes the dump device. More...
 
IlBoolean isADevice () const override
 Queries the nature of this port. More...
 
IlBoolean isBad () const override
 Indicates whether this port is valid. More...
 
IlBoolean newPage () const override
 Doest nothing in IlvSVGDevice. More...
 
void send (const char *) const override
 Sends character strings to an output device. More...
 
void setPrecision (int precision)
 Sets floating point precision. More...
 
void setStyleMode (StyleMode mode)
 Sets style mode.
 
void setTransformer (const IlvTransformer &) override
 Sets transformer to the <svg> element. More...
 
void stretchBitmap (const IlvPalette *, const IlvPoint &, const IlvBitmap *, const IlvTransformer &, const IlvRect *=0) const override
 Stretches a bitmap. More...
 
void stretchBitmap (const IlvPalette *, const IlvRect &, const IlvBitmap *, const IlvRect *=0) const override
 Stretches a bitmap. More...
 
void stretchBitmapData (const IlvPalette *palette, const IlvBitmapData *src, const IlvRect &from, const IlvRect &to, IlBoolean opaque=IlFalse) const override
 Draws a bitmap data. More...
 
void stretchTransparentBitmap (const IlvPalette *, const IlvPoint &, const IlvBitmap *, const IlvTransformer &, const IlvRect *=0) const override
 Stretches a transparent bitmap. More...
 
void stretchTransparentBitmap (const IlvPalette *, const IlvRect &, const IlvBitmap *, const IlvRect *=0) const override
 Stretches a transparent bitmap. More...
 
- Public Member Functions inherited from IlvPort
 IlvPort (IlvDisplay *display=0)
 Constructor. More...
 
virtual void clearArea (const IlvRect &rect, IlBoolean reDraw=IlFalse) const
 Clears a rectangular area of the screen. More...
 
virtual void clearArea (const IlvRegion &region, IlBoolean reDraw=IlFalse) const
 Clears a region of the screen. More...
 
void composeAlpha (IlvIntensity alpha)
 Composes the current alpha value of the port. More...
 
virtual void drawArrow (const IlvPalette *palette, const IlvPoint &from, const IlvPoint &to, IlFloat position) const
 Draws an arrow. More...
 
virtual void drawILabel (const IlvPalette *palette, const char *label, int length, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition align=IlvCenter) const
 Draws a label in a rectangle. More...
 
virtual void drawLabel (const IlvPalette *palette, const char *label, int length, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition align=IlvCenter) const
 Draws a label in a rectangle. More...
 
virtual void drawMarker (const IlvPalette *palette, const IlvPoint &location, IlvMarkerType type=IlvMarkerSquare, IlUShort size=IlvDefaultMarkerSize) const
 Draws a marker. More...
 
virtual void drawMnemonicLabel (const IlvPalette *palette, const char *label, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition align=IlvCenter, IlBoolean underline=IlTrue) const
 Draws an underlined letter in a label. More...
 
virtual void drawOutlineRectangle (const IlvPalette *outlinePalette, const IlvPalette *fillPalette, const IlvRect &rect, const IlvRegion *clip=0) const
 Draws a rectangle with border effects. More...
 
virtual void drawPaths (const IlvPalette *palette, IlUInt count, const IlvPointArray *paths) const
 Draws an array of paths as polylines. More...
 
virtual void drawPoints (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const
 Draws a series of points. More...
 
virtual void drawPolyLine (const IlvPalette *palette, const IlvPoint &first, IlUInt count, const IlvDeltaPoint *others) const
 
virtual void drawPolyLine (const IlvPalette *palette, const IlvPoint &firstPoint, const views::vector< IlvDeltaPoint > &relativePositions) const
 Draws a series of connected lines relatively to a reference. More...
 
virtual void drawReliefDiamond (const IlvPalette *, const IlvPalette *invertedPalette, const IlvPalette *topShade, const IlvPalette *bottomShade, const IlvRect &bbox, IlUShort thickness, const IlvRegion *clip=0) const
 Draws a diamond with depth effects. More...
 
virtual void drawReliefRectangle (const IlvPalette *palette, const IlvPalette *invertedPalette, const IlvPalette *topShade, const IlvPalette *bottomShade, const IlvRect &bbox, IlUShort thickness, const IlvRegion *clip=0) const
 Draws a filled rectangle with depth effects. More...
 
virtual void drawShadowRectangle (const IlvPalette *palette, const IlvPalette *invertedPalette, const IlvRect &bbox, IlUShort thickness, IlvPosition shadowPosition, const IlvRegion *clip=0) const
 Draws a filled rectangle with its shadow. More...
 
virtual void fillPolyLine (const IlvPalette *palette, const IlvPoint &first, IlUInt count, const IlvDeltaPoint *others, IlBoolean convex=IlFalse) const
 
virtual void fillPolyLine (const IlvPalette *palette, const IlvPoint &firstPoint, const views::vector< IlvDeltaPoint > &relativePositions) const
 Fills a series of connected lines relatively to a reference. More...
 
IlvIntensity getAlpha () const
 Provides the alpha value of the port. More...
 
IlvAntialiasingMode getAntialiasingMode () const
 Provides the anti-aliasing mode of the port. More...
 
IlvDisplaygetDisplay () const
 Returns a pointer to the IlvDisplay of this port. More...
 
IlvDim height () const
 Provides the height of the port. More...
 
virtual IlBoolean isABitmap () const
 Indicates that this port is a bitmap (not a view or a dump device). More...
 
virtual IlBoolean isASystemPort () const
 Indicates that this port is a true system port (not a dump device). More...
 
void setAlpha (IlvIntensity alpha)
 Sets the alpha value of the port. More...
 
void setAntialiasingMode (IlvAntialiasingMode mode)
 Sets the anti-aliasing mode of the port. More...
 
void size (IlvDim &w, IlvDim &h) const
 Gives the dimensions of the port. More...
 
IlvDim width () const
 Provides the width of the port. 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 const char * getName () const
 Returns the name of the instance. The semantic and implementation of this method are defined by concrete subclasses. The default implementation returns 0. 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...
 

Detailed Description

Class implementing a dump device in SVG.

Library: svgcore

The class IlvSVGDevice inherits from IlvPort and provides exporting services using the SVG format. It allows to export any region of a view into a text file. All the drawing member functions are implemented to generate the corresponding SVG code instead of drawing to a window or bitmap.

Member Enumeration Documentation

◆ StyleMode

Values to specify the style exporting mode.

Enumerator
Inline 

Export to the 'style' attribute to specify the style rules directly on a given element.

Class 

Export all styles to <style> SVG element. Use the 'class' attribute to specify the style class for a given element

Constructor & Destructor Documentation

◆ IlvSVGDevice()

IlvSVGDevice::IlvSVGDevice ( IlvDisplay display)

Constructor.

Initializes a new instance of IlvSVGDevice.

Parameters
displayThe display instance.

Member Function Documentation

◆ clip() [1/2]

void IlvSVGDevice::clip ( const IlvRect rect) const
overridevirtual

Limits the drawing to the given rectangular area.

Limits the drawing to the rect area. This area maps out a temporary clipping area. These settings will be erased when a new clip function is called.

Parameters
rectThe drawing rectangle.

Implements IlvPort.

◆ clip() [2/2]

void IlvSVGDevice::clip ( const IlvRegion region) const
overridevirtual

Limits the drawing to the given region.

Limits the drawing to the region region. This area maps out a temporary clipping area. These settings will be erased when a new clip function is called.

Parameters
regionThe drawing region.

Implements IlvPort.

◆ drawArc()

void IlvSVGDevice::drawArc ( const IlvPalette palette,
const IlvRect rect,
IlFloat  start,
IlFloat  range 
) const
overridevirtual

Draws an arc.

Draws an arc that is part of an ellipse whose bounding box is the rectangle specified by rect. The arc extends from the angle start to the angle formed by the sum of start and range. These angles are given in degrees and the arc is drawn counterclockwise for positive angles and clockwise for negative angles. Palette's border position doesn't affect the draw. Palette's line width is drawn centered on bounds. LIMITATION: In corner cases, Arc beginning and end might not be precise.

Parameters
paletteThe palette to use for the color of the arc.
rectThe bounding box of the ellipse for the arc.
startThe start angle in degrees.
rangeThe range in degrees.

Implements IlvPort.

◆ drawBezier()

void IlvSVGDevice::drawBezier ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points 
) const
overridevirtual

Draws a set of Bézier curves.

Draws a set of Bézier curves. The points parameter is a pointer to count points defining the curve. Each fragment of a Bézier curve is represented by four points. The first point indicates where the curve starts, and the fourth point indicates where it ends. The second and third points determine the orientation of the curve. Here is a simple example, with a single fragment:


Principle of the Bézier curves

The first point in the points array starts the curve. The next two points are control points, which determine the shape of the curve. The fourth point is both the last point of the first curve fragment and the starting point - if it exists - of the next fragment.

Parameters
paletteThe palette used for drawing.
countThe number of points defining the curve.
pointsThe array of count points defining the curve.

Reimplemented from IlvPort.

◆ drawBitmap() [1/2]

void IlvSVGDevice::drawBitmap ( const IlvPalette palette,
const IlvBitmap src,
const IlvRect drawRect,
const IlvRegion clip = 0,
IlvPosition  alignment = IlvCenter,
IlBoolean  transparent = IlFalse 
) const
overridevirtual

Draws an image.

Draws the image stored in src in the rectangle from, using the alignment position specified in the alignment parameter in relation to from. Copies part of the image maintained by a source port called src to this destination port.
You can specify a transparent bitmap display by setting the transparent parameter to IlTrue. Note that in this case the bitmap has to be 1-bit deep (that is, a monochrome bitmap) or must have a transparency mask.

Parameters
paletteThe palette to use for the color of the bitmap.
srcThe source port of the image.
drawRectThe size of the transferred image.
clipThe destination clip rectangle.
alignmentThe position of the image in relation to the drawRect parameter.
transparentSpecifies whether the bitmap is transparent.

Reimplemented from IlvPort.

◆ drawBitmap() [2/2]

void IlvSVGDevice::drawBitmap ( const IlvPalette palette,
const IlvSystemPort src,
const IlvRect from,
const IlvPoint to 
) const
overridevirtual

Draws an image.

Draws the image stored in src in the rectangle from. Copies part of the image maintained by a source port called src to this destination port.

Parameters
paletteThe palette to use for the color of the bitmap.
srcThe source port of the image.
fromThe portion of src that is transferred.
toThe location of the top left corner of the destination.

Implements IlvPort.

◆ drawClosedBezier()

void IlvSVGDevice::drawClosedBezier ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points 
) const
overridevirtual

Appends a closing curve to a set of Bézier curves.

Similar to the member function drawBezier, except that a closing Bézier curve is appended in order to join the end to the start.

Parameters
paletteThe palette used for drawing.
countThe number of points defining the curve.
pointsThe array of count points defining the curve.

Reimplemented from IlvPort.

◆ drawIString()

void IlvSVGDevice::drawIString ( const IlvPalette palette,
const IlvPoint position,
const char *  string,
int  length,
IlvPosition  align = IlvLeft 
) const
overridevirtual

Draws a string at the given position.

Similar to drawString, except that it uses the background color to fill the rectangle that surrounds the string.

Parameters
paletteThe palette used for drawing the string.
positionThe location where to draw the string. This indicates the y location of the base line, and the x coordinates depends on align.
stringThe text to draw.
lengthThe length of the string.
alignThe alignment of the string with respect to position.

Implements IlvPort.

◆ drawLine()

void IlvSVGDevice::drawLine ( const IlvPalette palette,
const IlvPoint point1,
const IlvPoint point2 
) const
overridevirtual

Draws a line between 2 points.

Draws a line from the point point1 to the point point2 (included). Limitation: If point1 and point2 are the same point, only that pixel will be drawn, regardless palette's line width.

Parameters
paletteThe palette to use for the color of the line.
point1The position of the first point.
point2The position of the second point.

Implements IlvPort.

◆ drawPoint()

void IlvSVGDevice::drawPoint ( const IlvPalette palette,
const IlvPoint point 
) const
overridevirtual

Draws a point at the given position.

Draws a point at the position referred to as point, which is in fact a pixel. This function sets the indicated pixel in the destination port to the foreground color of palette.

Parameters
paletteThe palette to use for the color of the point.
pointThe position of the point to draw.

Implements IlvPort.

◆ drawPolyLine()

void IlvSVGDevice::drawPolyLine ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points 
) const
overridevirtual

Draws a series of connected lines.

Draws a series of connected lines between the set of count points referred to as points.

Parameters
paletteThe palette to use for the color of the lines.
countThe number of points.
pointsThe array of at least count points that define the polyline shape.

Implements IlvPort.

◆ drawRectangle()

void IlvSVGDevice::drawRectangle ( const IlvPalette palette,
const IlvRect rect 
) const
overridevirtual

Draws the given rectangle.

Draws the rectangle specified by rect. The palette defines border's position and width.

Parameters
paletteThe palette to use for the color of the rectangle.
rectThe rectangle to draw.

Reimplemented from IlvPort.

◆ drawRoundRectangle()

void IlvSVGDevice::drawRoundRectangle ( const IlvPalette palette,
const IlvRect rect,
IlUShort  radius 
) const
overridevirtual

Draws a round rectangle.

The palette defines border's position and width.

Parameters
paletteThe palette used for drawing.
rectThe rectangle that is drawn.
radiusThe radius of the round rectangle corners.

Reimplemented from IlvPort.

◆ drawRoundRectangleDifferentRadiuses()

void IlvSVGDevice::drawRoundRectangleDifferentRadiuses ( const IlvPalette palette,
const IlvRoundRect roundRect 
) const
overridevirtual

Draws a round rectangle.

The palette defines border's position and width.

Parameters
paletteThe palette used for drawing.
roundRectThe rectangle that is drawn.

Reimplemented from IlvPort.

◆ drawSegments()

void IlvSVGDevice::drawSegments ( const IlvPalette palette,
IlUInt  count,
const IlvPoint from,
const IlvPoint to 
) const
overridevirtual

Draws a set of segments.

Draws a set of segments whose number is indicated by count. The ith segment starts at the point from[i] and ends at the point to[i].

Parameters
paletteThe palette to use for the color of the segments.
countThe number of segments to draw.
fromThe starting point of the segment.
toThe ending point of the segment.

Reimplemented from IlvPort.

◆ drawString()

void IlvSVGDevice::drawString ( const IlvPalette palette,
const IlvPoint position,
const char *  string,
int  length,
IlvPosition  align = IlvLeft 
) const
overridevirtual

Draws a string at the given position.

Draws a string at the position referred to as position. The text to be drawn is given in the string parameter and its length is set in the length integer parameter. For this length parameter you can provide a negative number -1 instead of giving the real length. Text length is then computed internally since string is handled as a zero-terminated character array. The align parameter indicates how the string is to be aligned with respect to the position point. For this alignment, the y-coordinate of the position point represents the baseline, and the options are IlvLeft, IlvRight, and IlvCenter.

Parameters
paletteThe palette used for drawing the string.
positionThe location where to draw the string. This indicates the y location of the base line, and the x coordinates depends on align.
stringThe text to draw.
lengthThe length of the string.
alignThe alignment of the string with respect to position.

Implements IlvPort.

◆ drawTransformedString()

void IlvSVGDevice::drawTransformedString ( const IlvPalette palette,
const char *  string,
int  length,
const IlvTransformer t,
const IlvRegion clip = 0,
IlvValueInterface drawingObj = nullptr 
)
overridevirtual

Draws a transformed string.

Similar to drawString except that the string is drawn using the transformer t. Note that with the X window system, you should use normal fonts and transform the fonts through bitmaps. With Windows and OS/2, you should use true system vectorial fonts such as truetype fonts.

Parameters
paletteThe palette used to draw the string.
stringThe text to draw.
lengthThe length of the string.
tThe transformer to apply to the string.
clipThe destination clip area.

Implements IlvPort.

◆ drawTransparentBitmap()

void IlvSVGDevice::drawTransparentBitmap ( const IlvPalette palette,
const IlvSystemPort src,
const IlvRect from,
const IlvPoint to 
) const
overridevirtual

Draws a transparent bitmap.

Draws the transparent bitmap in the rectangle. The result is displayed in the system port with the palette palette.

Parameters
paletteThe palette to use for the color of the resulting bitmap.
srcThe system port.
fromThe portion of src that is transferred.
toThe location of the top left corner of the destination.

Implements IlvPort.

◆ end()

void IlvSVGDevice::end ( )
overridevirtual

Closed the dump device.

Closes the dump device and does all the necessary cleaning.

Implements IlvPort.

◆ fillArc()

void IlvSVGDevice::fillArc ( const IlvPalette palette,
const IlvRect rect,
IlFloat  start,
IlFloat  range 
) const
overridevirtual

Fills the arc.

Fills the closed arc that is part of an ellipse whose bounding box is the rectangle specified by rect. The arc extends from the angle start to the angle formed by the sum of start and range. These angles are given in degrees. The actual filled shape depends on how the arc has been closed, either in IlvArcPie mode or in IlvArcChord mode. Palette's line width doesn't affect the drawing.

Parameters
paletteThe palette to use for the fill color of the arc.
rectThe bounding box of the ellipse for the arc.
startThe start angle in degrees.
rangeThe range in degrees.

Implements IlvPort.

◆ fillBezier()

void IlvSVGDevice::fillBezier ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points 
) const
overridevirtual

Fills an area specified by a set of Bézier curves.

Fills an area specified by a set of Bézier curves.

Parameters
paletteThe palette used for drawing.
countThe number of points defining the curve.
pointsThe array of count points defining the curve.

Reimplemented from IlvPort.

◆ fillPaths()

void IlvSVGDevice::fillPaths ( const IlvPalette palette,
IlUInt  count,
const IlvPointArray pathArray 
) const
overridevirtual

Fills the shape defined by the given paths.

Fills the shape defined by all the paths described in the IlvPointArray array pathArray, with the IlvPalette palette. If count is 1, fillPaths may be seen as the drawing of a polygon. If none of the paths provided intersect, each polygon is drawn with the palette. The drawing becomes more complex when the paths intersect. A simple way to see this drawing is that when filled areas overlap, the intersection is empty. When a third area intersects with the first two areas, the intersection is filled.


The two objects have no filled intersection.


The small gray area in the middle represents the filled intersection of these three objects, while the white spaces are the overlapping areas between two objects. (For the purpose of this diagram, rectangles have been outlined).

Parameters
paletteThe palette to use for the fill color of the paths.
countThe number of paths provided in the IlvPointArray array.
pathArrayThe array of paths.

Reimplemented from IlvPort.

◆ fillPolyLine()

void IlvSVGDevice::fillPolyLine ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points,
IlBoolean  convex 
) const
overridevirtual

Fills a polygon.

Fills a polygon that is drawn as a series of connected lines between the set of count points referred to as points.
If the optional flag convex is set to IlTrue, drawing convex polygons on certain systems may be accelerated. This feature should only be used when you are sure that the points provided form a convex contour. If this is not the case the result may be unpredictable.

Parameters
paletteThe palette to use for the fill color of the polygon.
countThe number of points.
pointsThe points in the polyline.
convexFlag for convex polygons.

Implements IlvPort.

◆ fillRectangle()

void IlvSVGDevice::fillRectangle ( const IlvPalette palette,
const IlvRect rect 
) const
overridevirtual

Fills the given rectangle.

Fills the rectangle specified by rect. Palette's line width doesn't affect the drawing.

Parameters
paletteThe palette to use for the fill color of the rectangle.
rectThe rectangle to fill.

Reimplemented from IlvPort.

◆ fillRoundRectangle()

void IlvSVGDevice::fillRoundRectangle ( const IlvPalette palette,
const IlvRect rect,
IlUShort  radius 
) const
overridevirtual

Deprecated Fills a round rectangle.

Palette's line width doesn't affect the drawing.

Parameters
paletteThe palette used for drawing.
rectThe rectangle that is drawn.
radiusThe radius of the round rectangle corners.

Reimplemented from IlvPort.

◆ fillRoundRectangleDifferentRadiuses()

void IlvSVGDevice::fillRoundRectangleDifferentRadiuses ( const IlvPalette palette,
const IlvRoundRect roundRect 
) const
overridevirtual

Fills a round rectangle, with different radiuses, in the css way.

Palette's line width doesn't affect the drawing.

Parameters
paletteThe palette used for drawing.
roundRectThe rectangle that is drawn.

Reimplemented from IlvPort.

◆ initDevice()

IlBoolean IlvSVGDevice::initDevice ( const char *  filename,
IlvRect clip = 0 
)
overridevirtual

Initializes the dump device.

Initializes the dump device so that it writes its result in the filename file. This member function must be called before any other class member function. The region to be dumped is clipped by the bbox parameter. This member function sets the global clip with bbox set as the parameter to be used throughout the device lifespan.

Parameters
filenameIs usually used to indicate the output filename of the dump.
clipThe clipping rectangle to be used when drawing.

Implements IlvPort.

◆ isADevice()

IlBoolean IlvSVGDevice::isADevice ( ) const
overridevirtual

Queries the nature of this port.

Returns
Always IlTrue.

Reimplemented from IlvPort.

◆ isBad()

IlBoolean IlvSVGDevice::isBad ( ) const
overridevirtual

Indicates whether this port is valid.

Indicates whether the display system can allocate the system-dependent part of the IlvPort. You must not use this port if it is "bad".

Returns
IlTrue if the display system can not allocate the system-dependent part of the IlvPort.

Implements IlvPort.

◆ newPage()

IlBoolean IlvSVGDevice::newPage ( ) const
overridevirtual

Doest nothing in IlvSVGDevice.

Returns
Always IlTrue.

Implements IlvPort.

◆ send()

void IlvSVGDevice::send ( const char *  string) const
overridevirtual

Sends character strings to an output device.

Sends any character string to an output device to send information to the device.

Parameters
stringThe string sent to the device. It is the responsibility of the device to interpret this string and perform the proper job.

Implements IlvPort.

◆ setPrecision()

void IlvSVGDevice::setPrecision ( int  precision)

Sets floating point precision.

Parameters
precisionthe number of significant digits to print.

◆ setTransformer()

void IlvSVGDevice::setTransformer ( const IlvTransformer )
overridevirtual

Sets transformer to the <svg> element.

Parameters
tThe transformer that is applied.

Implements IlvPort.

◆ stretchBitmap() [1/2]

void IlvSVGDevice::stretchBitmap ( const IlvPalette palette,
const IlvPoint to,
const IlvBitmap src,
const IlvTransformer t,
const IlvRect clip = 0 
) const
overridevirtual

Stretches a bitmap.

Draws the bitmap src in the point to, applying the transformation t. (In a Windows environment, you can only zoom in on the object, you cannot rotate.) The result is displayed in the current object.

Parameters
paletteThe palette used for drawing.
toThe point to stretch the bitmap to.
srcThe bitmap to stretch.
tThe transformation to apply to the bitmap.
clipThe destination clip area.

Implements IlvPort.

◆ stretchBitmap() [2/2]

void IlvSVGDevice::stretchBitmap ( const IlvPalette palette,
const IlvRect from,
const IlvBitmap src,
const IlvRect clip = 0 
) const
overridevirtual

Stretches a bitmap.

Stretches the dimensions from in the bitmap src to correspond with the size of this IlvPort object. The result is displayed in the current port with the palette palette, and clipped by the parameter clip.

Parameters
paletteThe palette used for drawing.
fromThe location of the source area.
srcThe bitmap to stretch.
clipThe destination clip rectangle.

Implements IlvPort.

◆ stretchBitmapData()

void IlvSVGDevice::stretchBitmapData ( const IlvPalette palette,
const IlvBitmapData src,
const IlvRect from,
const IlvRect to,
IlBoolean  opaque = IlFalse 
) const
overridevirtual

Draws a bitmap data.

This method allows bitmap datas to be drawn. If the bitmap data has per pixel alpha, then it is composed with the underlying graphics.

Parameters
paletteThe palette used for drawing.
srcThe bitmap data to draw.
fromThe source rectangle in the bitmap data.
toThe destination rectangle.
opaqueA Boolean value indicating whether per pixel alpha should be taken into account (IlTrue indicates that no per pixel alpha is used).

Implements IlvPort.

◆ stretchTransparentBitmap() [1/2]

void IlvSVGDevice::stretchTransparentBitmap ( const IlvPalette palette,
const IlvPoint to,
const IlvBitmap src,
const IlvTransformer t,
const IlvRect clip = 0 
) const
overridevirtual

Stretches a transparent bitmap.

Stretches the transparent bitmap src to the point to, applying the transformation t. The result is displayed in the current object.

Parameters
paletteThe palette used for drawing.
toThe point to stretch the bitmap to.
srcThe transparent bitmap to stretch.
tThe transformation to apply to the bitmap.
clipThe destination clip area.

Implements IlvPort.

◆ stretchTransparentBitmap() [2/2]

void IlvSVGDevice::stretchTransparentBitmap ( const IlvPalette palette,
const IlvRect from,
const IlvBitmap src,
const IlvRect clip = 0 
) const
overridevirtual

Stretches a transparent bitmap.

Stretches the source bitmap src in the rectangle from. The result is displayed in the bitmap src with the palette palette and clipped by parameter clip.

Parameters
paletteThe palette used for drawing.
fromThe location of the source area.
srcThe transparent bitmap to stretch.
clipThe destination clip rectangle.

Implements IlvPort.