SGR GetTexteSize-EN : Différence entre versions

De BlueWiki
(Parameters)
 
(3 révisions intermédiaires par un utilisateur sont masquées)
Ligne 1 : Ligne 1 :
[[Composant_Graphe_SVG-EN#Commands|Component Command List ]]
+
[[Composant_Graphe_SVG-EN#Commands|Component Command List ]] - [[SGR_GetTexteSize|Version française]]
 
+
[[SGR_GetTexteSize|Version française]]
+
 
=== Parameters ===
 
=== Parameters ===
!Paramètres
+
{| class="wikitable"
 +
 +
!Parameters
 
!Type
 
!Type
 
!
 
!
!N° du paramètre
+
!Parameter
 
!Description
 
!Description
  
 
|-
 
|-
 
|valign="top"|Texte à évaluer
 
|valign="top"|Texte à évaluer
|valign="top"|Texte
+
|valign="top"|Text
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top" align="center"|1
 
|valign="top" align="center"|1
|Texte dont vous voulez évaluer la taille
+
|Text for which you want to evaluate the size
  
 
|-
 
|-
|valign="top"|Police
+
|valign="top"|Font name
|valign="top"|Texte
+
|valign="top"|Text
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top" align="center"|2
 
|valign="top" align="center"|2
|Police de caractère à appliquer au texte
+
|Font applied to the text
  
 
|-
 
|-
 
|valign="top"|FontSize
 
|valign="top"|FontSize
|valign="top"|Entier long
+
|valign="top"|long
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top" align="center"|3
 
|valign="top" align="center"|3
|Taille de la police du texte
+
|Font size of the text
  
 
|-
 
|-
 
|valign="top"|FontStyle
 
|valign="top"|FontStyle
|valign="top"|Entier Long
+
|valign="top"|Long
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top"|[[File:in.png|caption]]
 
|valign="top" align="center"|4
 
|valign="top" align="center"|4
|Style de la police du texte
+
|Font style of text
  
 
|-
 
|-
|Retour
+
|Result
|Texte
+
|Texte JSON
 
|[[File:out.png|caption]]
 
|[[File:out.png|caption]]
 
|valign="top" align="center"|
 
|valign="top" align="center"|
|Json du type : {"width":"201","height":"25"}
+
|JSON like this one : {"width":"201","height":"25"}
  
 
|}
 
|}
 +
 +
=== Description ===
 +
----
 +
This command provides the width of a text in a given with a given size and font style.
 +
 +
She has a big advantage over the 4D command "OBJECT GET BEST SIZE", it does not need to have an object and therefore works even outside of a form.
 +
 +
This command uses the rendering engine of 4D SVG, so there may be a gap of a few pixels with the rendering of a 4D form either on screen or in print.
 +
 +
=== Code exemple===
 +
----
 +
 +
$JsonSize:=SGR_GetTexteSize("MyText";"Arial";48;Bold)
 +
 +
You will get in $JsonSize : {"width":"223","height":"63"}

Version actuelle en date du 2 juillet 2014 à 19:17

Component Command List - Version française

[modifier] Parameters

Parameters Type Parameter N° Description
Texte à évaluer Text caption 1 Text for which you want to evaluate the size
Font name Text caption 2 Font applied to the text
FontSize long caption 3 Font size of the text
FontStyle Long caption 4 Font style of text
Result Texte JSON caption JSON like this one : {"width":"201","height":"25"}

[modifier] Description


This command provides the width of a text in a given with a given size and font style.

She has a big advantage over the 4D command "OBJECT GET BEST SIZE", it does not need to have an object and therefore works even outside of a form.

This command uses the rendering engine of 4D SVG, so there may be a gap of a few pixels with the rendering of a 4D form either on screen or in print.

[modifier] Code exemple


$JsonSize:=SGR_GetTexteSize("MyText";"Arial";48;Bold)

You will get in $JsonSize : {"width":"223","height":"63"}