rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvPort Class Referenceabstract

Port class. More...

#include <ilviews/base/port.h>

Inheritance diagram for IlvPort:
IlvPSDevice IlvSystemPort IlvPSColorDevice IlvAbstractView IlvBitmap IlvWindowsVirtualDevice IlvScrollView IlvView IlvWindowsDevice IlvDrawingView IlvElasticView IlvViewCOMAdapter IlvContainer

Public Member Functions

 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...
 
virtual void clip (const IlvRect *rect) const =0
 Limits the drawing to the given rectangular area. More...
 
virtual void clip (const IlvRegion *region) const =0
 Limits the drawing to the given region. More...
 
void composeAlpha (IlvIntensity alpha)
 Composes the current alpha value of the port. More...
 
virtual void drawArc (const IlvPalette *palette, const IlvRect &rect, IlFloat start, IlFloat range) const =0
 Draws an arc. More...
 
virtual void drawArrow (const IlvPalette *palette, const IlvPoint &from, const IlvPoint &to, IlFloat position) const
 Draws an arrow. More...
 
virtual void drawBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const
 Draws a set of Bzier curves. More...
 
virtual void drawBitmap (const IlvPalette *palette, const IlvSystemPort *src, const IlvRect &from, const IlvPoint &to) const =0
 Draws an image. More...
 
virtual void drawBitmap (const IlvPalette *palette, const IlvBitmap *src, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition alignment=IlvCenter, IlBoolean transparent=IlFalse) const
 Draws an image. More...
 
virtual void drawClosedBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const
 Appends a closing curve to a set of Bézier curves. 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 drawIString (const IlvPalette *palette, const IlvPoint &position, const char *string, int length, IlvPosition align=IlvLeft) const =0
 Draws a string at the given position. 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 drawLine (const IlvPalette *palette, const IlvPoint &point1, const IlvPoint &point2) const =0
 Draws a line between 2 points. 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 drawPoint (const IlvPalette *palette, const IlvPoint &point) const =0
 Draws a point at the given position. 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, IlUInt count, const IlvPoint *points) const =0
 Draws a series of connected lines. More...
 
virtual void drawPolyLine (const IlvPalette *palette, const IlvPoint &first, IlUInt count, const IlvDeltaPoint *others) const
 Draws a series of connected lines relatively to a reference. More...
 
virtual void drawRectangle (const IlvPalette *palette, const IlvRect &rect) const
 Draws the given rectangle. 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 drawRoundRectangle (const IlvPalette *palette, const IlvRect &rect, IlUShort radius) const
 Draws a round rectangle. More...
 
virtual void drawSegments (const IlvPalette *palette, IlUInt count, const IlvPoint *from, const IlvPoint *to) const
 Draws a set of segments. 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 drawString (const IlvPalette *palette, const IlvPoint &position, const char *string, int length, IlvPosition align=IlvLeft) const =0
 Draws a string at the given position. More...
 
virtual void drawTransformedString (const IlvPalette *palette, const char *string, int length, const IlvTransformer &t, const IlvRegion *clip=0) const =0
 Draws a transformed string. More...
 
virtual void drawTransparentBitmap (const IlvPalette *palette, const IlvSystemPort *src, const IlvRect &from, const IlvPoint &to) const =0
 Draws a transparent bitmap. More...
 
virtual void end ()=0
 Closed the dump device. More...
 
virtual void fillArc (const IlvPalette *palette, const IlvRect &rect, IlFloat start, IlFloat range) const =0
 Fills the arc. More...
 
virtual void fillBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const
 Fills an area specified by a set of Bézier curves. More...
 
virtual void fillPaths (const IlvPalette *palette, IlUInt count, const IlvPointArray *pathArray) const
 Fills the shape defined by the given paths. More...
 
virtual void fillPolyLine (const IlvPalette *palette, IlUInt count, const IlvPoint *points, IlBoolean convex=IlFalse) const =0
 Fills a polygon. More...
 
virtual void fillPolyLine (const IlvPalette *palette, const IlvPoint &first, IlUInt count, const IlvDeltaPoint *others, IlBoolean convex=IlFalse) const
 Fills a polygon. More...
 
