FMX.Objects.TCustomPath.Data

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

property Data: TPathData read FData write SetPathData;

C++

__property Fmx::Graphics::TPathData* Data = {read=FData, write=SetPathData};

Propriétés

Type Visibilité  Source Unité  Parent
property public
FMX.Objects.pas
FMX.Objects.hpp
FMX.Objects TCustomPath


Description

Spécifie les données SVG utilisées pour construire des formes graphiques.

La propriété Data prend en charge uniquement une liste d'instructions, séparées par des virgules, définie pour l'attribut d de l'élément path dans SVG 1.0 (EN).

Dans SVG 1.0, l'attribut d contient les instructions moveto, line, curve, arc et closepath. Toutes les instructions sont exprimées sous la forme d'un caractère (par exemple, l'instruction moveto est exprimée sous la forme M).

Pour plus d'informations, voir Scalable Vector Graphics (SVG) 1.0 Specification (EN).

Exemple

A titre explicatif, considérez les extraits de code suivants qui spécifient les instructions SVG à l'exécution :

Delphi :
Path1.Data.Data := 'M 1,0, L 2,1, L 1,2, L 0,1, L 1,0';

C++Builder :

Path1->Data->Data = "M 1,0, L 2,1, L 1,2, L 0,1, L 1,0";

Une application qui utilise les instructions SVG mentionnées ci-dessus affiche un losange :

Rhomb.png

Voir aussi