Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program API drawing strokeText


May 19, 2021 WeChat Mini Program Development Document


Table of contents


canvasContext.strokeText


Base library 1.9.90 starts to support, and low versions need to be compatible

Defined

The method of drawing a text stroke at a given (x, y) position

Grammar

canvasContext.strokeText(text, x, y, maxWidth)

Parameters

The property value Type Description
text String The text to draw
Number The x-axis coordinates of the starting point of the text
Y Number The y-axis coordinates of the starting point of the text
maxWidth Number The maximum width that needs to be drawn is optional