virtual void fillRectangle (const IlvPalette *palette, const IlvRect &rect) const
 Fills the given rectangle. More...
 
virtual void fillRoundRectangle (const IlvPalette *palette, const IlvRect &rect, IlUShort radius) const
 Fills a round rectangle. 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 initDevice (const char *filename, IlvRect *clip=0)=0
 Initializes the dump device. More...
 
virtual IlBoolean isABitmap () const
 Indicates that this port is a bitmap (not a view or a dump device). More...
 
virtual IlBoolean isADevice () const
 Indicates that this port is a dump device. More...
 
virtual IlBoolean isASystemPort () const
 Indicates that this port is a true system port (not a dump device). More...
 
virtual IlBoolean isBad () const =0
 Indicates whether this port is valid. More...
 
virtual IlBoolean newPage () const =0
 Produces an output page and prepares for a new page. More...
 
virtual void send (const char *string) const =0
 Sends character strings to an output 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...
 
virtual void setTransformer (const IlvTransformer &t)=0
 Applies another transformer to the coordinates provided for the drawing functions. More...
 
void size (IlvDim &w, IlvDim &h) const
 Gives the dimensions of the port. More...
 
virtual void stretchBitmap (const IlvPalette *palette, const IlvPoint &to, const IlvBitmap *src, const IlvTransformer &t, const IlvRect *clip=0) const =0
 Stretches a bitmap. More...
 
virtual void stretchBitmap (const IlvPalette *palette, const IlvRect &from, const IlvBitmap *src, const IlvRect *clip=0) const =0
 Stretches a bitmap. More...
 
virtual void stretchBitmapData (const IlvPalette *palette, const IlvBitmapData *src, const IlvRect &from, const IlvRect &to, IlBoolean opaque=IlFalse) const =0
 Draws a bitmap data. More...
 
virtual void stretchTransparentBitmap (const IlvPalette *palette, const IlvPoint &to, const IlvBitmap *src, const IlvTransformer &t, const IlvRect *clip=0) const =0
 Stretches a transparent bitmap. More...
 
virtual void stretchTransparentBitmap (const IlvPalette *palette, const IlvRect &from, const IlvBitmap *src, const IlvRect *clip=0) const =0
 Stretches a transparent bitmap. More...
 
IlvDim width () const
 Provides the width of the port. More...
 

Detailed Description

Port class.

Library: display

IlvPort draws the display in one of two ways. The first is physically, as a screen or a bitmap using a class such as IlvSystemPort. The second is in a dedicated zone, as a file or a printer using a class such as IlvPsDevice. This area represents the zone on the screen where the user will draw.

See Also
IlvAbstractView, IlvBitmap, IlvDisplay, IlvSystemPort.

Constructor & Destructor Documentation

IlvPort::IlvPort ( IlvDisplay display = 0)

Constructor.

This constructor initializes a new instance of the IlvPort class and provides null dimensions for the port.

Member Function Documentation

virtual void IlvPort::clearArea ( const IlvRect rect,
IlBoolean  reDraw = IlFalse 
) const
virtual

Clears a rectangular area of the screen.

Clears the rectangular area of the screen area specified in drawRect. The destination port cannot be a bitmap, since a bitmap object does not have a color value that defines its background.

Parameters
rectThe rectangular area to clear.
reDrawIf it has the value IlTrue a message is sent requesting that the area be redrawn.

Reimplemented in IlvSystemPort.

virtual void IlvPort::clearArea ( const IlvRegion region,
IlBoolean  reDraw = IlFalse 
) const
virtual

Clears a region of the screen.

Clears a region of the screen specified in region. The destination port cannot be a bitmap, since a bitmap object does not have a color value that defines its background.

Parameters
regionThe region to clear.
reDrawIf it has the value IlTrue a message is sent requesting that the area be redrawn.

Reimplemented in IlvSystemPort.

virtual void IlvPort::clip ( const IlvRect rect) const
pure virtual

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.

Implemented in IlvSystemPort, IlvWindowsVirtualDevice, and IlvPSDevice.

virtual void IlvPort::clip ( const IlvRegion region) const
pure virtual

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.

Implemented in IlvSystemPort, IlvWindowsVirtualDevice, and IlvPSDevice.

void IlvPort::composeAlpha ( IlvIntensity  alpha)

