CompositeFont: Difference between revisions
From GiderosMobile
Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:CompositeFont --> '''<translate>Supported platforms</translate>:''' File:Platform android.pngFile:Platform ios.pngFile:Platfo..." |
No edit summary |
||
| 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> === | ||
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 | |||
an outlined font to create bordered font, and possibly more effects. | === <translate>Example</translate> === | ||
=== <translate> | |||
<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 04:23, 10 January 2020
Supported platforms: ![]()
![]()
![]()
![]()
![]()
![]()
![]()
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
}
MethodsCompositeFont.new creates a new CompositeFont object |
EventsConstants |