CopperSpice API  1.7.2
Painting System

Classes

class  QBitmap
 Monochrome (1-bit depth) pixmaps More...
 
class  QBrush
 Defines the fill pattern of shapes drawn by QPainter More...
 
class  QColor
 Colors based on RGB, HSV or CMYK values More...
 
class  QColormap
 Maps device independent QColors to device dependent pixel values More...
 
class  QConicalGradient
 Used in combination with QBrush to specify a conical gradient brush More...
 
class  QFont
 Specifies a font used for drawing text More...
 
class  QFontMetrics
 Font metrics information More...
 
class  QFontMetricsF
 Provides font metrics information More...
 
class  QGenericMatrix< N, M, T >
 Template class that represents a NxM transformation matrix with N columns and M rows More...
 
class  QGradient
 Used in combination with QBrush to specify gradient fills More...
 
class  QIcon
 Scalable icons in different modes and states More...
 
class  QIconEngine
 Provides an abstract base class for QIcon renderers More...
 
class  QImage
 Represents a bit map image More...
 
class  QImageReader
 Format independent interface for reading images from files or other devices More...
 
class  QImageWriter
 Provides a format independent interface for writing images to files or other devices More...
 
class  QLine
 Two-dimensional vector using integer precision More...
 
class  QLineF
 Two-dimensional vector using floating point precision More...
 
class  QLinearGradient
 Used in combination with QBrush to specify a linear gradient brush More...
 
class  QMargins
 Defines the four margins of a rectangle More...
 
class  QMarginsF
 Defines the four margins of a rectangle More...
 
class  QMatrix
 2D transformations of a coordinate system More...
 
class  QMovie
 Convenience class for playing movies with QImageReader More...
 
class  QPaintDevice
 Base class of objects that can be painted More...
 
class  QPaintEngine
 Abstract definition of how QPainter draws to a given device on a given platform More...
 
class  QPainter
 Performs low level painting operations on widgets and other paint devices More...
 
class  QPainterPath
 Container for painting operations, enabling graphical shapes to be constructed and reused More...
 
class  QPainterPathStroker
 Used to generate fillable outlines for a given painter path More...
 
class  QPen
 Defines how a QPainter should draw lines and outlines of shapes More...
 
class  QPicture
 Paint device that records and replays QPainter commands More...
 
class  QPictureIO
 Parameters for loading and saving pictures More...
 
class  QPixmap
 Off-screen image representation which can be used as a paint device More...
 
class  QPixmapCache
 Application-wide cache for pixmaps More...
 
class  QPoint
 Defines a point in the plane using integer precision More...
 
class  QPointF
 Defines a point in the plane using floating point precision More...
 
class  QPolygon
 Vector of points using integer precision More...
 
class  QPolygonF
 Vector of points using floating point precision More...
 
class  QRadialGradient
 Used in combination with QBrush to specify a radial gradient brush More...
 
class  QRect
 Defines a rectangle in the plane using integer precision More...
 
class  QRectF
 Defines a rectangle in the plane using floating point precision More...
 
class  QRegion
 Clip region for a painter More...
 
class  QSize
 Defines the size of a two-dimensional object using integer point precision More...
 
class  QSizeF
 Defines the size of a two-dimensional object using floating point precision More...
 
class  QSvgGenerator
 Paint device that is used to create SVG drawings More...
 
class  QSvgRenderer
 Used to draw the contents of SVG files onto paint devices More...
 
class  QSvgWidget
 Widget that is used to display the contents of Scalable Vector Graphics (SVG) files More...
 
class  QTransform
 Specifies 2D transformations of a coordinate system More...
 
class  QVector2D
 Vector or vertex in 2D space More...
 

Detailed Description

The paint system enables painting on screen and print devices using the same API, and is primarily based on the QPainter, QPaintDevice, and QPaintEngine classes.

QPainter is used to perform drawing operations, QPaintDevice is an abstraction of a two-dimensional space that can be painted on using a QPainter, and QPaintEngine provides the interface that the painter uses to draw onto different types of devices. The %&PaintEngine class is used internally by QPainter and %&PaintDevice, and is hidden from application programmers unless they create their own device type.

The main benefit of this approach is that all painting follows the same painting pipeline making it easy to add support for new features and providing default implementations for unsupported ones.

As an alternative use the CsOpenGL library. It offers classes which makes it easy to use OpenGL in applications. This library provides an OpenGL widget class which can be used just like any other CopperSpice widget, except that it opens an OpenGL display buffer where the OpenGL API can be used to render the contents.