Platforms to show: All Mac Windows Linux Cross-Platform
Back to DirectDrawGraphicsMBS class.
DirectDrawGraphicsMBS.ClearStrokeStyle
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
If no stroke style is defined, a default one is used.
DirectDrawGraphicsMBS.Constructor(Graphics as Graphics)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Pass the graphics in a paint event or from a picture.
Requires Xojo 2019r2 or newer.
DirectDrawGraphicsMBS.CreateSolidColorBrush(c as Color) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Pass the red, green, blue, and alpha values of the brush's color as a Xojo color.
See also:
Some examples using this method:
DirectDrawGraphicsMBS.CreateSolidColorBrush(red as Single, green as Single, blue as Single, alpha as Single = 1.0) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Pass the red, green, blue, and alpha values of the brush's color.
Range of values is from 0.0 to 1.0.
See also:
DirectDrawGraphicsMBS.CreateStrokeStyle(startCap as Integer = 0, endCap as Integer = 0, dashCap as Integer = 0, lineJoin as Integer = 0, miterLimit as Single = 1.0, dashStyle as Integer = 0, dashOffset as Single = 0, Dashes() as Single = nil) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Creates and sets the stroke style. Returns true on success and false on failure.
startCap | The cap applied to the start of all the open figures in a stroked geometry. |
endCap | The cap applied to the end of all the open figures in a stroked geometry. |
dashCap | The shape at either end of each dash segment. |
lineJoin | A value that describes how segments are joined. This value is ignored for a vertex if the segment flags specify that the segment should have a smooth join. |
miterLimit | The limit of the thickness of the join on a mitered corner. This value is always treated as though it is greater than or equal to 1.0. |
dashStyle | A value that specifies whether the stroke has a dash pattern and, if so, the dash style. |
dashOffset | A value that specifies an offset in the dash sequence. A positive dash offset value shifts the dash pattern, in units of stroke width, toward the start of the stroked geometry. A negative dash offset value shifts the dash pattern, in units of stroke width, toward the end of the stroked geometry. |
Dashes | An array whose elements are set to the length of each dash and space in the dash pattern. The first element sets the length of a dash, the second element sets the length of a space, the third element sets the length of a dash, and so on. The length of each dash and space in the dash pattern is the product of the element value in the array and the stroke width. |
Some examples using this method:
DirectDrawGraphicsMBS.Destructor
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
DirectDrawGraphicsMBS.DrawEllipse(x as single, y as single, radiusX as single, radiusY as single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
x/y: The position of the ellipse to draw, in device-independent pixels.
radiusX/radiusY: The radius of the ellipse to draw, in device-independent pixels.
Uses current brush, strokeWidth and strokeStyle.
DirectDrawGraphicsMBS.DrawLine(x1 as single, y1 as single, x2 as single, y2 as single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
x1/y1: The start point of the line, in device-independent pixels.
x2/y2: The end point of the line, in device-independent pixels.
Uses current brush, strokeWidth and strokeStyle.
DirectDrawGraphicsMBS.DrawRectangle(left as single, top as single, right as single, bottom as single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Pass the dimensions of the rectangle to draw, in device-independent pixels.
Uses current brush, strokeWidth and strokeStyle.
DirectDrawGraphicsMBS.DrawRoundedRectangle(left as single, top as single, right as single, bottom as single, radiusX as single, radiusY as single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Pass the dimensions of the rounded rectangle to draw, in device-independent pixels.
Uses current brush, strokeWidth and strokeStyle.
DirectDrawGraphicsMBS.FillEllipse(x as single, y as single, radiusX as single, radiusY as single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
The position and radius, in device-independent pixels, of the ellipse to paint.
Uses current brush.
DirectDrawGraphicsMBS.FillRectangle(left as single, top as single, right as single, bottom as single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
The dimension of the rectangle to paint, in device-independent pixels.
Uses current brush.
DirectDrawGraphicsMBS.FillRoundedRectangle(left as single, top as single, right as single, bottom as single, radiusX as single, radiusY as single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
The dimensions of the rounded rectangle to paint, in device independent pixels.
Uses current brush.
DirectDrawGraphicsMBS.GetTransform(byref m11 as Single, byref m12 as Single, byref m21 as Single, byref m22 as Single, byref dx as Single, byref dy as Single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
DirectDrawGraphicsMBS.RestoreDrawingState
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Our plugin manages the stack of drawing states saved.
We raise an exception if your calls to restore are not balanced with save.
DirectDrawGraphicsMBS.SaveDrawingState
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Our plugin manages the stack of drawing states saved, so you can restore them later.
DirectDrawGraphicsMBS.SetTransform(m11 as Single, m12 as Single, m21 as Single, m22 as Single, dx as Single, dy as Single)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Windows | MBS Win Plugin | 20.3 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
All subsequent drawing operations occur in the transformed space.
The items on this page are in the following plugins: MBS Win Plugin.
