rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvWindowsVirtualDevice Class Reference

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

#include <ilviews/windows/dump.h>

Inheritance diagram for IlvWindowsVirtualDevice:
IlvSystemPort IlvPort IlvWindowsDevice

List of all members.

Public Member Functions

virtual void clip (const IlvRegion *) const
 Limits the drawing to the given region.
virtual void clip (const IlvRect *) const
 Limits the drawing to the given rectangular area.
virtual void end ()
 Ends the dump devices.
virtual void fillRectangle (const IlvPalette *palette, const IlvRect &rect) const
 Fills the given rectangle.
IlUInt getCompatibility () const
 Gets the compatible version of the dump device.
HDC getHDC () const
 Gets the Windows HDC (Handle Device Context).
int getMapMode () const
 Gets the mapping mode.
virtual IlBoolean initDevice (const char *, IlvRect *=0)
 Initializes the dump device.
virtual IlBoolean isADevice () const
 Queries the nature of this port.
virtual IlBoolean isBad () const
 Indicates whether this port is valid.
virtual IlBoolean newPage () const
 Produces an output page and prepares for a new page.
void setCompatibility (IlUInt version)
 Sets compatible version of the dump device.
void setHDC (HDC hdc)
 Sets the Windows HDC (Handle Device Context).
void setMapMode (int mode)
 Sets the mapping mode.
virtual void setTransformer (const IlvTransformer &)
 Applies another transformer to the coordinates provided for the drawing functions.

Detailed Description

Windows-specific class to predefine devices.

Library: display

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

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:
region The drawing region.

Reimplemented from IlvSystemPort.

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:
rect The drawing rectangle.

Reimplemented from IlvSystemPort.

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.

virtual void IlvWindowsVirtualDevice::fillRectangle ( const IlvPalette palette,
const IlvRect rect 
) const [virtual]

Fills the given rectangle.

Fills the rectangle specified by rect.

Parameters:
palette The palette to use for the fill color of the rectangle.
rect The rectangle to fill.

Reimplemented from IlvSystemPort.

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.
HDC IlvWindowsVirtualDevice::getHDC (  )  const

Gets the Windows HDC (Handle Device Context).

Returns:
The HDC handle associated with the object.
int IlvWindowsVirtualDevice::getMapMode (  )  const

Gets the mapping mode.

Returns:
The current mapping mode of the Windows device.
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:
filename Is usually used to indicate the output filename of the dump.
clip The clipping rectangle to be used when drawing.

Reimplemented from IlvSystemPort.

Reimplemented in IlvWindowsDevice.

virtual IlBoolean IlvWindowsVirtualDevice::isADevice (  )  const [virtual]

Queries the nature of this port.

Returns:
Always IlTrue.

Reimplemented from IlvPort.

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.

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.

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:
version The version to set.
void IlvWindowsVirtualDevice::setHDC ( HDC  hdc  ) 

Sets the Windows HDC (Handle Device Context).

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

Parameters:
hdc The HDC handle to associate with the object.
void IlvWindowsVirtualDevice::setMapMode ( int  mode  ) 

Sets the mapping mode.

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

Parameters:
mode The mapping mode to be set.
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:
t The transformer that is applied.

Reimplemented from IlvSystemPort.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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