Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation
Components
gb
gb.args
gb.cairo
gb.chart
gb.clipper
gb.complex
gb.compress
gb.crypt
gb.data
gb.db
gb.db.form
gb.db.mysql
gb.db.odbc
gb.db.postgresql
gb.db.sqlite2
gb.db.sqlite3
gb.dbus
gb.dbus.trayicon
gb.debug
gb.desktop
gb.desktop.gnome.keyring
gb.desktop.x11
gb.eval
gb.eval.highlight
gb.form
gb.form.dialog
gb.form.editor
gb.form.htmlview
gb.form.mdi
gb.form.print
gb.form.stock
gb.form.terminal
gb.gmp
gb.gsl
gb.gtk
gb.gtk.opengl
gb.gtk3
gb.gtk3.opengl
gb.gtk3.webview
gb.gui
gb.gui.opengl
gb.gui.qt
gb.gui.qt.ext
gb.gui.qt.opengl
gb.gui.qt.webkit
gb.gui.trayicon
gb.gui.webview
gb.hash
gb.highlight
gb.image
gb.image.effect
gb.image.imlib
gb.image.io
gb.inotify
gb.jit
gb.libxml
gb.logging
gb.map
gb.markdown
gb.media
gb.media.form
gb.memcached
gb.mime
gb.mongodb
gb.mysql
gb.ncurses
gb.net
gb.net.curl
gb.net.pop3
gb.net.smtp
gb.openal
gb.opengl
gb.opengl.glsl
gb.opengl.glu
gb.opengl.sge
gb.openssl
gb.option
gb.pcre
gb.pdf
gb.poppler
gb.qt4
gb.qt4.ext
gb.qt4.opengl
gb.qt4.webkit
gb.qt4.webview
gb.qt5
gb.qt5.ext
gb.qt5.opengl
gb.qt5.webkit
gb.qt5.webview
gb.qt6
gb.qt6.ext
gb.qt6.opengl
gb.qt6.webview
gb.report
gb.report2
gb.scanner
gb.sdl
gb.sdl.sound
gb.sdl2
gb.sdl2.audio
gb.settings
gb.signal
gb.term
gb.test
gb.util
gb.util.web
gb.v4l
gb.vb
gb.web
gb.web.feed
gb.web.form
gb.web.gui
gb.xml
gb.xml.html
gb.xml.rpc
gb.xml.xslt
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

Paint (gb.gui.base)

This class reimplements Paint in gb.qt4.

This class is static.

Inherited 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).
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.
OperatorIn   Compositing operator that draws the source where there was destination content (unbounded).
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).
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.
OperatorSource   Compositing operator that replaces the destination layer (bounded).
OperatorXor   Compositing operator that shows source and destination where there is only one of them.

Inherited 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. The line width value specifies the diameter of a pen that is circular in user space, though device-space pen may be an ellipse in general due to scaling/shear/rotation of the current transformation matrix (CTM).
Matrix   Returns or sets the current transformation matrix.
MiterLimit   Returns or sets the current miter limit.
Operator   Returns or sets the compositing operator to be used for all drawing operations. See each one of the constants below for details on the semantics of each available compositing operator.
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
Arrow   Add an arrow to the current path.
Check   Add a check mark to the current path.
Circle   Paint a circle.
DrawRect   Draw a rectangle frame
DrawRichTextShadow  
DrawTextShadow  
StretchImage   Stretch and draw an image or part of an image so that it fits a specified rectangle.
TrimRichText  
TrimText  

Inherited static methods
Arc   Adds a circular arc of the given Radius to the current path. The arc is centered at (XC, YC), begins at Angle and proceeds counter-clockwise during Length radians.
Begin   Starts painting on the specified device.
Clip   Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by Paint.Fill and according to the current fill rule (see Paint.FillRule).
ClosePath   Adds a line segment to the path from the current point to the beginning of the current sub-path, (the most recent point passed to Paint.MoveTo), and closes this sub-path. After this call the current point will be at the joined endpoint of the sub-path.
Color   Creates a new brush corresponding to an opaque or translucent color.
CurveTo   Adds a cubic B├ęzier spline to the path from the current point to position (X3, Y3) in user-space coordinates, using (X1, Y1) and (X2, Y2) as the control points. After this call the current point will be (X3, Y3).
DrawImage   Draw an image, or part of it.
DrawPicture   Draw a Picture, or part of it.
DrawRichText   Draws a piece of rich text.
DrawText   Draws the specified text.
Ellipse   Adds an elliptic arc to the current path. The ellipse is defined by its (X, Y, Width, Height) bounding-box, begins at Angle and proceeds counter-clockwise during Length radians.
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.
RadialGradient   Creates a new radial gradient paint brush that interpolates colors between a focal point ( FX , FY ) and end points on a circle defined by ( CX0 , CY0 , Radius0 ), and using color stops defined by the Colors and Positions arguments.
Rectangle   Adds a closed sub-path rectangle of the given size to the current path at position (X, Y) in user-space coordinates.
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. That is, set the clip region to an infinitely large shape containing the target surface. Equivalently, if infinity is too hard to grasp, one can imagine the clip region being reset to the exact bounds of the target surface.
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 angle radians. The rotation of the axes takes places after any existing transformation of user space. The rotation direction for positive angles is from the positive X axis toward the positive Y axis.
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. The scaling of the axes takes place after any existing transformation of user space.
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).
ZoomImage   Draw a quick zoomed version of an image or a part of it.