Reference for add_bezier_to
Add a bezier curve to a shape. This is part of the reference section.
Arc
Buffer
Data
Dialog
Ellipse
Geo Utils
Image
Joystick (future)
Keyboard
Line
Mouse / Touchscreen
Pixel
Rectangle
Renderers
Shape
add_bezier_to
Sound (future)
Style
System
Text
Transform
Purpose
Draw a bezier curve from the current position to a new destination which is used as the next "current" position.
Snippet
Draw a shape which consists of a bezier curve from x of 50 and y of 100 to x of 150 and y of 200 using control points of (60, 110) and (140, 190).
shape = sketch.start_shape(50, 100) shape.add_bezier_to(60, 110, 140, 190, 150, 200) shape.end() sketch.draw_shape(shape)
Parameters
- control_x1: The horizontal location of the first control point.
- control_y1: The vertical location of the first control point.
- control_x2: The horizontal location of the second control point.
- control_y2: The vertical location of the second control point.
- destination_x: The vertical location of the end coordinate.
- destination_y: The horizontal location of the end coordinate.
Examples
Availability
Available for all platforms.