Loading, please wait ...
Open its course - HTML5

Short Questions for HTML5 Canvas

  • 1 Is it possible to transform graphic elements in canvas of HTML5?

    Answer
    Yes, The following functions can be used to transform graphic elements: . rotate(float angle); . scale(float x, float y); . translate(float x, float y);


  • 2 What are the functions for drawing images in canvas element of HTML5?

    Answer

    • drawImage(HTMLImageElement image, float dx, float dy, optional float dw, float dh);
    • drawImage(HTMLImageElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
    • drawImage(HTMLCanvasElement image, float dx, float dy, optional float dw, float dh);
    • drawImage(HTMLCanvasElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);
    • drawImage(HTMLVideoElement image, float dx, float dy, optional float dw, float dh);
    • drawImage(HTMLVideoElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh);


  • 3 How to customize line drawing in HTML5 canvas element?

    Answer
    The following properties are used to customize the line: lineCap: with any value form butt, round and square. lineJoin: with any value from miter, round, bevel lineWidth: any numeric value with 1 by default miterLimit: Numeric value wi default value of 10


Contact Us

support@subexpert.com
Write to Us View Help
Subject Expert Logo

Subject Expert

Learn, Evaluate and Optimize

Follow Us
Facebook Switch Display Mode Enable Translation
© 2024 - Subject Expert