- This wiki is out of date, use the continuation of this wiki instead
Blendop translucency
From FenixWiki
(Difference between revisions)
Revision as of 12:22, 17 January 2008 (edit) Sandman (Talk | contribs) m ← Previous diff |
Current revision (23:31, 17 January 2008) (edit) (undo) Sandman (Talk | contribs) m |
||
(One intermediate revision not shown.) | |||
Line 3: | Line 3: | ||
==Definition== | ==Definition== | ||
- | '''INT''' blendop_translucency ( <'''INT''' | + | '''INT''' blendop_translucency ( <'''INT''' blendTable> , <'''FLOAT''' amount> ) |
- | Modify the [[blend table | + | Modify the [[blend table]] by setting how much the object is visible and how much what is behind the source. This means that the [[graphic]] the blend operation is assigned to will appear translucent or transparent. |
This will modify both the source and destination section of the [[blend table]]. The source is multiplied by <code>''amount''</code> and the destination is multiplied by <code>1-''amount''</code>. | This will modify both the source and destination section of the [[blend table]]. The source is multiplied by <code>''amount''</code> and the destination is multiplied by <code>1-''amount''</code>. | ||
Line 11: | Line 11: | ||
== Parameters == | == Parameters == | ||
{| | {| | ||
- | | '''INT''' | + | | '''INT''' blendTable || - The [[blend table]] to modify. |
|- | |- | ||
| '''FLOAT''' amount || - Opacity factor ( 1 (opaque) - 0 (transparent) ). | | '''FLOAT''' amount || - Opacity factor ( 1 (opaque) - 0 (transparent) ). |
Current revision
Contents |
[edit] Definition
INT blendop_translucency ( <INT blendTable> , <FLOAT amount> )
Modify the blend table by setting how much the object is visible and how much what is behind the source. This means that the graphic the blend operation is assigned to will appear translucent or transparent.
This will modify both the source and destination section of the blend table. The source is multiplied by amount
and the destination is multiplied by 1-amount
.
[edit] Parameters
INT blendTable | - The blend table to modify. |
FLOAT amount | - Opacity factor ( 1 (opaque) - 0 (transparent) ). |
[edit] Returns
INT : true
[edit] Notes
To set an amount of 0.5 is the same as doing using a blit flag of B_TRANSLUCENT.
Blendops Functions | |
• Blendop_apply() • Blendop_assign() • Blendop_free() • Blendop_grayscale() • Blendop_identity() • Blendop_intensity() • Blendop_new() • Blendop_swap() • Blendop_tint() • Blendop_translucency() • |