Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvWindowsVirtualDevice Class Reference

Windows-specific class to predefine devices. More...

#include <ilviews/windows/dump.h>

Inheritance diagram for IlvWindowsVirtualDevice:
IlvSystemPort IlvPort IlvValueInterface IlvWindowsDevice

Public Member Functions

virtual void clip (const IlvRect *) const
 Limits the drawing to the given rectangular area. More...
 
virtual void clip (const IlvRegion *) const
 Limits the drawing to the given region. More...
 
virtual void end ()
 Ends the dump devices. More...
 
virtual void fillRectangle (const IlvPalette *palette, const IlvRect &rect) const
 Fills the given rectangle. More...
 
IlUInt getCompatibility () const
 Gets the compatible version of the dump device. More...
 
HDC getHDC () const
 Gets the Windows HDC (Handle Device Context). More...
 
int getMapMode () const
 Gets the mapping mode. More...
 
virtual IlBoolean initDevice (const char *, IlvRect *=0)
 Initializes the dump device. More...
 
virtual IlBoolean isADevice () const
 Queries the nature of this port. More...
 
virtual IlBoolean isBad () const
 Indicates whether this port is valid. More...
 
virtual IlBoolean newPage () const
 Produces an output page and prepares for a new page. More...
 
void setCompatibility (IlUInt version)
 Sets compatible version of the dump device. More...
 
void setHDC (HDC hdc)
 Sets the Windows HDC (Handle Device Context). More...
 
void setMapMode (int mode)
 Sets the mapping mode. More...
 
virtual void setTransformer (const IlvTransformer &)
 Applies another transformer to the coordinates provided for the drawing functions. More...
 
- Public Member Functions inherited from IlvSystemPort
 IlvSystemPort (IlvDisplay *display, IlvWindowsHandle HDC, IlvDim width=0, IlvDim height=0)
 Windows-specific constructor. More...
 
virtual IlBoolean applyValue (const IlvValue &)
 Apply an accessor. More...
 
virtual void clearArea (const IlvRect &, IlBoolean=IlFalse) const
 Clears a rectangular area of the screen. More...
 
virtual void clearArea (const IlvRegion &, IlBoolean=IlFalse) const
 Clears a region of the screen. More...
 
virtual IlUShort depth () const
 Gives the depth of the port. More...
 
virtual void drawArc (const IlvPalette *, const IlvRect &, IlFloat, IlFloat) const
 Draws an arc. More...
 
virtual void drawBitmap (const IlvPalette *, const IlvSystemPort *, const IlvRect &, const IlvPoint &) const
 Draws an image. More...
 
virtual void drawBitmap (const IlvPalette *, const IlvBitmap *, const IlvRect &, const IlvRegion *=0, IlvPosition=IlvCenter, IlBoolean=IlFalse) const
 Draws an image. More...
 
virtual void drawIString (const IlvPalette *, const IlvPoint &, const char *, int, IlvPosition=IlvLeft) const
 Draws a string at the given position. More...
 
virtual void drawLine (const IlvPalette *, const IlvPoint &, const IlvPoint &) const
 Draws a line between 2 points. More...
 
virtual void drawPoint (const IlvPalette *, const IlvPoint &) const
 Draws a point at the given position. More...
 
virtual void drawPoints (const IlvPalette *, IlUInt, const IlvPoint *) const
 Draws a series of points. More...
 
virtual void drawPolyLine (const IlvPalette *, IlUInt, const IlvPoint *) const
 Draws a series of connected lines. More...
 
virtual void drawPolyLine (const IlvPalette *, const IlvPoint &, IlUInt, const IlvDeltaPoint *) const
 Draws a series of connected lines relatively to a reference. More...
 
virtual void drawRectangle (const IlvPalette *, const IlvRect &) const
 Draws the given rectangle. More...
 
virtual void drawRoundRectangle (const IlvPalette *, const IlvRect &, IlUShort) const
 Draws a round rectangle. More...
 
virtual void drawSegments (const IlvPalette *, IlUInt, const IlvPoint *, const IlvPoint *) const
 Draws a set of segments. More...
 
virtual void drawString (const IlvPalette *, const IlvPoint &, const char *, int, IlvPosition=IlvLeft) const
 Draws a string at the given position. More...
 
virtual void drawTransformedString (const IlvPalette *, const char *, int, const IlvTransformer &, const IlvRegion *=0) const
 Draws a transformed string. More...
 
virtual void drawTransparentBitmap (const IlvPalette *, const IlvSystemPort *, const IlvRect &, const IlvPoint &) const
 Draws a transparent bitmap. More...
 
virtual void fillArc (const IlvPalette *, const IlvRect &, IlFloat, IlFloat) const
 Fills the arc. More...
 
virtual void fillPaths (const IlvPalette *, IlUInt, const IlvPointArray *) const
 Fills the shape defined by the given paths. More...
 
virtual void fillPolyLine (const IlvPalette *, IlUInt, const IlvPoint *, IlBoolean=IlFalse) const
 Fills a polygon. More...
 
virtual void fillPolyLine (const IlvPalette *, const IlvPoint &, IlUInt, const IlvDeltaPoint *, IlBoolean=IlFalse) const
 Fills a polygon. More...
 
virtual void fillRoundRectangle (const IlvPalette *, const IlvRect &, IlUShort) const
 Fills a round rectangle. More...
 
IlvWindowsHandle getDC () const
 Gets the Windows Handle Device Context. 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 releaseDC ()
 Releases the Windows Handle Device Context. More...
 
