While the current API is stable, there may be breaking changes in the future, and more features will be added. draw ( ) // Draw the canvasįor API usage, and more specific examples, refer to the API. height ) ) // Draw the right leg m圜anvas. height ) ) // Create a subpath at the bottom of the body legs_subpath_2. height ) ) // Draw the left leg let legs_subpath_2 = m圜anvas. height ) ) // Create a subpath at the bottom of the body legs_subpath. height ) ) // Draw the body // The legs let legs_subpath = m圜anvas. height / 2 ) ) // Create a subpath at the bottom of the head body_subpath. height ) ) // Draw the arms // The body let body_subpath = m圜anvas. height ) ) // Create a subpath at the center of the head arms_subpath. PI, // The end angle (2 * PI is a full circle) ) // The arms let arms_subpath = m圜anvas. height / 2, // The Y radius 0, // The rotation 0, // The start angle 2 * Math. ellipse ( center, // Where to draw the head head. None, /* fill color */ ) const m圜anvas = new Canvas ( myPaint ) /* create a canvas with the paint */ // What is a stick figure? // O <- A circle (head) // - <- A long line (arms) // | <- A line (body) // / \ <- Two lines (legs) const head = new Size ( 6, 6 ) const body = new Size ( 1, 5 ) const arms = new Size ( 5, 1 ) const legs = new Size ( 5, 2 ) const center = Point. Import from './src/index.js' const myPaint = new Paint ( Color.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |