Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation from source code
Components
gb
gb.args
gb.cairo
gb.chart
gb.clipper
gb.clipper2
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.db2
gb.db2.form
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
Message
WebButton
WebControl
WebImage
WebTable
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
Learning topics
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

Paint (gb.web.gui)

Since 3.21

This class is used for drawing the contents of a WebDrawingArea control.

It mostly generates javascript code sent to the browser that draws inside the <canvas> element that implements the WebDrawingArea.

Most of the paint properties are write only, as apparently the javascript canvas drawing context properties cannot be read.

This class is static.

Constants
LineCapButt  
LineCapRound  
LineCapSquare  
LineJoinBevel  
LineJoinMiter  
LineJoinRound  
OperatorATop  
OperatorAdd  
OperatorDestATop  
OperatorDestIn  
OperatorDestOut  
OperatorDestOver  
OperatorIn  
OperatorOut  
OperatorOver  
OperatorSource  
OperatorXor  

Static properties
Background   Define the background color used by the drawing routines.
Brush   Return or set the brush used for filling drawing paths.
Dash   Define the dash pattern used for stroking lines.
DashOffset   Define the offset used for drawing dashes.
Device   Return the control that is currently painted.
Font   Return or set the font used for drawing text.
H   Return the height of the drawing area.
Height   Return the height of the drawing area.
LineCap   Define the current line cap style used for stroking lines..
LineDash   Define the dash pattern used for stroking lines.
LineDashOffset   Define the offset used for drawing dashes.
LineJoin   Define the current line join style used for stroking lines.
LineWidth   Define the current line width used for stroking lines..
MiterLimit   Define the current miter limit used for stroking lines.
Opacity   Define the global opacity of the drawing routines.
Operator   Define the compositing operator to be used for all drawing operations.
W   Return the width of the drawing area.
Width   Return the width of the drawing area.

Static methods
Arc   Adds a circular arc to the current path.
Begin   Start painting on the Device control.
Clip   Establish 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.
DrawText   Draw the specified text.
Ellipse   Adds an elliptic arc to the current path.
End   End painting on the current device.
Fill   Fill the current path.
FillText  
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   Create a new linear gradient brush along the line defined by (X1, Y1) and (X2, Y2), 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.
RadialGradient   Create a new radial gradient paint brush.
Rectangle   Adds a closed sub-path rectangle to the current path.
Reset   Resets the transformation matrix to the identity.
Restore   Restore the drawing state to the state saved by a preceding call to Save and removes that state from the stack of saved states.
Rotate   Modify the current transformation matrix by rotating the user-space axes by a specific angle.
Save   Make a copy of the current drawing state and saves it on an internal stack of saved states.
Scale   Modify the current transformation matrix by scaling the user-space.
Stroke   Stroke the current path.
StrokeText  
Translate   Modify the current transformation matrix by translating the user-space origin.