Full Screen handwriting

Source: Internet
Author: User

Full Screen handwriting

For example, open a PDF file. We know the total height of the PDF (total page number * single page height ). Get the position of the upper-left corner of the current window relative to the PDF of the total page from getscrollpos (sb_vert.

You also need to record the X and Y coordinates of the current mouse onmousemove. Take Y coordinates as an example: Y = point. Y + getscrollpos (sb_vert); where point is the parameter of onmousemove.

When saving the Y value, we need to save the height relative to the PDF, and getscrollpos (sb_vert). The reason is that you can calculate the height change relative to the view.

The result is relative to the position of the PDF.

 

Note: You need to know more about PDF and view than the screen. The key is this problem.

 

In onpaint, what we need to deal with is to subtract the value of Y from getscrollpos (sb_vert) to get the height relative to the view, so that we can correctly implement the view.

 

 

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.