Paint (gb.qt4)
This class is used for doing anti-aliased painting on various targets.
This class is static.
Constants
ExtendPad
|
Pixels outside of the brush copy the closest pixel.
|
ExtendReflect
|
The brush is tiled by reflecting at the edges.
|
ExtendRepeat
|
The pattern is tiled by repeating.
|
FillRuleEvenOdd
|
Constant used to select how paths are filled.
|
FillRuleWinding
|
Constant used to select how paths are filled.
|
LineCapButt
|
Specifies to render the endpoints of the path when stroking by starting(stopping) the line exactly at the start(end) point.
|
LineCapRound
|
Specifies to render the endpoints of the path when stroking by using a round ending, the center of the circle being the end point.
|
LineCapSquare
|
Specifies to render the endpoints of the path when stroking by using squared ending, the center of the square being the end point.
|
LineJoinBevel
|
Specifies to render the junction of two lines by using a cut-off join, the join being cut off at half the line width from the joint point.
|
LineJoinMiter
|
Specifies to render the junction of two lines by using a sharp (angled) corner.
|
LineJoinRound
|
Specifies to render the junction of two lines by using a rounded join, the center of the circle being the joint point.
|
OperatorATop
|
Compositing operator that draws the source on top of destination content and only there.
|
OperatorAdd
|
Compositing operator that accumulates the source and destination layers.
|
OperatorClear
|
Compositing operator that clears the destination layer (bounded).
|
OperatorColorBurn
|
Composition operator that darkens the destination color to reflect the source color.
|
OperatorColorDodge
|
Compositing operator that brightens the destination color to reflect the source color.
|
OperatorDarken
|
Compositing operator that replaces the destination with the source if it is darker, otherwise keeps the source.
|
OperatorDest
|
Compositing operator that ignores the source.
|
OperatorDestATop
|
Compositing operator that leaves the destination on top of source content and only there (unbounded).
|
OperatorDestIn
|
Compositing operator that leaves the destination only where there was source content (unbounded).
|
OperatorDestOut
|
Compositing operator that leaves the destination only where there was no source content.
|
OperatorDestOver
|
Compositing operator that draws the destination on top of the source.
|
OperatorDifference
|
Compositing operator that takes the difference of the source and destination color.
|
OperatorExclusion
|
Compositing operator that produces an effect similar to difference, but with lower contrast.
|
OperatorHardLight
|
Compositing operator that multiplies or screens, dependent on source color.
|
OperatorIn
|
Compositing operator that draws the source where there was destination content (unbounded).
|
OperatorLighten
|
Compositing operator that replaces the destination with the source if it is lighter, otherwise keeps the source.
|
OperatorMultiply
|
Compositing operator that multiply the source and destination layers. This causes the result to be at least as dark as the darker inputs.
|
OperatorOut
|
Compositing operator that draws the source where there was no destination content (unbounded).
|
OperatorOver
|
Compositing operator that draws the source layer on top of the destination layer (bounded).
|
OperatorOverlay
|
Compositing operator that multiplies or screens, depending on the lightness of the destination color.
|
OperatorSaturate
|
The output is the source color multiplied by the destination. Multiplying a color with white leaves the color unchanged, while multiplying a color with black produces black.
|
OperatorScreen
|
Compositing operator that complement and multiply the source and the destination. This causes the result to be at least as light as the lighter inputs.
|
OperatorSoftLight
|
Compositing operator that darkens or lightens, dependent on source color.
|
OperatorSource
|
Compositing operator that replaces the destination layer (bounded).
|
OperatorXor
|
Compositing operator that shows source and destination where there is only one of them.
|
Static properties
AntiAlias
|
Return or set if the painting will be anti-aliased.
|
Background
|
Return or set the background color.
|
Brush
|
Returns or sets the brush used for drawing.
|
BrushOrigin
|
Return or set the brush origin.
|
ClipExtents
|
Computes a bounding box in user coordinates covering the area inside the current clip.
|
ClipRect
|
Return or set the clipping region as a rectangle.
|
Dash
|
Returns or sets the dash pattern to be used by Paint.Stroke.
|
DashOffset
|
Returns or sets the offset used for drawing dashes.
|
Device
|
Returns the device you are drawing on with the Paint class.
|
FillRule
|
Returns or sets the current fill rule within the current drawing.
|
Font
|
Returns or sets the font used for painting text.
|
FontScale
|
Return or set a scale that is transparently applied to the size of the painting font.
|
H
|
Returns the height of the device being painted.
|
Height
|
Returns the height of the device being painted.
|
LineCap
|
Returns or sets the current line cap style within the current paiting.
|
LineDash
|
A synonymous of Dash.
|
LineDashOffset
|
A synonymous of DashOffset.
|
LineJoin
|
Returns or sets the current line join style within the current painting.
|
LineWidth
|
Returns or sets the current line width.
|
Matrix
|
Returns or sets the current transformation matrix.
|
MiterLimit
|
Returns or sets the current miter limit.
|
Opacity
|
Return or set the global opacity of the drawing routines.
|
Operator
|
Returns or sets the compositing operator to be used for all drawing operations.
|
PathExtents
|
Computes a bounding box in user-space coordinates covering the points on the current path.
|
PathOutline
|
Return a array of polygons corresponding to the current drawing path.
|
ResolutionX
|
Returns the horizontal resolution of the device being painted.
|
ResolutionY
|
Returns the vertical resolution of the device being painted.
|
TextHeight
|
Return the height of one line of text.
|
W
|
Returns the width of the device being painted.
|
Width
|
Returns the width of the device being painted.
|
X
|
Returns the X coordinate of the current point.
|
Y
|
Returns the Y coordinate of the current point.
|
Static methods
Arc
|
Adds a circular arc to the current path.
|
Arrow
|
Add an arrow to the current path.
|
Begin
|
Starts painting on the specified device.
|
Check
|
Add a check mark to the current path.
|
Circle
|
Paint a circle.
|
Clip
|
Establishes a new clip region.
|
ClosePath
|
Close the current path.
|
Color
|
Creates a new brush corresponding to an opaque or translucent color.
|
CurveTo
|
Adds a cubic Bézier spline to current path.
|
DrawImage
|
Draw an Image, or part of it.
|
DrawPicture
|
Draw a Picture, or part of it.
|
DrawRect
|
Draw a rectangle frame
|
DrawRichText
|
Draws a piece of rich text.
|
DrawRichTextShadow
|
Draw the shadow of a rich text.
|
DrawText
|
Draws the specified text.
|
DrawTextShadow
|
Draw the shadow of a text.
|
Ellipse
|
Adds an elliptic arc to the current path.
|
End
|
Ends a painting.
|
Fill
|
A drawing operator that fills the current path according to the current fill rule, (each sub-path is implicitly closed before being filled).
|
FillRect
|
Fill a rectangle with a specific color.
|
Image
|
Creates a new brush from an image.
|
LineTo
|
Adds a line to the path from the current point to position (X, Y) in user-space coordinates. After this call the current point will be (X, Y).
|
LinearGradient
|
Creates a new linear gradient brush along the line defined by (X0, Y0) and (X1, Y1), and using color stops defined by the Colors and Positions arguments.
|
MoveTo
|
Begin a new sub-path. After this call the current point will be (X, Y).
|
NewPath
|
Clears the current path. After this call there will be no path and no current point.
|
PathContains
|
Tests whether the given point is inside the area described by the current path. Device dimensions and clipping are not taken into account.
|
Polygon
|
Add a closed sub-path polygon to the current path.
|
Polyline
|
Paint a polyline
|
RadialGradient
|
Creates a new radial gradient paint brush.
|
Rectangle
|
Adds a closed sub-path rectangle to the current path.
|
RelCurveTo
|
Relative-coordinate version of CurveTo.
|
RelLineTo
|
Relative-coordinate version of LineTo.
|
RelMoveTo
|
Begin a new sub-path. After this call the current point will be offset by (X, Y).
|
Reset
|
Resets the transformation matrix to the identity.
|
ResetClip
|
Reset the current clip region to its original, unrestricted state.
|
Restore
|
Restores the drawing state to the state saved by a preceding call to Save and removes that state from the stack of saved states.
|
RichText
|
Adds the specified rich text to the current path, using the current font defined by the Font property.
|
RichTextExtents
|
Gets the extents for a string of rich text.
|
RichTextSize
|
Return the bounding box needed by a string of rich text.
|
Rotate
|
Modifies the current transformation matrix (CTM) by rotating the user-space axes by a specific angle.
|
Save
|
Makes a copy of the current drawing state and saves it on an internal stack of saved states.
|
Scale
|
Modifies the current transformation matrix (CTM) by scaling the X and Y user-space axes by SX and SY respectively.
|
Shear
|
Modifies the current transformation matrix (CTM) by skewing the X and Y user-space axes by SX and SV respectively.
|
SmoothPolyline
|
Paint a smooth polyline.
|
StretchImage
|
Stretch and draw an image or part of an image so that it fits a specified rectangle.
|
Stroke
|
A drawing operator that strokes the current path according to the current line width, line join, line cap, and dash settings.
|
Text
|
Adds the specified text to the current path, using the current font defined by the Font property.
|
TextExtents
|
Gets the extents for a string of text.
|
TextSize
|
Return the bounding box needed by a string of text.
|
Translate
|
Modifies the current transformation matrix (CTM) by translating the user-space origin by (TX, TY).
|
TrimRichText
|
Return a trimmed version of the specified rich text so that it fits the requested rectangle.
|
TrimText
|
Return a trimmed version of the specified text so that it fits the requested rectangle.
|
ZoomImage
|
Draw a quick zoomed version of an image or a part of it.
|
Paint can draw on the following targets:
Before starting drawing anything, you must call the
Paint.Begin method by passing it the object you want to draw.
Then you can draw what you want in three steps:
When your drawing is finished, you must call the
Paint.End method.
The interface of this class is very close to the
Cairo drawing model.