Composes the current alpha value of the port.

Parameters
alphaThe alpha value to be composed with the current alpha value of the port.
virtual void IlvPort::drawArc ( const IlvPalette palette,
const IlvRect rect,
IlFloat  start,
IlFloat  range 
) const
pure virtual

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.

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawArrow ( const IlvPalette palette,
const IlvPoint from,
const IlvPoint to,
IlFloat  position 
) const
virtual

Draws an arrow.

Draws an arrow on the line defined by from and to. In the image, the arrow starts at the from position, and moves towards 1.0, stopping at the value defined by position.

Parameters
paletteThe palette to use for the color of the arrow.
fromThe starting position of the line segment.
toThe ending position of the line segment.
positionThe location of the arrow along the segment.
virtual void IlvPort::drawBezier ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points 
) const
virtual

Draws a set of Bzier 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 in IlvPSDevice.

virtual void IlvPort::drawBitmap ( const IlvPalette palette,
const IlvSystemPort src,
const IlvRect from,
const IlvPoint to 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

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

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 in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawClosedBezier ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points 
) const
virtual

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 in IlvPSDevice.

virtual void IlvPort::drawILabel ( const IlvPalette palette,
const char *  label,
int  length,
const IlvRect drawRect,
const IlvRegion clip = 0,
IlvPosition  align = IlvCenter 
) const
virtual

Draws a label in a rectangle.

Similar to the member function drawLabel, but fills the label background with the palette background color. The drawing takes place in the clipping region specified in the clip parameter.

