Platforms to show: All Mac Windows Linux Cross-Platform

Graphics.DirectDrawDashedLineMBS(startCap as Integer, endCap as Integer, dashCap as Integer, lineJoin as Integer, miterLimit as Single, dashStyle as Integer, dashOffset as Single, Dashes() as Single, point0x as double, point0y as double, point1x as double, point1y as double, strokeWidth as single, red as single, green as single, blue as single, alpha as single) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method Graphics & Pictures MBS Win Plugin 20.3 Yes Yes Yes No No
Function: Draws a dashed line on Windows.
Notes:
Only for graphics objects using DirectDraw for rendering.
Returns true on success. May raise exceptions if something goes wrong.

startCapThe cap applied to the start of all the open figures in a stroked geometry.
endCapThe cap applied to the end of all the open figures in a stroked geometry.
dashCapThe shape at either end of each dash segment.
lineJoinA 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.
miterLimitThe 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.
dashStyleA value that specifies whether the stroke has a dash pattern and, if so, the dash style.
dashOffsetA 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.
DashesAn 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.
point0x/point0yThe start point of the line, in device-independent pixels.
point1x/point1yThe end point of the line, in device-independent pixels.
strokeWidthThe width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0. The stroke is centered on the line.
redThe red value of the brush's color.
greenThe green value of the brush's color.
blueThe blue value of the brush's color.
alphaThe alpha value of the brush's color.

Dash Style ConstantDescription
D2D1_DASH_STYLE_SOLIDA solid line with no breaks.
D2D1_DASH_STYLE_DASHA dash followed by a gap of equal length. The dash and the gap are each twice as long as the stroke thickness. The equivalent dash array for D2D1_DASH_STYLE_DASH is {2, 2}.
D2D1_DASH_STYLE_DOTA dot followed by a longer gap. The equivalent dash array for D2D1_DASH_STYLE_DOT is {0, 2}.
D2D1_DASH_STYLE_DASH_DOTA dash, followed by a gap, followed by a dot, followed by another gap. The equivalent dash array for D2D1_DASH_STYLE_DASH_DOT is {2, 2, 0, 2}.
D2D1_DASH_STYLE_DASH_DOT_DOTA dash, followed by a gap, followed by a dot, followed by another gap, followed by another dot, followed by another gap. The equivalent dash array for D2D1_DASH_STYLE_DASH_DOT_DOT is {2, 2, 0, 2, 0, 2}.
D2D1_DASH_STYLE_CUSTOMThe dash pattern is specified by an array of floating-point values.

Cap Style ConstantDescription
D2D1_CAP_STYLE_FLATA cap that does not extend past the last point of the line. Comparable to cap used for objects other than lines.
D2D1_CAP_STYLE_SQUAREHalf of a square that has a length equal to the line thickness.
D2D1_CAP_STYLE_ROUNDA semicircle that has a diameter equal to the line thickness.
D2D1_CAP_STYLE_TRIANGLEAn isosceles right triangle whose hypotenuse is equal in length to the thickness of the line.

Line Join Style ConstantsDescription
D2D1_LINE_JOIN_MITERRegular angular vertices.
D2D1_LINE_JOIN_BEVELBeveled vertices.
D2D1_LINE_JOIN_ROUNDRounded vertices.
D2D1_LINE_JOIN_MITER_OR_BEVELRegular angular vertices unless the join would extend beyond the miter limit; otherwise, beveled vertices.

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Win Plugin.

The biggest plugin in space...




Links
MBS Xojo Plugins