Difference between revisions of "Path2D:setFillColor"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2016.04<br/> === Description === Sets fill color <source lang="lua"> = Path2D:setFillColor(coloralpha,) </source> '''color:''' (hex) c...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2016.04<br/>
 
'''Available since:''' Gideros 2016.04<br/>
 +
'''Class:''' [[Path2D]]<br/>
 +
 
=== Description ===
 
=== Description ===
Sets fill color
+
Sets fill color.
<source lang="lua">
+
<syntaxhighlight lang="lua">
= Path2D:setFillColor(coloralpha,)
+
Path2D:setFillColor(color,alpha)
</source>
+
</syntaxhighlight>
'''color:''' (hex) color to use ''''''<br/>
+
 
'''alpha:''' (number) opacity of fill from 0 to 1, default 1 '''optional'''<br/>
+
'''Since Gideros 2019.12, this function accepts gradients the same way as Pixel:setColor().'''
 +
 
 +
=== Parameters ===
 +
'''color''': (hex) color to use<br/>
 +
'''alpha''': (number) opacity of fill from 0 to 1, default 1 '''optional'''<br/>
 +
 
 +
{{Path2D}}

Latest revision as of 14:31, 13 July 2023

Available since: Gideros 2016.04
Class: Path2D

Description

Sets fill color.

Path2D:setFillColor(color,alpha)

Since Gideros 2019.12, this function accepts gradients the same way as Pixel:setColor().

Parameters

color: (hex) color to use
alpha: (number) opacity of fill from 0 to 1, default 1 optional