In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces what the context object method has related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe you will have some gains after reading this context object method, let's take a look at it.
API interface method description createCanvasContext create canvas drawing context (specify canvasId) createContext (not recommended) create canvas drawing context drawCanvas (not recommended) for drawing canvasToTempFilePath list colors and styles of methods for exporting picture context objects Shadow method description setFillStyle set fill pattern setStrokeStyle set line style setShadow set shadow gradient method createLinearGradient create a linear gradient createCircularGradient create a circular gradient addColorStop add a color change line style method setLineWidth sets line width setLineCap sets line end style setLineJoin sets style at the intersection of two lines setMiterLimit sets maximum inclined rectangle method explains rect to create a Rectangular fillRect fill a rectangle strokeRect draw a rectangle (unfilled) clearRect in a given rectangular area The method of clearing the pixel path on the canvas indicates that fill fills the current path stroke strokes the current path beginPath starts a path closePath closes a path moveTo moves the path to a specified point in the canvas without creating lines. LineTo adds a new point, and then creates a line in the canvas from that point to the last specified point. Arc adds an arc path to the current path and draws it clockwise. QuadraticCurveTo creates quadratic Bezier curve bezierCurveTo creates cubic Bezier curve deformation method description scale scales the horizontal and vertical coordinates rotate rotates the coordinate axis clockwise translate scales the coordinate origin fillText draws filled text on the canvas setFontSize sets font size setTextBaseline sets font baseline setTextAlign sets font alignment Picture description drawImage draws mixed images on canvas Method description setGlobalAlpha sets global brush transparency other methods description save saves current drawing context draw preserved drawing context draw before recovery getActions (not recommended) get the current context stored drawing actions clearActions (not recommended) clear the current storage drawing actions about what are the methods of context objects this article ends here Thank you for reading! I believe you all have a certain understanding of "what are the methods of context objects". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.