In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use canvas components to draw a fixed line", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use canvas components to draw a fixed line" bar!
Let's first take a look at the canvas components:
Wxml:
> > (x axis of the current canvas object, y axis of the current canvas object) my_carvas.lineTo (120,100) / / add a new point, and then create a line from the last specified point to the target point. (120100) > (x axis of the current canvas object, y axis of the current canvas object) my_carvas.stroke () / draw the border of the current path. The default color is black. My_carvas.draw () / / draws the description (path, deformation, style) previously in the drawing context into canvas. }}) set the starting point and end point, and draw a straight line as shown in the figure: (100 pixels from left to right)
Canvas tag attributes:
Canvas.
The default value of the property name type indicates the unique identifier of the canvas-idStringcanvas component disable-scrollBooleanfalse when moving in canvas and there is a binding gesture event, disable screen scrolling and drop-down refresh bindtouchstartEventHandle finger touch action start bindtouchmoveEventHandle finger touch action after moving bindtouchendEventHandle finger touch action ends bindtouchcancelEventHandle finger touch action is interrupted, such as call reminder, pop-up window bindlongtapEventHandle finger long press 500ms triggered Moving after a long press event is triggered does not trigger the scrolling binderrorEventHandle of the screen. When an error occurs, the error event is triggered, detail = {errMsg: 'something wrong'}
Note: Bug & Tip
The tip:canvas component is a native component created by the client. It has the highest level and cannot be controlled through z-index. Tip: do not use canvas components in scroll-view, swiper, picker-view, movable-view. Tip:css animation is not valid for canvas components. Bug: avoid setting too much width and height, there will be problems with crash on Android
Thank you for your reading, the above is "how to use canvas components to draw a fixed line" content, after the study of this article, I believe you on how to use canvas components to draw a fixed line of this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.