Wt::WVmlImage Class Reference
[Painting system]

A paint device for rendering using the VML pseudo-standard. More...

#include <Wt/WVmlImage>

Inheritance diagram for Wt::WVmlImage:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 WVmlImage (const WLength &width, const WLength &height)
 Create a VML paint device.
virtual void setChanged (WFlags< ChangeFlag > flags)
 Indicate changes in painter state.
virtual void drawArc (const WRectF &rect, double startAngle, double spanAngle)
 Draw an arc.
virtual void drawImage (const WRectF &rect, const std::string &imgUri, int imgWidth, int imgHeight, const WRectF &sourceRect)
 Draw an image.
virtual void drawLine (double x1, double y1, double x2, double y2)
 Draw a line.
virtual void drawPath (const WPainterPath &path)
 Draw a path.
virtual void drawText (const WRectF &rect, WFlags< AlignmentFlag > flags, const WString &text)
 Draw text.
virtual void init ()
 Initialize the device for painting.
virtual void done ()
 Finish painting on the device.
virtual bool paintActive () const
 Return whether painting is active.
virtual WLength width () const
 Returns the device width.
virtual WLength height () const
 Returns the device height.

Protected Member Functions

virtual WPainterpainter () const
 Return the painter that is currently painting on the device.
virtual void setPainter (WPainter *painter)
 Set the painter.


Detailed Description

A paint device for rendering using the VML pseudo-standard.

The WVmlImage is used by WPaintedWidget to render to the browser using the Vector Markup Language (VML) (to support graphics on Internet Explorer browsers).

Note:
The current implementation has only limited support for clipping: only rectangular areas aligned with the X/Y axes can be used as clipping path.

Member Function Documentation

void Wt::WVmlImage::setChanged ( WFlags< ChangeFlag flags  )  [virtual]

Indicate changes in painter state.

The flags argument is the logical OR of one or more change flags.

See also:
ChangeFlags

Implements Wt::WPaintDevice.

void Wt::WVmlImage::drawArc ( const WRectF rect,
double  startAngle,
double  spanAngle 
) [virtual]

Draw an arc.

The arc is defined as in WPainter::drawArc(const WRectF&, startAngle, spanAngle), but the angle is expressed in degrees.

The arc must be stroked, filled, and transformed using the current painter settings.

Implements Wt::WPaintDevice.

void Wt::WVmlImage::drawImage ( const WRectF rect,
const std::string &  imageUri,
int  imgWidth,
int  imgHeight,
const WRectF sourceRect 
) [virtual]

Draw an image.

Draws sourceRect from the image with URL imageUri and original dimensions imgWidth and imgHeight to the location, into the rectangle defined by rect.

The image is transformed using the current painter settings.

Implements Wt::WPaintDevice.

void Wt::WVmlImage::drawLine ( double  x1,
double  y1,
double  x2,
double  y2 
) [virtual]

Draw a line.

The line must be stroked and transformed using the current painter settings.

Implements Wt::WPaintDevice.

void Wt::WVmlImage::drawPath ( const WPainterPath path  )  [virtual]

Draw a path.

The path must be stroked, filled, and transformed using the current painter settings.

Implements Wt::WPaintDevice.

void Wt::WVmlImage::drawText ( const WRectF rect,
WFlags< AlignmentFlag flags,
const WString text 
) [virtual]

Draw text.

The text must be rendered, stroked and transformed using the current painter settings.

Implements Wt::WPaintDevice.

void Wt::WVmlImage::init (  )  [virtual]

Initialize the device for painting.

This method is called when a WPainter starts painting.

See also:
WPainter::begin(WPaintDevice *), painter()

Implements Wt::WPaintDevice.

void Wt::WVmlImage::done (  )  [virtual]

Finish painting on the device.

This method is called when a WPainter stopped painting.

See also:
WPainter::end()

Implements Wt::WPaintDevice.

virtual bool Wt::WVmlImage::paintActive (  )  const [inline, virtual]

Return whether painting is active.

See also:
init(), painter()

Implements Wt::WPaintDevice.

virtual WLength Wt::WVmlImage::width (  )  const [inline, virtual]

Returns the device width.

The device width, in pixels, establishes the width of the device coordinate system.

Implements Wt::WPaintDevice.

virtual WLength Wt::WVmlImage::height (  )  const [inline, virtual]

Returns the device height.

The device height, in pixels, establishes the height of the device coordinate system.

Implements Wt::WPaintDevice.

virtual WPainter* Wt::WVmlImage::painter (  )  const [inline, protected, virtual]

Return the painter that is currently painting on the device.

See also:
init()

Implements Wt::WPaintDevice.


Generated on Mon Mar 9 08:27:52 2009 for Wt by doxygen 1.5.6