<class name="QPaintEngine" doc="/** <p>The <a href="QPaintEngine.html#QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures)"><tt>QPaintEngine</tt></a> class provides an abstract definition of how <a href="QPainter.html"><tt>QPainter</tt></a> draws to a given device on a given platform.</p> <p>Qt 4.0 provides several premade implementations of <a href="QPaintEngine.html#QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures)"><tt>QPaintEngine</tt></a> for the different painter backends we support. We provide one paint engine for each window system and painting framework we support. This includes X11 on Unix/Linux and <a href="QPaintEngine.html#Type-enum"><tt>CoreGraphics</tt></a> on Mac OS X. In addition we provide <a href="QPaintEngine.html#QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures)"><tt>QPaintEngine</tt></a> implementations for <a href="QPaintEngine.html#Type-enum"><tt>OpenGL</tt></a> (accessible through <a href="%2E%2E/opengl/QGLWidget.html"><tt>QGLWidget</tt></a>) and <a href="QPaintEngine.html#Type-enum"><tt>PostScript</tt></a> (accessible through QPSPrinter on X11). Additionally there is a raster-based paint engine that is a fallback for when an engine does not support a certain capability.</p> <p>If one wants to use <a href="QPainter.html"><tt>QPainter</tt></a> to draw to a different backend, one must subclass <a href="QPaintEngine.html#QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures)"><tt>QPaintEngine</tt></a> and reimplement all its virtual functions. The <a href="QPaintEngine.html#QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures)"><tt>QPaintEngine</tt></a> implementation is then made available by subclassing <a href="QPaintDevice.html"><tt>QPaintDevice</tt></a> and reimplementing the virtual function QPaintDevice::paintEngine().</p> <p><a href="QPaintEngine.html#QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures)"><tt>QPaintEngine</tt></a> is created and owned by the <a href="QPaintDevice.html"><tt>QPaintDevice</tt></a> that created it.</p> <p>The big advantage of the <a href="QPaintEngine.html#QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures)"><tt>QPaintEngine</tt></a> approach opposed to Qt 3's <a href="QPainter.html"><tt>QPainter</tt></a>/QPaintDevice::cmd() approach is that it is now possible to adapt to multiple technologies on each platform and take advantage of each to the fullest.</p> @see <a href="QPainter.html"><tt>QPainter</tt></a> @see <tt>QPaintDevice::paintEngine</tt> @see <a href="%2E%2E/paintsystem.html">The Paint System</tt></a> */"> <method name="public QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures features)" doc="/** <p>Creates a paint engine with the featureset specified by <tt>features</tt>.</p> */"/> <method name="public QPaintEngine()" doc="/** <p>Equivalent to <a href="QPaintEngine.html#QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures)"><tt>QPaintEngine</tt></a>(0). */"/> <method name="public final void clearDirty(com.trolltech.qt.gui.QPaintEngine.DirtyFlags df)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public final boolean hasFeature(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures feature)" doc="/** <p>Returns true if the paint engine supports the specified <tt>feature</tt>; otherwise returns false.</p> */"/> <method name="public final boolean isActive()" doc="/** <p>Returns true if the paint engine is actively drawing; otherwise returns false.</p> @see <a href="QPaintEngine.html#setActive(boolean)"><tt>setActive</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QPaintDeviceInterface paintDevice()" doc="/** <p>Returns the device that this engine is painting on, if painting is active; otherwise returns 0.</p> */"/> <method name="public final com.trolltech.qt.gui.QPainter painter()" doc="/** <p>Returns the paint engine's painter.</p> */"/> <method name="public final void setActive(boolean newState)" doc="/** <p>Sets the active state of the paint engine to <tt>newState</tt>.</p> @see <a href="QPaintEngine.html#active()"><tt>active</tt></a> @see <a href="QPaintEngine.html#isActive()"><tt>isActive</tt></a> */"/> <method name="public final void setDirty(com.trolltech.qt.gui.QPaintEngine.DirtyFlags df)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public final void setSystemClip(com.trolltech.qt.gui.QRegion baseClip)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QPaintEngine.html#systemClip()"><tt>systemClip</tt></a> */"/> <method name="public final void setSystemRect(com.trolltech.qt.core.QRect rect)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QPaintEngine.html#systemRect()"><tt>systemRect</tt></a> */"/> <method name="public final void syncState()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public final com.trolltech.qt.gui.QRegion systemClip()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QPaintEngine.html#setSystemClip(com.trolltech.qt.gui.QRegion)"><tt>setSystemClip</tt></a> */"/> <method name="public final com.trolltech.qt.core.QRect systemRect()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> @see <a href="QPaintEngine.html#setSystemRect(com.trolltech.qt.core.QRect)"><tt>setSystemRect</tt></a> */"/> <method name="public final boolean testDirty(com.trolltech.qt.gui.QPaintEngine.DirtyFlags df)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public abstract boolean begin(com.trolltech.qt.gui.QPaintDeviceInterface pdev)" doc="/** <p>Reimplement this function to initialise your paint engine when painting is to start on the paint device <tt>pdev</tt>. Return true if the initialization was successful; otherwise return false.</p> @see <a href="QPaintEngine.html#end()"><tt>end</tt></a> @see <a href="QPaintEngine.html#isActive()"><tt>isActive</tt></a> */"/> <method name="public com.trolltech.qt.core.QPoint coordinateOffset()" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public void drawEllipse(com.trolltech.qt.core.QRect r)" doc="/** <p>The default implementation of this function calls the floating point version of this function</p> */"/> <method name="public void drawEllipse(com.trolltech.qt.core.QRectF r)" doc="/** <p>Reimplement this function to draw the largest ellipse that can be contained within rectangle <tt>r</tt>.</p> <p>The default implementation calls <a href="QPaintEngine.html#drawPolygon(com.trolltech.qt.core.QPointF[], com.trolltech.qt.gui.QPaintEngine.PolygonDrawMode)"><tt>drawPolygon</tt></a>.</p> */"/> <method name="public void drawImage(com.trolltech.qt.core.QRectF r, com.trolltech.qt.gui.QImage pm, com.trolltech.qt.core.QRectF sr, com.trolltech.qt.core.Qt.ImageConversionFlags flags)" doc="/** <p>Reimplement this function to draw the part of the <tt>pm</tt> specified by the <tt>sr</tt> rectangle in the given <tt>r</tt> using the given conversion flags <tt>flags</tt>, to convert it to a pixmap.</p> */"/> <method name="public final void drawImage(com.trolltech.qt.core.QRectF r, com.trolltech.qt.gui.QImage pm, com.trolltech.qt.core.QRectF sr)" doc="/** <p>Equivalent to <a href="QPaintEngine.html#drawImage(com.trolltech.qt.core.QRectF, com.trolltech.qt.gui.QImage, com.trolltech.qt.core.QRectF, com.trolltech.qt.core.Qt.ImageConversionFlags)"><tt>drawImage</tt></a>(<tt>r</tt>, <tt>pm</tt>, <tt>sr</tt>, Qt::AutoColor). */"/> <method name="public void drawLines(com.trolltech.qt.gui.QLineF[] lines)" doc="/** <p>Equivalent to <a href="QPaintEngine.html#drawLines(com.trolltech.qt.gui.QLineF[])"><tt>drawLines</tt></a>(<tt>lines</tt>, ). */"/> <method name="public void drawLines(com.trolltech.qt.gui.QLine[] lines)" doc="/** <p>Equivalent to <a href="QPaintEngine.html#drawLines(com.trolltech.qt.gui.QLineF[])"><tt>drawLines</tt></a>(<tt>lines</tt>, ). */"/> <method name="public void drawPath(com.trolltech.qt.gui.QPainterPath path)" doc="/** <p>The default implementation ignores the <tt>path</tt> and does nothing.</p> */"/> <method name="public abstract void drawPixmap(com.trolltech.qt.core.QRectF r, com.trolltech.qt.gui.QPixmap pm, com.trolltech.qt.core.QRectF sr)" doc="/** <p>Reimplement this function to draw the part of the <tt>pm</tt> specified by the <tt>sr</tt> rectangle in the given <tt>r</tt>.</p> */"/> <method name="public void drawPoints(com.trolltech.qt.core.QPointF[] points)" doc="/** <p>Equivalent to <a href="QPaintEngine.html#drawPoints(com.trolltech.qt.core.QPointF[])"><tt>drawPoints</tt></a>(<tt>points</tt>, ). */"/> <method name="public void drawPoints(com.trolltech.qt.core.QPoint[] points)" doc="/** <p>Equivalent to <a href="QPaintEngine.html#drawPoints(com.trolltech.qt.core.QPointF[])"><tt>drawPoints</tt></a>(<tt>points</tt>, ). */"/> <method name="public void drawPolygon(com.trolltech.qt.core.QPointF[] points, com.trolltech.qt.gui.QPaintEngine.PolygonDrawMode mode)" doc="/** <p>Equivalent to <a href="QPaintEngine.html#drawPolygon(com.trolltech.qt.core.QPointF[], com.trolltech.qt.gui.QPaintEngine.PolygonDrawMode)"><tt>drawPolygon</tt></a>(<tt>points</tt>, <tt>mode</tt>, ). */"/> <method name="public void drawPolygon(com.trolltech.qt.core.QPoint[] points, com.trolltech.qt.gui.QPaintEngine.PolygonDrawMode mode)" doc="/** <p>Equivalent to <a href="QPaintEngine.html#drawPolygon(com.trolltech.qt.core.QPointF[], com.trolltech.qt.gui.QPaintEngine.PolygonDrawMode)"><tt>drawPolygon</tt></a>(<tt>points</tt>, <tt>mode</tt>, ). */"/> <method name="public void drawRects(com.trolltech.qt.core.QRect[] rects)" doc="/** <p>Equivalent to <a href="QPaintEngine.html#drawRects(com.trolltech.qt.core.QRect[])"><tt>drawRects</tt></a>(<tt>rects</tt>, ). */"/> <method name="public void drawRects(com.trolltech.qt.core.QRectF[] rects)" doc="/** <p>Equivalent to <a href="QPaintEngine.html#drawRects(com.trolltech.qt.core.QRect[])"><tt>drawRects</tt></a>(<tt>rects</tt>, ). */"/> <method name="public void drawTextItem(com.trolltech.qt.core.QPointF p, com.trolltech.qt.gui.QTextItem textItem)" doc="/** <p>This function draws the text item <tt>textItem</tt> at position <tt>p</tt>. The default implementation of this function converts the text to a <a href="QPainterPath.html"><tt>QPainterPath</tt></a> and paints the resulting path.</p> */"/> <method name="public void drawTiledPixmap(com.trolltech.qt.core.QRectF r, com.trolltech.qt.gui.QPixmap pixmap, com.trolltech.qt.core.QPointF s)" doc="/** <p>Reimplement this function to draw the <tt>pixmap</tt> in the given <tt>r</tt>, starting at the given <tt>s</tt>. The pixmap will be drawn repeatedly until the <tt>r</tt> is filled.</p> */"/> <method name="public abstract boolean end()" doc="/** <p>Reimplement this function to finish painting on the current paint device. Return true if painting was finished successfully; otherwise return false.</p> @see <a href="QPaintEngine.html#begin(com.trolltech.qt.gui.QPaintDeviceInterface)"><tt>begin</tt></a> @see <a href="QPaintEngine.html#isActive()"><tt>isActive</tt></a> */"/> <method name="public abstract com.trolltech.qt.gui.QPaintEngine.Type type()" doc="/** <p>Reimplement this function to return the paint engine <a href="QPaintEngine.html#Type-enum">Type</tt></a>.</p> */"/> <method name="public abstract void updateState(com.trolltech.qt.gui.QPaintEngineState state)" doc="/** <p>Reimplement this function to update the state of a paint engine.</p> <p>When implemented, this function is responsible for checking the paint engine's current <tt>state</tt> and update the properties that are changed. Use the QPaintEngineState::state() function to find out which properties that must be updated, then use the corresponding <a href="QPaintEngineState.html#getfunction">get function</tt></a> to retrieve the current values for the given properties.</p> @see <a href="QPaintEngineState.html"><tt>QPaintEngineState</tt></a> */"/> <enum name="PolygonDrawMode"> <enum-value name="OddEvenMode" doc="/** <p>The polygon should be drawn using OddEven fill rule.</p> */"/> <enum-value name="WindingMode" doc="/** <p>The polygon should be drawn using Winding fill rule.</p> */"/> <enum-value name="ConvexMode" doc="/** <p>The polygon is a convex polygon and can be drawn using specialized algorithms where available.</p> */"/> <enum-value name="PolylineMode" doc="/** <p>Only the outline of the polygon should be drawn.</p> */"/> </enum> <enum name="Type"> <enum-value name="X11" doc="/** Internal. */"/> <enum-value name="Windows" doc="/** Internal. */"/> <enum-value name="QuickDraw" doc="/** <p>Mac OS X's <a href="QPaintEngine.html#Type-enum"><tt>QuickDraw</tt></a></p> */"/> <enum-value name="CoreGraphics" doc="/** <p>Mac OS X's Quartz2D (<a href="QPaintEngine.html#Type-enum"><tt>CoreGraphics</tt></a>)</p> */"/> <enum-value name="MacPrinter" doc="/** Internal. */"/> <enum-value name="QWindowSystem" doc="/** <p>Qtopia Core</p> */"/> <enum-value name="PostScript" doc="/** Internal. */"/> <enum-value name="OpenGL" doc="/** Internal. */"/> <enum-value name="Picture" doc="/** <p><a href="QPicture.html"><tt>QPicture</tt></a> format</p> */"/> <enum-value name="SVG" doc="/** <p>Scalable Vector Graphics XML format</p> */"/> <enum-value name="Raster" doc="/** Internal. */"/> <enum-value name="Direct3D" doc="/** <p>Windows only, <a href="QPaintEngine.html#Type-enum"><tt>Direct3D</tt></a> based engine</p> */"/> <enum-value name="User" doc="/** <p>First user type ID</p> */"/> <enum-value name="MaxUser" doc="/** <p>Last user type ID</p> */"/> </enum> <enum name="PaintEngineFeature" doc="/** <p>This enum is used to describe the features or capabilities that the paint engine has. If a feature is not supported by the engine, <a href="QPainter.html"><tt>QPainter</tt></a> will do a best effort to emulate that feature through other means and pass on an alpha blended <a href="QImage.html"><tt>QImage</tt></a> to the engine with the emulated results. Some features cannot be emulated: <a href="QPaintEngine.html#PaintEngineFeature-enum"><tt>AlphaBlend</tt></a> and <a href="QPaintEngine.html#PaintEngineFeature-enum"><tt>PorterDuff</tt></a>.</p> */"> <enum-value name="PrimitiveTransform" doc="/** <p>The engine has support for transforming drawing primitives.</p> */"/> <enum-value name="PatternTransform" doc="/** <p>The engine has support for transforming brush patterns.</p> */"/> <enum-value name="PixmapTransform" doc="/** <p>The engine can transform pixmaps, including rotation and shearing.</p> */"/> <enum-value name="PatternBrush" doc="/** <p>The engine is capable of rendering brushes with the brush patterns specified in Qt::BrushStyle.</p> */"/> <enum-value name="LinearGradientFill" doc="/** <p>The engine supports linear gradient fills.</p> */"/> <enum-value name="RadialGradientFill" doc="/** <p>The engine supports radial gradient fills.</p> */"/> <enum-value name="ConicalGradientFill" doc="/** <p>The engine supports conical gradient fills.</p> */"/> <enum-value name="AlphaBlend" doc="/** <p>The engine can alpha blend primitives.</p> */"/> <enum-value name="PorterDuff" doc="/** <p>The engine supports Porter-Duff operations</p> */"/> <enum-value name="PainterPaths" doc="/** <p>The engine has path support.</p> */"/> <enum-value name="Antialiasing" doc="/** <p>The engine can use antialising to improve the appearance of rendered primitives.</p> */"/> <enum-value name="BrushStroke" doc="/** <p>The engine supports drawing strokes that contain brushes as fills, not just solid colors (e.g&#x2e; a dashed gradient line of width 2).</p> */"/> <enum-value name="ConstantOpacity" doc="/** <p>The engine supports the feature provided by QPainter::setOpacity().</p> */"/> <enum-value name="MaskedBrush" doc="/** <p>The engine is capable of rendering brushes that has a texture with an alpha channel or a mask.</p> */"/> <enum-value name="PerspectiveTransform" doc="/** <p>The engine has support for performing perspective transformations on primitives.</p> */"/> <enum-value name="BlendModes" doc="/** <p>The engine supports blending modes.</p> */"/> <enum-value name="PaintOutsidePaintEvent" doc="/** <p>The engine is capable of painting outside of paint events.</p> */"/> <enum-value name="AllFeatures" doc="/** <p>All of the above features. This enum value is usually used as a bit mask.</p> */"/> </enum> <enum name="DirtyFlag" doc="/** <p>These types are used by <a href="QPainter.html"><tt>QPainter</tt></a> to trigger lazy updates of the various states in the <a href="QPaintEngine.html#QPaintEngine(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures)"><tt>QPaintEngine</tt></a> using QPaintEngine::updateState().</p> <p>A paint engine must update every dirty state.</p> */"> <enum-value name="DirtyPen" doc="/** <p>The pen is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyBrush" doc="/** <p>The brush is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyBrushOrigin" doc="/** <p>The brush origin is dirty and needs to updated.</p> */"/> <enum-value name="DirtyFont" doc="/** <p>The font is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyBackground" doc="/** <p>The background is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyBackgroundMode" doc="/** <p>The background mode is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyTransform" doc="/** <p>The transform is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyClipRegion" doc="/** <p>The clip region is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyClipPath" doc="/** <p>The clip path is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyHints" doc="/** <p>The render hints is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyCompositionMode" doc="/** <p>The composition mode is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyClipEnabled" doc="/** <p>Whether clipping is enabled or not is dirty and needs to be updated.</p> */"/> <enum-value name="DirtyOpacity" doc="/** <p>The constant opacity has changed and needs to be updated as part of the state change in QPaintEngine::updateState().</p> */"/> <enum-value name="AllDirty" doc="/** <p>Convenience enum used internally.</p> */"/> </enum> <method name="protected final int selfDestruct()"/> <method name="protected final void setSelfDestruct(int selfDestruct)"/> <method name="protected final int active()"/> <method name="protected final void setActive(int active)"/> <method name="protected final com.trolltech.qt.gui.QPaintEngineState state()"/> <method name="protected final void setState(com.trolltech.qt.gui.QPaintEngineState state)"/> <method name="protected final com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures gccaps()"/> <method name="protected final void setGccaps(com.trolltech.qt.gui.QPaintEngine.PaintEngineFeatures gccaps)"/> </class>