Parameters
paletteThe palette used for drawing.
labelThe string to draw.
lengthThe length of the string.
drawRectThe rectangle in which to draw the label.
clipThe clipping region.
alignSpecifies the alignment of the label.
virtual void IlvPort::drawIString ( const IlvPalette palette,
const IlvPoint position,
const char *  string,
int  length,
IlvPosition  align = IlvLeft 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawLabel ( const IlvPalette palette,
const char *  label,
int  length,
const IlvRect drawRect,
const IlvRegion clip = 0,
IlvPosition  align = IlvCenter 
) const
virtual

Draws a label in a rectangle.

Draws the string label in the rectangle drawRect respecting the alignment specified in the align parameter. The drawing takes place in the clipping region as called for in the clip parameter. The number of characters required to draw the rectangle is set in the length integer parameter. Instead of indicating a genuine length, you can supply a negative number such as -1. The text length is then computed internally, since string is thought of as a zero-terminated character array.

Parameters
paletteThe palette used for drawing.
labelThe string to draw.
lengthThe length of the string.
drawRectThe rectangle in which to draw the label.
clipThe clipping region.
alignSpecifies the alignment of the label.
virtual void IlvPort::drawLine ( const IlvPalette palette,
const IlvPoint point1,
const IlvPoint point2 
) const
pure virtual

Draws a line between 2 points.

Draws a line from the point point1 to the point point2.

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

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawMarker ( const IlvPalette palette,
const IlvPoint location,
IlvMarkerType  type = IlvMarkerSquare,
IlUShort  size = IlvDefaultMarkerSize 
) const
virtual

Draws a marker.

Draws a marker located at location with a size of size. The marker type is defined by type. See the IlvMarker class and the IlvDefaultMarkerSize constant for the values available for the parameter.

Parameters
paletteThe palette to use for the color of the marker.
locationThe location of the marker.
typeThe marker type.
sizeThe size of the marker, in pixels.
virtual void IlvPort::drawMnemonicLabel ( const IlvPalette palette,
const char *  label,
const IlvRect drawRect,
const IlvRegion clip = 0,
IlvPosition  align = IlvCenter,
IlBoolean  underline = IlTrue 
) const
virtual

Draws an underlined letter in a label.

An underlined letter in a word designates that this letter activates a special function key. This letter is preceded by a caret (^).

Parameters
paletteThe palette used for drawing.
labelThe string to draw.
drawRectThe rectangle in which to draw the label.
clipThe clipping region.
alignSpecifies the alignment of the label.
underlineSpecifies whether to underline the mnemonic character.
virtual void IlvPort::drawOutlineRectangle ( const IlvPalette outlinePalette,
const IlvPalette fillPalette,
const IlvRect rect,
const IlvRegion clip = 0 
) const
virtual

Draws a rectangle with border effects.

Draws a rectangle whose color is defined by the fillPalette parameter and whose borderline color is defined in outlinePalette.

Parameters
outlinePaletteThe palette to use for the color of the outline of the rectangle.
fillPaletteThe palette to use for the color of the rectangle.
rectThe size and position of the rectangle.
clipThe destination clip rectangle.
virtual void IlvPort::drawPaths ( const IlvPalette palette,
IlUInt  count,
const IlvPointArray paths 
) const
virtual

Draws an array of paths as polylines.

Via the palette palette, defines the path in the count using path elements found in the parameter paths. Each path in the array is drawn as a polyline.

Parameters
paletteThe palette used for drawing.
countThe number of paths in the array.
pathsThe array of paths.
See Also
IlvPointArray, IlvGraphicPath.
virtual void IlvPort::drawPoint ( const IlvPalette palette,
const IlvPoint point 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawPoints ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points 
) const
virtual

Draws a series of points.

Draws a series of points (that is, sets a group of pixels to a given color value). They are stored as an array of count points, whose address is indicated by the pointer points.

Parameters
paletteThe palette to use for the color of the point.
countThe number of points to draw.
pointsThe address of the points array.

Reimplemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawPolyLine ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawPolyLine ( const IlvPalette palette,
const IlvPoint first,
IlUInt  count,
const IlvDeltaPoint others 
) const
virtual

Draws a series of connected lines relatively to a reference.

Draws a series of connected lines that starts at the point called first and extends by means of relative positions which are given in the others array of count-1 delta values.

Parameters
paletteThe palette to use for the color of the line.
firstThe starting point of the polyline.
countThe number of points.
othersThe other points of the polyline.

Reimplemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawRectangle ( const IlvPalette palette,
const IlvRect rect 
) const
virtual

Draws the given rectangle.

Draws the rectangle specified by rect.

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

Reimplemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawReliefDiamond ( const IlvPalette ,
const IlvPalette invertedPalette,
const IlvPalette topShade,
const IlvPalette bottomShade,
const IlvRect bbox,
IlUShort  thickness,
const IlvRegion clip = 0 
) const
virtual

Draws a diamond with depth effects.

Draws a diamond with colored shadows on its borders, located inside the bbox diamond parameter. The foreground color of the invertedPalette parameter is used to fill the main rectangle. The foreground color of the topShade parameter is used to fill the top and the left shadow areas. The foreground color of the bottomShade parameter is used to fill the right and bottom shadow areas. The thickness of the shadows is specified in the thickness parameter.

Parameters
invertedPaletteThe palette used to fill the main rectangle.
topShadeThe palette used to fill the top and left sides of the shadow.
bottomShadeThe palette used to fill the right and bottom sides of the shadow.
bboxThe size and position of the rectangle.
thicknessThe thickness of the shadow.
clipThe destination clip rectangle.
virtual void IlvPort::drawReliefRectangle ( const IlvPalette palette,
const IlvPalette invertedPalette,
const IlvPalette topShade,
const IlvPalette bottomShade,
const IlvRect bbox,
IlUShort  thickness,
const IlvRegion clip = 0 
) const
virtual

Draws a filled rectangle with depth effects.

Draws a filled rectangle that has colored shadows on its borders (so it looks like a three-dimensional object) at the location specified in bbox. The foreground color of the invertedPalette parameter is used to fill the main rectangle. The foreground color of the topShade parameter is used to fill the top and the left shadow areas. The foreground color of the bottomShade parameter is used to fill the right and bottom shadow areas. The thickness of the shadows is specified in the thickness parameter.

Parameters
paletteThe palette used for drawing.
invertedPaletteThe palette to use for the fill color of the main rectangle.
topShadeThe palette used to fill the top and left sides of the shadow.
bottomShadeThe palette used to fill the right and bottom sides of the shadow.
bboxThe size and position of the rectangle.
thicknessThe thickness of the shadow.
clipThe destination clip rectangle.
virtual void IlvPort::drawRoundRectangle ( const IlvPalette palette,
const IlvRect rect,
IlUShort  radius 
) const
virtual

Draws a round rectangle.

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

Reimplemented in IlvSystemPort.

virtual void IlvPort::drawSegments ( const IlvPalette palette,
IlUInt  count,
const IlvPoint from,
const IlvPoint to 
) const
virtual

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 in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawShadowRectangle ( const IlvPalette palette,
const IlvPalette invertedPalette,
const IlvRect bbox,
IlUShort  thickness,
IlvPosition  shadowPosition,
const IlvRegion clip = 0 
) const
virtual

Draws a filled rectangle with its shadow.

Draws a filled rectangle with its shadow at the location specified in bbox. The foreground color of the invertedPalette parameter is used to draw the rectangle borders as well as the shadow. The thickness and position of the shadow are specified in the thickness and shadowPosition parameters.

Parameters
paletteThe palette to use for the fill color of the main rectangle.
invertedPaletteThe palette to use for the color of the rectangle borders and the shadow.
bboxThe location of the filled rectangle.
thicknessThe thickness of the shadow.
shadowPositionThe position of the shadow.
clipThe destination clip rectangle.
virtual void IlvPort::drawString ( const IlvPalette palette,
const IlvPoint position,
const char *  string,
int  length,
IlvPosition  align = IlvLeft 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawTransformedString ( const IlvPalette palette,
const char *  string,
int  length,
const IlvTransformer t,
const IlvRegion clip = 0 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::drawTransparentBitmap ( const IlvPalette palette,
const IlvSystemPort src,
const IlvRect from,
const IlvPoint to 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::end ( )
pure virtual

Closed the dump device.

Closes the dump device and does all the necessary cleaning.

Implemented in IlvSystemPort, IlvWindowsDevice, IlvWindowsVirtualDevice, and IlvPSDevice.

virtual void IlvPort::fillArc ( const IlvPalette palette,
const IlvRect rect,
IlFloat  start,
IlFloat  range 
) const
pure virtual

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.

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::fillBezier ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points 
) const
virtual

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 in IlvPSDevice.

virtual void IlvPort::fillPaths ( const IlvPalette palette,
IlUInt  count,
const IlvPointArray pathArray 
) const
virtual

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 in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::fillPolyLine ( const IlvPalette palette,
IlUInt  count,
const IlvPoint points,
IlBoolean  convex = IlFalse 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::fillPolyLine ( const IlvPalette palette,
const IlvPoint first,
IlUInt  count,
const IlvDeltaPoint others,
IlBoolean  convex = IlFalse 
) const
virtual

Fills a polygon.

Fills a polygon that is drawn as a series of connected lines that starts at the point whose reference is first, and extends by means of relative positions referred to as the array of others of count relative positions.
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.
firstThe starting point of the polyline.
countThe number of points.
othersThe other points of the polyline.
convexFlag for convex polygons.

Reimplemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::fillRectangle ( const IlvPalette palette,
const IlvRect rect 
) const
virtual

Fills the given rectangle.

Fills the rectangle specified by rect.

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

Reimplemented in IlvSystemPort, IlvPSDevice, and IlvWindowsVirtualDevice.

virtual void IlvPort::fillRoundRectangle ( const IlvPalette palette,
const IlvRect rect,
IlUShort  radius 
) const
virtual

Fills a round rectangle.

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

Reimplemented in IlvSystemPort.

IlvIntensity IlvPort::getAlpha ( ) const

Provides the alpha value of the port.

The default value is IlvFullIntensity.

Returns
The alpha value of the port.
IlvAntialiasingMode IlvPort::getAntialiasingMode ( ) const

Provides the anti-aliasing mode of the port.

The default value is IlvDefaultAntialiasingMode.

Returns
The anti-aliasing mode of the port.
IlvDisplay* IlvPort::getDisplay ( ) const

Returns a pointer to the IlvDisplay of this port.

Returns
A pointer to the IlvDisplay object for which this port is created.
IlvDim IlvPort::height ( ) const

Provides the height of the port.

Returns
The height of the port.
virtual IlBoolean IlvPort::initDevice ( const char *  filename,
IlvRect clip = 0 
)
pure virtual

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.

Implemented in IlvSystemPort, IlvWindowsDevice, IlvWindowsVirtualDevice, and IlvPSDevice.

virtual IlBoolean IlvPort::isABitmap ( ) const
virtual

Indicates that this port is a bitmap (not a view or a dump device).

The default implementation in class IlvPort returns IlFalse. The method is overriden in class IlvBitmap to return IlTrue.

Returns
IlTrue if the port is a bitmap, otherwise IlFalse.

Reimplemented in IlvBitmap, and IlvSystemPort.

virtual IlBoolean IlvPort::isADevice ( ) const
virtual

Indicates that this port is a dump device.

The default implementation in class IlvPort returns IlFalse. The method is overriden in class IlvPSDevice and in IlvWindowsVirtualDevice to return IlTrue.

Returns
IlTrue when the port is a dump device, otherwise IlFalse.

Reimplemented in IlvPSDevice, and IlvWindowsVirtualDevice.

virtual IlBoolean IlvPort::isASystemPort ( ) const
virtual

Indicates that this port is a true system port (not a dump device).

The default implementation in class IlvPort returns IlFalse. The method is overriden in class IlvSystemPort to return IlTrue.

Returns
IlTrue if this port is a true system port, otherwise IlFalse.

Reimplemented in IlvSystemPort.

virtual IlBoolean IlvPort::isBad ( ) const
pure virtual

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.

Implemented in IlvSystemPort, IlvWindowsVirtualDevice, and IlvPSDevice.

virtual IlBoolean IlvPort::newPage ( ) const
pure virtual

Produces an output page and prepares for a new page.

Produces an output page and prepares the dump device for a new page. If there has been an error, you should stop producing output data.

Returns
IlFalse if there has been an error.

Implemented in IlvSystemPort, IlvWindowsDevice, IlvWindowsVirtualDevice, and IlvPSDevice.

virtual void IlvPort::send ( const char *  string) const
pure virtual

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.

Implemented in IlvSystemPort, IlvWindowsDevice, and IlvPSDevice.

void IlvPort::setAlpha ( IlvIntensity  alpha)

Sets the alpha value of the port.

This value affects all the drawing operations that will take place in this port. Valid values are integers in the range 0 - IlvFullIntensity. A value of IlvFullIntensity means that the drawing will be opaque. A value of 0 means that the drawing will be transparent. Note that during a drawing operation, this alpha value is composed with the alpha value of the palette specified for the drawing operation.

Parameters
alphaThe new alpha value for the port.
void IlvPort::setAntialiasingMode ( IlvAntialiasingMode  mode)

Sets the anti-aliasing mode of the port.

Parameters
modeThe new anti-aliasing mode of the port.
virtual void IlvPort::setTransformer ( const IlvTransformer t)
pure virtual

Applies another transformer to the coordinates provided for the drawing functions.

Applies another transformer to the coordinates provided for the drawing functions.

Parameters
tThe transformer that is applied.

Implemented in IlvSystemPort, IlvContainer, IlvWindowsVirtualDevice, and IlvPSDevice.

void IlvPort::size ( IlvDim w,
IlvDim h 
) const

Gives the dimensions of the port.

Gives the horizontal (w) and vertical (h) dimensions of the port.

Parameters
wThe horizontal dimension of the port.
hThe vertical dimension of the port.
virtual void IlvPort::stretchBitmap ( const IlvPalette palette,
const IlvPoint to,
const IlvBitmap src,
const IlvTransformer t,
const IlvRect clip = 0 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::stretchBitmap ( const IlvPalette palette,
const IlvRect from,
const IlvBitmap src,
const IlvRect clip = 0 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::stretchBitmapData ( const IlvPalette palette,
const IlvBitmapData src,
const IlvRect from,
const IlvRect to,
IlBoolean  opaque = IlFalse 
) const
pure virtual

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).

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::stretchTransparentBitmap ( const IlvPalette palette,
const IlvPoint to,
const IlvBitmap src,
const IlvTransformer t,
const IlvRect clip = 0 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

virtual void IlvPort::stretchTransparentBitmap ( const IlvPalette palette,
const IlvRect from,
const IlvBitmap src,
const IlvRect clip = 0 
) const
pure virtual

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.

Implemented in IlvSystemPort, and IlvPSDevice.

IlvDim IlvPort::width ( ) const

Provides the width of the port.

Returns
The width of the port.

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.