Firemonkey Primer (3)-Talphacolor Ttext, Timage

Source: Internet
Author: User

Talphacolorf = record     class operator ADD (const Color1, Color2:talphacolorf): Talphacolorf;    Class operator Subtract (const Color1, Color2:talphacolorf): Talphacolorf;    Class operator Equal (const Color1, Color2:talphacolorf): Boolean;    Class operator notequal (const Color1, Color2:talphacolorf): Boolean;    Class operator negative (const Color:talphacolorf): Talphacolorf;    Class operator Multiply (const Color1, Color2:talphacolorf): Talphacolorf;    Class operator Multiply (const Color:talphacolorf; const factor:single): Talphacolorf;    Class operator Multiply (const factor:single; const Color:talphacolorf): Talphacolorf; inline;    Class operator Divide (const Color:talphacolorf; const factor:single): Talphacolorf; Inline

Talhacolorf defines the basic operator, so a= B+c can be executed, and A,b,c are Talphaclorf. You can also use color subtraction or conversion functions such as Appendcolor (), Subtractcolor () in uiconsts

In the system.uiconsts unit there is also HSL, and its regulating correlation function.

function HSLtoRGB (H, S, l:single): Talphacolor;
Procedure RGBTOHSL (Rgb:talphacolor; out H, S, L:single);
function CHANGEHSL (const c:talphacolor; DH, DS, dl:single): Talphacolor; Change brightness, contrast, hue. The DH,DS,DL is 0-1 intervals.

Main members of Ttext:

{Property} Text          string;     //text content Font          : TFont;      //Font Fill          : Tbrush;     //Text painting Brush //Horizontal alignment //Vertical alignment AutoSize      : Boolean;    //Change the size of the control to fit the text Stretch       : Boolean;    //Stretch text to fit the control WordWrap      : Boolean;    //Whether to break the line {method} //re-align

TFont (from FMX.) Types) 's main members:

{Property} Family:tfontname;   //Name Size   : Single;      //Size Style  //Styles

Timage Main Members:
{Property} Bitmap               : tbitmap;        //Image Bitmapmargins        : tbounds;        //Edge blank WrapMode             //enumeration; iworiginal, Iwfit, Iwstretch, Iwtile (primitive, fit, stretched, tiled)Disableinterpolation:boolean;        //Whether to use (pixel) Insert algorithm
Other Timageviewer, Timagecontrol and Timage are similar.
Timageviewer inherit from TScrollBox, can automatically add scroll bar;
Timagecontrol inherits from Tstyledcontrol, can be styled, and can render focus when selected.

// Convert form coordinates to local coordinates
Tcontrol.localtoabsolute; Converts the local coordinates to the form coordinates.

Tcontrol.scale will affect absolutetolocal, localtoabsolute results.

Firemonkey Primer (3)-Talphacolor Ttext, Timage

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.