Tag:draw a circle

  • Change the state of the canvas in the custom view to draw

    Time:2021-11-14

    1: Operate canvas Rotate() canvas Scale() stretch canvas Translate() canvas movement 2: Canvas operation canvas?. Save() saves the previous operations……………….. implement various animations in the canvas Restore () restores the canvas. Example 3: 1: Save the previous operation canvas Save() 2: operation on canvas. Here, move the canvas 100 in the X direction and 100 […]

  • Canvas Basics

    Time:2021-8-15

    Canvas Create canvas <canvas id=”canvas”></canvas> Generally, there must be an ID Width and height are recommended directly in<canvas>Do not use CSS to set the length and height directly, and there is no PX unit, because it also represents the accuracy Width and height can also be set using JS. There are width and height attributes […]

  • Vue uses canvas to draw arc progress bar

    Time:2020-12-25

    After a few words, let’s go to the effect drawing first, and then look down if it meets the requirementsThis is a small function of youzan mall.Paste the method directly, and then call the method directly to transfer the value. html: <canvas id=”circle” class=”circle-item” width=”240px” height=”240px” > </canvas> script: mounted() { this.toCanvas(“circle”, 70); //The first […]

  • IOS Bezier circle drawing animation (circle progress percentage)

    Time:2020-12-23

    Target effect            realization New uiview based file .h attribute /** 0 < accuracy < 1 */ @property (nonatomic,assign) double accuracy; .m attribute ///Circle layer @property (nonatomic,strong) CAShapeLayer *shapeLayer; ///Gray circle layer @property (nonatomic,strong) CAShapeLayer *shapeFloorLayer; ///Circle path @property (nonatomic,strong) UIBezierPath *proPath; @property (nonatomic,strong) UILabel * accuracyLabel; @property (nonatomic,strong) UICountingLabel * […]

  • Event interaction effect ispointpath of canvas

    Time:2020-7-22

    Ispointpath () is used to detect whether a point is in the current path, and is often used for click interaction. It should be noted that each time the beginpath method is executed, the detection path becomes the path drawn after the beginpath. The original path does not participate in the detection. For example, click […]

  • 11. Canvas Pie 2

    Time:2020-3-14

    Please refer to the previous section: 10. Canvas pie chart 1https://segmentfault.com/a/119000021599679 for requirements and main explanations Final effect: Because this time is simple, there is no more explanation.You can read the last explanation <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <meta http-equiv=”X-UA-Compatible” content=”ie=edge”> < title > Andy JS: Canvas pie chart […]