Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a given platform. More...
Public Member Functions | |
QPaintEngine (QPaintEngine.PaintEngineFeature features=0) | |
| |
virtual void | CreateProxy () |
abstract bool | Begin (IQPaintDevice pdev) |
| |
new void | ClearDirty (QPaintEngine.DirtyFlag df) |
virtual QPoint | CoordinateOffset () |
virtual void | DrawEllipse (QRectF r) |
| |
virtual void | DrawEllipse (QRect r) |
| |
virtual void | DrawImage (QRectF r, QImage pm, QRectF sr, Qt.ImageConversionFlag flags=Qt.ImageConversionFlag.AutoColor) |
| |
virtual void | DrawLines (QLine lines, int lineCount) |
| |
virtual void | DrawLines (QLineF lines, int lineCount) |
| |
virtual void | DrawPath (QPainterPath path) |
| |
abstract void | DrawPixmap (QRectF r, QPixmap pm, QRectF sr) |
| |
virtual void | DrawPoints (QPointF points, int pointCount) |
| |
virtual void | DrawPoints (QPoint points, int pointCount) |
| |
virtual void | DrawPolygon (QPointF points, int pointCount, QPaintEngine.PolygonDrawMode mode) |
| |
virtual void | DrawPolygon (QPoint points, int pointCount, QPaintEngine.PolygonDrawMode mode) |
| |
virtual void | DrawRects (QRect rects, int rectCount) |
| |
virtual void | DrawRects (QRectF rects, int rectCount) |
| |
virtual void | DrawTextItem (QPointF p, QTextItem textItem) |
| |
virtual void | DrawTiledPixmap (QRectF r, QPixmap pixmap, QPointF s) |
| |
abstract bool | End () |
| |
new void | Fix_neg_rect (ref int x, ref int y, ref int w, ref int h) |
virtual System.IntPtr | GetDC () |
new bool | HasFeature (QPaintEngine.PaintEngineFeature feature) |
| |
new bool | IsActive () |
| |
new bool | IsExtended () |
new QPainter | Painter () |
| |
virtual void | ReleaseDC (System.IntPtr hdc) |
new void | SetActive (bool newState) |
| |
new void | SetDirty (QPaintEngine.DirtyFlag df) |
new void | SyncState () |
new bool | TestDirty (QPaintEngine.DirtyFlag df) |
abstract QPaintEngine.Type | type () |
| |
abstract void | UpdateState (QPaintEngineState state) |
| |
new void | Dispose () |
Protected Member Functions | |
QPaintEngine (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
new IQPaintDevice | PaintDevice [get, set] |
| |
new QRegion | SystemClip [get, set] |
new QRect | SystemRect [get, set] |
virtual System.IntPtr | SmokeObject [get, set] |
new uint | Active [get, set] |
new uint | Extended [get, set] |
new QPaintEngine.PaintEngineFeature | Gccaps [get, set] |
new uint | SelfDestruct [get, set] |
new QPaintEngineState | State [get, set] |
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a given platform.
Qt 4.0 provides several premade implementations of QPaintEngine 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 CoreGraphics on Mac OS X. In addition we provide QPaintEngine implementations for OpenGL (accessible through QGLWidget) and PostScript (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.
If one wants to use QPainter to draw to a different backend, one must subclass QPaintEngine and reimplement all its virtual functions. The QPaintEngine implementation is then made available by subclassing QPaintDevice and reimplementing the virtual function QPaintDevice::paintEngine().
QPaintEngine is created and owned by the QPaintDevice that created it.
The big advantage of the QPaintEngine approach opposed to Qt 3's QPainter/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.
See also QPainter, QPaintDevice::paintEngine(), and Paint System.
These types are used by QPainter to trigger lazy updates of the various states in the QPaintEngine using QPaintEngine::updateState().
A paint engine must update every dirty state.
This enum is used to describe the features or capabilities that the paint engine has. If a feature is not supported by the engine, QPainter will do a best effort to emulate that feature through other means and pass on an alpha blended QImage to the engine with the emulated results. Some features cannot be emulated: AlphaBlend and PorterDuff.
AllFeatures |
All of the above features. This enum value is usually used as a bit mask. |
AlphaBlend |
The engine can alpha blend primitives. |
Antialiasing |
The engine can use antialising to improve the appearance of rendered primitives. |
BlendModes |
The engine supports blending modes. |
BrushStroke |
The engine supports drawing strokes that contain brushes as fills, not just solid colors (e.g. a dashed gradient line of width 2). |
ConicalGradientFill |
The engine supports conical gradient fills. |
ConstantOpacity |
The engine supports the feature provided by QPainter::setOpacity(). |
LinearGradientFill |
The engine supports linear gradient fills. |
MaskedBrush |
The engine is capable of rendering brushes that has a texture with an alpha channel or a mask. |
ObjectBoundingModeGradients |
The engine has native support for gradients with coordinate mode QGradient::ObjectBoundingMode. Otherwise, if QPaintEngine::PatternTransform is supported, object bounding mode gradients are converted to gradients with coordinate mode QGradient::LogicalMode and a brush transform for the coordinate mapping. |
PaintOutsidePaintEvent |
The engine is capable of painting outside of paint events. |
PainterPaths |
The engine has path support. |
PatternBrush |
The engine is capable of rendering brushes with the brush patterns specified in Qt::BrushStyle. |
PatternTransform |
The engine has support for transforming brush patterns. |
PerspectiveTransform |
The engine has support for performing perspective transformations on primitives. |
PixmapTransform |
The engine can transform pixmaps, including rotation and shearing. |
PorterDuff |
The engine supports Porter-Duff operations |
PrimitiveTransform |
The engine has support for transforming drawing primitives. |
RadialGradientFill |
The engine supports radial gradient fills. |
RasterOpModes |
The engine supports bitwise raster operations. |
Blitter | |
CoreGraphics |
Mac OS X's Quartz2D (CoreGraphics) |
Direct3D |
Windows only, Direct3D based engine |
MacPrinter | |
MaxUser |
Last user type ID |
OpenGL | |
OpenGL2 | |
OpenVG | |
PaintBuffer | |
Portable Document Format | |
Picture |
QPicture format |
PostScript | |
QWindowSystem |
Qt for Embedded Linux |
QuickDraw |
Mac OS X's QuickDraw |
Raster | |
SVG |
Scalable Vector Graphics XML format |
User |
First user type ID |
Windows | |
X11 |
|
protected |
QtGui.QPaintEngine.QPaintEngine | ( | QPaintEngine.PaintEngineFeature | features = 0 | ) |
Creates a paint engine with the featureset specified by caps.
|
pure virtual |
Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev. Return true if the initialization was successful; otherwise return false.
See also end() and isActive().
new void QtGui.QPaintEngine.ClearDirty | ( | QPaintEngine.DirtyFlag | df | ) |
|
virtual |
|
virtual |
new void QtGui.QPaintEngine.Dispose | ( | ) |
|
virtual |
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
The default implementation calls drawPolygon().
|
virtual |
The default implementation of this function calls the floating point version of this function
|
virtual |
Reimplement this function to draw the part of the image specified by the sr rectangle in the given rectangle using the given conversion flags flags, to convert it to a pixmap.
|
virtual |
This is an overloaded function.
The default implementation converts the first lineCount lines in lines to a QLineF and calls the floating point version of this function.
|
virtual |
The default implementation splits the list of lines in lines into lineCount separate calls to drawPath() or drawPolygon() depending on the feature set of the paint engine.
|
virtual |
The default implementation ignores the path and does nothing.
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
|
virtual |
Draws the first pointCount points in the buffer points
|
virtual |
Draws the first pointCount points in the buffer points
The default implementation converts the first pointCount QPoints in points to QPointFs and calls the floating point version of drawPoints.
|
virtual |
Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
Note: At least one of the drawPolygon() functions must be reimplemented.
|
virtual |
This is an overloaded function.
Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
Note: At least one of the drawPolygon() functions must be reimplemented.
|
virtual |
This is an overloaded function.
The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF and calls the floating point version of this function.
|
virtual |
Draws the first rectCount rectangles in the buffer rects. The default implementation of this function calls drawPath() or drawPolygon() depending on the feature set of the paint engine.
This function draws the text item textItem at position p. The default implementation of this function converts the text to a QPainterPath and paints the resulting path.
Reimplement this function to draw the pixmap in the given rect, starting at the given p. The pixmap will be drawn repeatedly until the rect is filled.
|
pure virtual |
Reimplement this function to finish painting on the current paint device. Return true if painting was finished successfully; otherwise return false.
See also begin() and isActive().
new void QtGui.QPaintEngine.Fix_neg_rect | ( | ref int | x, |
ref int | y, | ||
ref int | w, | ||
ref int | h | ||
) |
|
virtual |
new bool QtGui.QPaintEngine.HasFeature | ( | QPaintEngine.PaintEngineFeature | feature | ) |
Returns true if the paint engine supports the specified feature; otherwise returns false.
new bool QtGui.QPaintEngine.IsActive | ( | ) |
Returns true if the paint engine is actively drawing; otherwise returns false.
See also setActive().
new bool QtGui.QPaintEngine.IsExtended | ( | ) |
new QPainter QtGui.QPaintEngine.Painter | ( | ) |
Returns the paint engine's painter.
|
virtual |
new void QtGui.QPaintEngine.SetActive | ( | bool | newState | ) |
Sets the active state of the paint engine to state.
See also isActive().
new void QtGui.QPaintEngine.SetDirty | ( | QPaintEngine.DirtyFlag | df | ) |
new void QtGui.QPaintEngine.SyncState | ( | ) |
new bool QtGui.QPaintEngine.TestDirty | ( | QPaintEngine.DirtyFlag | df | ) |
|
pure virtual |
Reimplement this function to return the paint engine Type.
|
pure virtual |
Reimplement this function to update the state of a paint engine.
When implemented, this function is responsible for checking the paint engine's current state 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 get function to retrieve the current values for the given properties.
See also QPaintEngineState.
|
protected |
|
getsetprotected |
|
getsetprotected |
|
getsetprotected |
|
getset |
Returns the device that this engine is painting on, if painting is active; otherwise returns 0.
|
getsetprotected |
|
getset |
|
getsetprotected |
|
getset |
|
getset |