Difference between revisions of "CompositeFont"

(Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:CompositeFont --> '''<translate>Supported platforms</translate>:''' File:Platform android.pngFile:Platform ios.pngFile:Platfo...")
 
Line 5: Line 5:
 
'''<translate>Available since</translate>:''' Gideros 2019.1<br/>
 
'''<translate>Available since</translate>:''' Gideros 2019.1<br/>
 
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/FontBase|FontBase]]<br/>
 
'''<translate>Inherits from</translate>:''' [[Special:MyLanguage/FontBase|FontBase]]<br/>
 +
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
<translate><br />
+
The CompositeFont class is used to define fonts composed from other fonts. It allows to mix a regular font with an outlined font to create bordered font, and possibly more effects.
The [[Special:MyLanguage/CompositeFont|CompositeFont]] class is used to define fonts composed from other fonts. It allows to mix a regular font with
+
 
an outlined font to create bordered font, and possibly more effects. <br />
+
=== <translate>Example</translate> ===
<br /></translate>
 
=== <translate>Examples</translate> ===
 
'''Example'''<br/>
 
 
<source lang="lua">
 
<source lang="lua">
 
local cf= CompositeFont.new{
 
local cf= CompositeFont.new{
{ font=outlinefont, color=0x000000 }, --Outlined font will be rendered in black
+
{ font=outlinefont, color=0x000000 }, --Outlined font will be rendered in black
{ font=normalfont, x=1,y=2 }, --Normal font is drawn on top, with color coming from textfield and offseted by (1,2) logical coordinates
+
{ font=normalfont, x=1,y=2 }, --Normal font is drawn on top, with color coming from textfield and offseted by (1,2) logical coordinates
 
}
 
}
 
</source>
 
</source>
 +
 
{|-
 
{|-
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Methods</translate> ===
 
=== <translate>Methods</translate> ===
[[Special:MyLanguage/CompositeFont.new|CompositeFont.new]] ''<translate>creates a new CompositeFont object</translate>''<br/><!-- GIDEROSMTD:CompositeFont.new(definition) creates a new CompositeFont object -->
+
[[Special:MyLanguage/CompositeFont.new|CompositeFont.new]] ''<translate>creates a new CompositeFont object</translate>''<br/>
 +
<!-- GIDEROSMTD:CompositeFont.new(definition) creates a new CompositeFont object -->
 +
 
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== <translate>Events</translate> ===
 
=== <translate>Events</translate> ===
 
=== <translate>Constants</translate> ===
 
=== <translate>Constants</translate> ===
 
|}
 
|}
 +
 +
<!--{{CompositeFont}}-->

Revision as of 05:23, 10 January 2020


Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2019.1
Inherits from: FontBase

Description

The CompositeFont class is used to define fonts composed from other fonts. It allows to mix a regular font with an outlined font to create bordered font, and possibly more effects.

Example

local cf= CompositeFont.new{
	{ font=outlinefont, color=0x000000 }, --Outlined font will be rendered in black
	{ font=normalfont, x=1,y=2 }, --Normal font is drawn on top, with color coming from textfield and offseted by (1,2) logical coordinates
}

Methods

CompositeFont.new creates a new CompositeFont object

Events

Constants