Surfaceview Draw Rectangle DrawRect

Source: Internet
Author: User

is the drawing of a single rectangular box

Canvas.drawrect (
Left,//distance from the Ieft
Top,//the distance of the bottom distance of the Surfaceview from the rectangle
Right,//rectangle to the left of the Surfaceview distance
Bottom,//rectangle of the top distance Surfaceview the top of the distance, so here is generally used top-height, is the top of the rectangle directly minus the length of the rectangle, you get the length of the rectangle
Paint);

The following is the drawing of a continuous rectangle

for (int i = 0; i < 3; i++) {
+ i * Leftdis, the distance from the left side of each rectangle box , the distance from the top of the bottom distanceleft + i * leftdis+width, right margin distance The width of the rectangle is equal to the breadth, this width must be less than Leftdis, so that the rectangle will not coincide, width and Leftdis is the difference between the rectangular box spacing 100-10, the top distance from the top of the paint);
}

Surfaceview Draw Rectangle DrawRect

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.