This wiki is out of date, use the continuation of this wiki instead

Blendop tint

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 12:31, 17 January 2008 (edit)
Sandman (Talk | contribs)
m
← Previous diff
Current revision (23:19, 17 January 2008) (edit) (undo)
Sandman (Talk | contribs)
m
 
Line 3: Line 3:
==Definition== ==Definition==
-'''INT''' blendop_tint ( <'''INT''' blendopID> , <'''FLOAT''' amount> , <'''BYTE''' r> , <'''BYTE''' g> , <'''BYTE''' b> )+'''INT''' blendop_tint ( <'''INT''' blendTable> , <'''FLOAT''' amount> , <'''BYTE''' r> , <'''BYTE''' g> , <'''BYTE''' b> )
-Modify the [[blend table]] of the [[blend operation]] by tinting the colours with the specified colour. This means that the [[graphic]] the blend operation is assigned to will appear more like the specified colour, depending on the amount.+Modify the [[blend table]] by tinting the colours with the specified colour. This means that the [[graphic]] the blend operation is assigned to will appear more like the specified colour, depending on the amount.
This will modify the source section of the [[blend table]], but leave the destination section as it was. This will modify the source section of the [[blend table]], but leave the destination section as it was.
Line 11: Line 11:
== Parameters == == Parameters ==
{| {|
-| '''INT''' blendopID || - The [[blendopID]] of the [[blendop]] to tint.+| '''INT''' blendTable || - The [[blend table]] to tint.
|- |-
| '''FLOAT''' amount || - The amount to use the specified colour (0-1). | '''FLOAT''' amount || - The amount to use the specified colour (0-1).

Current revision


Contents

[edit] Definition

INT blendop_tint ( <INT blendTable> , <FLOAT amount> , <BYTE r> , <BYTE g> , <BYTE b> )

Modify the blend table by tinting the colours with the specified colour. This means that the graphic the blend operation is assigned to will appear more like the specified colour, depending on the amount.

This will modify the source section of the blend table, but leave the destination section as it was.

[edit] Parameters

INT blendTable - The blend table to tint.
FLOAT amount - The amount to use the specified colour (0-1).
BYTE r - The red component of the colour to be used for the tinting.
BYTE g - The green component of the colour to be used for the tinting.
BYTE b - The blue component of the colour to be used for the tinting.

[edit] Returns

INT : true


Blendops Functions
Blendop_apply() • Blendop_assign() • Blendop_free() • Blendop_grayscale() • Blendop_identity() • Blendop_intensity() • Blendop_new() • Blendop_swap() • Blendop_tint() • Blendop_translucency() •

[edit] Notes

To further clarify what is done to the assigned graphic, there is this formula: VisibleColour = graphicColour * (1-amount) + specifiedColour * amount So it is clear that the result will be a mix of the specified colour and the original graph.

Personal tools