Difference between revisions of "Reference: MSEgui/TFace"
MichaelEbner (talk | contribs) (→Fade) |
MichaelEbner (talk | contribs) (→Fade) |
||
Line 60: | Line 60: | ||
property Fade_opapos: trealarrayprop; | property Fade_opapos: trealarrayprop; | ||
property fade_opacolor: tfadeopacolorarrayprop; | property fade_opacolor: tfadeopacolorarrayprop; | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ===FrameImage=== | ||
+ | |||
+ | With the property FrameImage you can paint individual frames by using a TImageList. In the imalge list their are used 8 consecutive images. The images for the edges will be stretched as needed - this will look very strange, if this images are not suitable (look the followong picture). | ||
+ | |||
+ | [[Image:msegui_face_frameimage.png]] | ||
+ | |||
+ | <syntaxhighlight> | ||
+ | property FrameImage_list: timagelist; | ||
+ | // imagenr 0 = topleft, 1 = left, 2 = bottomleft, 3 = bottom, | ||
+ | // 4 = bottomright 5 = right, 6 = topright, 7 = top | ||
+ | property FrameImage_offset: integer default 0; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 09:15, 18 December 2015
TFace
Reference
Hierarchy
- TObject
- TPersistent
- TVirtualPersistent
- TNullInterfacesPersistent
- TOptionalPersistent
- TCustomFace
- TFace
Properties
Fade
You can specify a color fade with two or more colors. (You can specify with one color too, but that's no fade...)
The picture was generated with the following code. Please not, that green is not exactly in the middle, but moved to the left - the position isn't 0.5, it's 0.3.
procedure tmainfo.Button3Execute(const sender: TObject);
begin
Button3.Face := TFace.Create;
Button3.Face.Fade_color.Count := 3;
Button3.Face.Fade_color.Items[0] := cl_red;
Button3.Face.Fade_color.Items[1] := cl_green;
Button3.Face.Fade_color.Items[2] := cl_blue;
Button3.Face.Fade_pos.Count := 3;
Button3.Face.Fade_pos.Items[0] := 0;
Button3.Face.Fade_pos.Items[1] := 0.3;
Button3.Face.Fade_pos.Items[2] := 1;
end;
With the Fade_direction you specify the direction:
property fade_direction: graphicdirectionty default gd_right;
You can also specify a opacity and a fade of it. In the following the left picture is without opacity, the middle is with a opacity fade from cl_white to cl_black from 0.7 to 1, and the right picture is a opacity fade from cl_white to cl_black from 0 to 1 and a underlying picture and options = [fao_fadeoverlay].
With the property Fade_opacity you can specify a opacity for the whole face without any fade. Typical opacity colors are cl_black and cl_white, but you can use every other color.
property Fade_opacity: colorty default cl_none;
property Fade_opapos: trealarrayprop;
property fade_opacolor: tfadeopacolorarrayprop;
FrameImage
With the property FrameImage you can paint individual frames by using a TImageList. In the imalge list their are used 8 consecutive images. The images for the edges will be stretched as needed - this will look very strange, if this images are not suitable (look the followong picture).
property FrameImage_list: timagelist;
// imagenr 0 = topleft, 1 = left, 2 = bottomleft, 3 = bottom,
// 4 = bottomright 5 = right, 6 = topright, 7 = top
property FrameImage_offset: integer default 0;
Methods
Events
known issues
issues of the class
issues of this documentation
Feel free to add your points here.