Difference between revisions of "API Panel.Graphics.DrawText"

From Flowcode Help
Jump to navigationJump to search
(XML import)
(XML import)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<sidebar>API contents</sidebar>
+
<sidebar>API Contents</sidebar>
 
Draws a line of text texture
 
Draws a line of text texture
  
 
<div style="width:25%; float:right" class="toc">
 
<div style="width:25%; float:right" class="toc">
===Class hierarchy===[[API Panel|Panel]]
+
====Class hierarchy====
 +
[[API Panel|Panel]]
 
:[[API Panel.Graphics|Graphics]]
 
:[[API Panel.Graphics|Graphics]]
 
::[[API Panel.Graphics|DrawText]]
 
::[[API Panel.Graphics|DrawText]]
Line 10: Line 11:
  
 
==Parameters==
 
==Parameters==
''[[Variable types|FLOAT]] X''
+
[[Variable Types|FLOAT]] ''X''
 
:Initial horizontal position of text (depends on Align)
 
:Initial horizontal position of text (depends on Align)
  
''[[Variable types|FLOAT]] Y''
+
[[Variable Types|FLOAT]] ''Y''
 
:Initial vertical position of text (depends on Align)
 
:Initial vertical position of text (depends on Align)
  
''[[Variable types|STRING]] Text''
+
[[Variable Types|STRING]] ''Text''
 
:The text to draw, may be multiple lines
 
:The text to draw, may be multiple lines
  
''[[Variable types|BYTE]] Align''
+
[[Variable Types|BYTE]] ''Align''
 
:The text alignment
 
:The text alignment
 
:''The default value for this parameter is: '''''0'''
 
:''The default value for this parameter is: '''''0'''
''Typical values for this parameter:''
+
:''Typical values for this parameter:''
{| class="wikitable" |+width="20%"|Type|width="30%"|Name |width="40%"|Value|-LONG|Align_TopLeft|0
+
::{| class="wikitable" width="65%"
|-LONG|Align_TopCenter|1
+
|-
|-LONG|Align_TopRight|2
+
! width="30%" |Name
|-LONG|Align_CenterLeft|4
+
! width="55%" |Description
|-LONG|Align_Center|5
+
|-
|-LONG|Align_CenterRight|6
+
|Align_TopLeft
|-LONG|Align_BottomLeft|8
+
|Text is left aligned and drawn below the Y coordinate
|-LONG|Align_BottomCenter|9
+
|-
|-LONG|Align_BottomRight|10
+
|Align_TopCenter
 +
|Text is center aligned and drawn below the Y coordinate
 +
|-
 +
|Align_TopRight
 +
|Text is right aligned and drawn below the Y coordinate
 +
|-
 +
|Align_CenterLeft
 +
|Text is left aligned and vertically centered
 +
|-
 +
|Align_Center
 +
|Text is horizontally aligned and vertically centered
 +
|-
 +
|Align_CenterRight
 +
|Text is right aligned and vertically centered
 +
|-
 +
|Align_BottomLeft
 +
|Text is left aligned and drawn above the Y coordinate
 +
|-
 +
|Align_BottomCenter
 +
|Text is center aligned drawn above the Y coordinate
 +
|-
 +
|Align_BottomRight
 +
|Text is right aligned drawn above the Y coordinate
 
|}
 
|}
 +
  
 
==Return value==
 
==Return value==
 
''This call does not return a value''
 
''This call does not return a value''
 +
  
 
==Detailed description==
 
==Detailed description==
''No additional information''
+
''<span style="color:red;">No additional information</span>''
 +
 
  
 
==Examples==
 
==Examples==
 
===Calling in a calculation===
 
===Calling in a calculation===
 
* Add to a calculation icon: <pre class="brush:[cpp]">::Panel.Graphics.DrawText(x, y, "text", ::Panel.Graphics.Align_TopLeft)</pre>
 
* Add to a calculation icon: <pre class="brush:[cpp]">::Panel.Graphics.DrawText(x, y, "text", ::Panel.Graphics.Align_TopLeft)</pre>
 +
 +
''<span style="color:red;">No additional examples</span>''

Latest revision as of 15:57, 16 January 2014

<sidebar>API Contents</sidebar> Draws a line of text texture

Class hierarchy

Panel

Graphics
DrawText

Parameters

FLOAT X

Initial horizontal position of text (depends on Align)

FLOAT Y

Initial vertical position of text (depends on Align)

STRING Text

The text to draw, may be multiple lines

BYTE Align

The text alignment
The default value for this parameter is: 0
Typical values for this parameter:
Name Description
Align_TopLeft Text is left aligned and drawn below the Y coordinate
Align_TopCenter Text is center aligned and drawn below the Y coordinate
Align_TopRight Text is right aligned and drawn below the Y coordinate
Align_CenterLeft Text is left aligned and vertically centered
Align_Center Text is horizontally aligned and vertically centered
Align_CenterRight Text is right aligned and vertically centered
Align_BottomLeft Text is left aligned and drawn above the Y coordinate
Align_BottomCenter Text is center aligned drawn above the Y coordinate
Align_BottomRight Text is right aligned drawn above the Y coordinate


Return value

This call does not return a value


Detailed description

No additional information


Examples

Calling in a calculation

  • Add to a calculation icon:
    ::Panel.Graphics.DrawText(x, y, "text", ::Panel.Graphics.Align_TopLeft)

No additional examples