Fixed some problems where AColor was not used correctly; documentation of AColor.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@849 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-05-16 20:22:39 +00:00
parent fdb3bda26e
commit bcfa07a724
5 changed files with 29 additions and 21 deletions
+15 -7
View File
@@ -2,20 +2,28 @@ Primitive type: color
--Syntax--
In files and scritps a color can be represented as
<pre>rgb(<i>red_component</i>, <i>green_component</i>, <i>blue_component</i>)</pre>
<pre><span class='hl-kw'>rgb</span>(<i>red_component</i>, <i>green_component</i>, <i>blue_component</i>)</pre>
where red_component, green_component and blue_component are numbers between 0 and 255 (inclusive).
In some places MSE also supports colors with a transparency value, notated as
<pre><span class='hl-kw'>rgba</span>(<i>red_component</i>, <i>green_component</i>, <i>blue_component</i>, <i>alpha_component</i>)</pre>
An alpha value of @0@ indicates a transparent color, an alpha value of @255@ is completely opaque.
--Named colors--
MSE also supports named colors, for instance @"white"@ is the same as @rgb(255,255,255)@.
For a full list of supported colors, see [[http://www.wxwidgets.org/manuals/stable/wx_wxcolourdatabase.html|the wxWidgets documentation]].
In addition, the named color @"transparent"@ stands for the completely transparent color, @rgba(0,0,0,0)@.
In scripts named colors are represented as [[type:string]]s.
--Examples--
For example:
! Code Represents <<<
| @rgb(255,255,255)@ white <div style="border:1px solid black; background:white;width:30px;height:15px;"> </div>
| @rgb(0,0,0)@ black <div style="border:1px solid black; background:black;width:30px;height:15px;"> </div>
| @rgb(255,0,0)@ red <div style="border:1px solid black; background:red; width:30px;height:15px;"> </div>
| @rgb(0,255,0)@ green <div style="border:1px solid black; background:rgb(0,255,0);width:30px;height:15px;"> </div>
| @rgb(0,0,255)@ blue <div style="border:1px solid black; background:blue; width:30px;height:15px;"> </div>
! Code Represents <<<
| @rgb(255,255,255)@ white <div style="border:1px solid black; background:white;width:30px;height:15px;"> </div>
| @rgb(0,0,0)@ black <div style="border:1px solid black; background:black;width:30px;height:15px;"> </div>
| @rgb(255,0,0)@ red <div style="border:1px solid black; background:red; width:30px;height:15px;"> </div>
| @rgb(0,255,0)@ green <div style="border:1px solid black; background:rgb(0,255,0);width:30px;height:15px;"> </div>
| @rgb(0,0,255)@ blue <div style="border:1px solid black; background:blue; width:30px;height:15px;"> </div>
| @rgba(0,0,0,0)@ transparent <div style="border:1px solid black; width:30px;height:15px;text-align:center;">over</div>
| @rgba(255,0,0,128)@ transparent red <div style="border:1px solid black; background:rgb(255,128,128);color:rgb(128,0,0);width:30px;height:15px;text-align:center;">over</div>
| @rgba(0,0,255,192)@ transparent blue <div style="border:1px solid black; background:rgb(64,64,255);color:rgb(0,0,192);width:30px;height:15px;text-align:center;">over</div>
+1 -1
View File
@@ -19,7 +19,7 @@ A reference to a normal [[type:font]] for drawing text.
| @shadow displacement x@ [[type:double]] @0@ Relative position of the shadow in pixels. A shadow is only drawn if the displacement is nonzero.
| @shadow displacement y@ [[type:double]] @0@ ^^^
| @shadow blur@ [[type:double]] @0@ How much should the shadow be blurred?
| @separator color@ [[type:color]] @rgb(128,128,128)@ Color for @"<sep-soft>"@ tags inserted by the [[fun:combined_editor]] function.
| @separator color@ [[type:color]] @rgba(0,0,0,128)@ Color for @"<sep-soft>"@ tags inserted by the [[fun:combined_editor]] function.
--Example--
>font: