Help! How to draw images with dynamically changed sizes!

Source: Internet
Author: User
Help! How to draw images with dynamically changed sizes! Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiMultimedia/html/delphi_20061031221025186.html
Program You need to draw a picture on an image that can dynamically change the size.
The initial size of the image control is a screen. During running, when the width and height of the image dynamically exceed the current screen, the image cannot be displayed in the area that exceeds the screen. Buddha only changes the size of the image, but the canvas does not extend to the area outside the screen.

I have tried to put the image control in a scrollbox and it still does not work!

Image painting?
You have not processed the wm_paint message for re-painting. Of course, the image cannot be painted.
You don't need to go beyond the screen. Just hide a window on your image and you will have no picture.
Paintbox should be used to draw in its onpaint method.

Do not use image. Canvas
Use image. Picture. bitmap. Canvas.
Make sure that the size of image. Picture. bitmap is correct.

Set the stretch property of the image space ..
Image. Stretch: = true;

Set to prevent it from being painted outside the border.

If the last vertex exceeded the border, use the vertex of the maximum border value instead ~~!

You have already solved the problem by yourself. In fact, you need to change the width and height of image. Picture. bitmap.

:)

When the image size is changed, the bitmap object used internally is not changed together. You only need to modify this manually.

We recommend that you use the vector graphics component tcad.
Http://www.codeidea.com/cn/

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.