virtual void send (const char *) const
 Sends character strings to an output device. More...
 
virtual void stretchBitmap (const IlvPalette *, const IlvPoint &, const IlvBitmap *, const IlvTransformer &, const IlvRect *=0) const
 Stretches a bitmap. More...
 
virtual void stretchBitmap (const IlvPalette *, const IlvRect &, const IlvBitmap *, const IlvRect *=0) const
 Stretches a bitmap. More...
 
virtual void stretchBitmapData (const IlvPalette *palette, const IlvBitmapData *src, const IlvRect &from, const IlvRect &to, IlBoolean opaque=IlFalse) const
 Draws a bitmap data. More...
 
virtual void stretchTransparentBitmap (const IlvPalette *, const IlvPoint &, const IlvBitmap *, const IlvTransformer &, const IlvRect *=0) const
 Stretches a transparent bitmap. More...
 
virtual void stretchTransparentBitmap (const IlvPalette *, const IlvRect &, const IlvBitmap *, const IlvRect *=0) const
 Stretches a transparent bitmap. More...
 
- Public Member Functions inherited from IlvPort
 IlvPort (IlvDisplay *display=0)
 Constructor. 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 drawBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const
 Draws a set of Bézier curves. 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 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 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 fillBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const
 Fills an area specified by a set of Bézier curves. 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...
 
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 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvSystemPort
static IlvBitmapDataGetBitmapData (IlvSystemPort *port, const IlvRect *rect=0)
 Creates an IlvBitmapData from a rectangular area in an IlvSystemPort. More...
 

Detailed Description

Windows-specific class to predefine devices.

Library: xviews or winviews or mviews (mutually exclusive)

This class defines devices that are specific to Windows. The drawing methods of the superclass (IlvSystemPort) are used without modification.
Since the IlvPort::setTransformer() method is directly built on the Windows API that is common to Windows NT and Windows 95/98/Me, it is not possible to apply transformations other than translations or scalings. Other types of transformation should be applied when the draw() method is called for the device. Note that since precision is better on the Windows device, it can be interesting to use two transformations: one that is applied to the device and that only contains translation or scaling factors and the other one that is applied when draw() is invoked.

Member Function Documentation

§ clip() [1/2]

virtual void IlvWindowsVirtualDevice::clip ( const IlvRect rect) const
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.

Reimplemented from IlvSystemPort.

§ clip() [2/2]

virtual void IlvWindowsVirtualDevice::clip ( const IlvRegion region) const
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.

Reimplemented from IlvSystemPort.

§ end()

virtual void IlvWindowsVirtualDevice::end ( )
virtual

Ends the dump devices.

This member function closes the dump devices and does all the necessary cleaning operations. If you redefine this function in subclasses, do the following:

  • Call the method end() of the superclass.
  • Remove and destroy the specific data.

Reimplemented from IlvSystemPort.

Reimplemented in IlvWindowsDevice.

§ fillRectangle()

virtual void IlvWindowsVirtualDevice::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 from IlvSystemPort.

§ getCompatibility()

IlUInt IlvWindowsVirtualDevice::getCompatibility ( ) const

Gets the compatible version of the dump device.

Returns
The current version with which the dump device is compatible. The default value is 220 (corresponding to version 2.2). This insures that the computation of the transformers is coherent with the PSDump. If this value is strictly less than 220, then it is compatible with version 2.1.

§ getHDC()

HDC IlvWindowsVirtualDevice::getHDC ( ) const

Gets the Windows HDC (Handle Device Context).

Returns
The HDC handle associated with the object.

§ getMapMode()

int IlvWindowsVirtualDevice::getMapMode ( ) const

Gets the mapping mode.

Returns
The current mapping mode of the Windows device.

§ initDevice()

virtual IlBoolean IlvWindowsVirtualDevice::initDevice ( const char *  filename,
IlvRect clip = 0 
)
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.

Reimplemented from IlvSystemPort.

Reimplemented in IlvWindowsDevice.

§ isADevice()

virtual IlBoolean IlvWindowsVirtualDevice::isADevice ( ) const
virtual

Queries the nature of this port.

Returns
Always IlTrue.

Reimplemented from IlvPort.

§ isBad()

virtual IlBoolean IlvWindowsVirtualDevice::isBad ( ) const
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.

Reimplemented from IlvSystemPort.

§ newPage()

virtual IlBoolean IlvWindowsVirtualDevice::newPage ( ) const
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.

Reimplemented from IlvSystemPort.

Reimplemented in IlvWindowsDevice.

§ setCompatibility()

void IlvWindowsVirtualDevice::setCompatibility ( IlUInt  version)

Sets compatible version of the dump device.

Sets version as the new version with which the dump device is compatible.

Parameters
versionThe version to set.

§ setHDC()

void IlvWindowsVirtualDevice::setHDC ( HDC  hdc)

Sets the Windows HDC (Handle Device Context).

Sets the hdc parameter as the HDC attribute of the object.

Parameters
hdcThe HDC handle to associate with the object.

§ setMapMode()

void IlvWindowsVirtualDevice::setMapMode ( int  mode)

Sets the mapping mode.

Sets mode as the new mapping mode of the Windows device.

Parameters
modeThe mapping mode to be set.

§ setTransformer()

virtual void IlvWindowsVirtualDevice::setTransformer ( const IlvTransformer t)
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.

Reimplemented from IlvSystemPort.


© Copyright 2017, 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.