lib Library API Documentation

KoWmfWrite Class Reference

KoWmfWrite allows to create a windows placeable meta file (WMF). More...

#include <kowmfwrite.h>

List of all members.

Public Member Functions

 KoWmfWrite (const QString &fileName)
bool begin ()
bool end ()
void save ()
void restore ()
void setDefaultDpi (int dpi)
void setFont (const QFont &f)
void setPen (const QPen &p)
void setBrush (const QBrush &b)
void setBackgroundColor (const QColor &r)
void setBackgroundMode (Qt::BGMode)
void setRasterOp (Qt::RasterOp)
void setWindow (int left, int top, int width, int height)
void setClipRegion (const QRegion &r)
void clipping (bool enable)
void moveTo (int left, int top)
void lineTo (int left, int top)
void drawRect (int left, int top, int width, int height)
void drawRoundRect (int left, int top, int width, int height, int=25, int=25)
void drawEllipse (int left, int top, int width, int height)
void drawArc (int left, int top, int width, int height, int a, int alen)
void drawPie (int left, int top, int width, int height, int a, int alen)
void drawChord (int left, int top, int width, int height, int a, int alen)
void drawPolyline (const QPointArray &pa)
void drawPolygon (const QPointArray &pa, bool winding=FALSE)
void drawPolyPolygon (QPtrList< QPointArray > &listPa, bool winding=FALSE)
void drawImage (int left, int top, const QImage &, int sx=0, int sy=0, int sw=-1, int sh=-1)
void drawText (int x, int y, int w, int h, int flags, const QString &s, double rotation)


Detailed Description

KoWmfWrite allows to create a windows placeable meta file (WMF).

Most of the functions are compatible with QPainter format.

sample of utilization:

   KoWmfWrite  wmf("/home/test.wmf");
   wmf.begin();
   wmf.setWindow(0, 0, 200, 200);
   wmf.drawRect(10, 20, 50, 120);
   wmf.end();
   

Definition at line 49 of file kowmfwrite.h.


Member Function Documentation

bool KoWmfWrite::begin  ) 
 

Open the file.

Returns true on success.

Definition at line 67 of file kowmfwrite.cc.

bool KoWmfWrite::end  ) 
 

Close the file.

Returns true on success.

Definition at line 98 of file kowmfwrite.cc.

References KoWmfReadPrivate::calcCheckSum().

void KoWmfWrite::setDefaultDpi int  dpi  ) 
 

Placeable WMF's use logical coordinates and have a default DPI.

This function set the dot per inch ratio. If not specified the dpi is 1024.

Definition at line 59 of file kowmfwrite.cc.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:41:51 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003