Marblecore Imaging Library Documentation

Documentation Introduction
Documentation / Marblecore Imaging / Methods / DrawBezier

DrawBezier method

Draws a Bézier spline on the specified position on the image using the specified color, style and opacity.


Boolean DrawBezier(nX1 As Number, nY1 As Number, nX2 As Number, nY2 As Number, nX3 As Number, nY3 As Number, nX4 As Number, nY4 As Number, nPenColor As Number, nPenOpacity As Number, nPenStyle As Pen, nPenWidth As Number, bPenAntiAliasing As State)

Return value

Returns true if the function succeeded.


nX1NumberYesSpecifies the x-coordinate of the starting point of the Bézier spline.
nY1NumberYesSpecifies the y-coordinate of the starting point of the Bézier spline.
nX2NumberYesSpecifies the x-coordinate of the first control point of the Bézier spline.
nY2NumberYesSpecifies the y-coordinate of the first control point of the Bézier spline.
nX3NumberYesSpecifies the x-coordinate of the second control point of the Bézier spline.
nY3NumberYesSpecifies the y-coordinate of the second control point of the Bézier spline.
nX4NumberYesSpecifies the x-coordinate of the ending point of the Bézier spline.
nY4NumberYesSpecifies the y-coordinate of the ending of the Bézier spline.
nPenColorNumberNoOptional parameter containing a color value. If no color is specified, the current pen color will be used instead.
nPenOpacityNumberNoOptional parameter containing the opacity percentage (where 0% is completely transparent). If no opacity is specified, the current pen opacity will be used instead.
nPenStylePen (Enumeration)NoOptional parameter containing the desired line style. If no style is specified, the current pen style will be used instead.
nPenWidthNumberNoOptional parameter containing the desired line width (thickness) in pixels (ranging from 1...100). If no width is specified, the current pen width will be used instead.
bPenAntiAliasingState (Enumeration)NoOptional parameter enabling or disabling line anti-aliasing. If not specified the current pen anti-aliasing setting will be used instead.


The example below shows how to use the method. If you take a look at the example code, assume there is a reference to the Marblecore Imaging object with the name 'MarblecoreImaging'. Transparent parts of the image are displayed using a checkerboard pattern.
1 // Creates a new transparent image
2 MarblecoreImaging.Create(150, 150, true);
4 // Execute the operation
5 MarblecoreImaging.DrawBezier(25, 125, 50, 25, 75, 125, 125, 25);
7 // Save the modified image to the specified file
8 MarblecoreImaging.SaveToFile("example-drawbezier.jpg");



See also

DrawArc | DrawArrow | DrawBackground | DrawCheckerboard | DrawCurve | DrawCurveBorder | DrawCurveFilled | DrawCurveGradient | DrawEllipse | DrawEllipseBorder | DrawEllipseFilled | DrawEllipseGradient | DrawFloodFill | DrawLine | DrawPie | DrawPieBorder | DrawPieFilled | DrawPieGradient | DrawPixel | DrawPolygon | DrawPolygonBorder | DrawPolygonFilled | DrawPolygonGradient | DrawRectangle | DrawRectangleBorder | DrawRectangleFilled | DrawRectangleGradient | DrawRectangleTransparent | DrawRhombus | DrawRhombusBorder | DrawRhombusFilled | DrawRhombusGradient | DrawRoundRectangle | DrawRoundRectangleBorder | DrawRoundRectangleFilled | DrawRoundRectangleGradient | DrawTriangle | DrawTriangleBorder | DrawTriangleFilled | DrawTriangleGradient | GetPixelColor | LineTo | MoveTo