Delphi's drawing function [14]

Source: Internet
Author: User

The Graphic unit of Delphi has five important image classes: Tgraphic, Tbitmap, Tmetafile, Ticon, Tpicture.

Tbitmap used to manipulate bitmaps;

Tmetafile is used to manipulate metafile;

Ticon used to manipulate icons (including mouse pointer) files;

Tbitmap, Tmetafile, and Ticon are all tgraphic subclasses, because

Tcanvas.draw (X, Y:integer; Graphic:tgraphic); The third parameter is the tgraphic type,

So they all can be output through Tcanvas.draw.

If three kinds of images have to accommodate, you have to use the Tpicture class, it contains Bitmap, Metafile, Icon object properties, also contains Graphic object attributes; The Timage class also contains the Picture property, so the image format can be displayed with Timage.

Among these, my favorite class is Tbitmap, because it is equivalent to a memory board, and double caching is used.

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.