Blendop tint

From Bennu Wiki
Revision as of 07:09, 25 July 2012 by Kloppix (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Definition

INT blendop_tint ( <INT blendTable> , <FLOAT amount> , <INT r> , <INT g> , <INT 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.

Parameters

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

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()

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.