m
Move page script moved page API LayeredRegion SetVertexColor to WoW:API LayeredRegion SetVertexColor without leaving a redirect
(Changing Aerobrain to Omnigrok (user switched handles)) |
m (Move page script moved page API LayeredRegion SetVertexColor to WoW:API LayeredRegion SetVertexColor without leaving a redirect) |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{{widgetmethod}} | |||
<!-- note that API FontString SetVertexColor redirects to this page also /Mikk --> | <!-- note that API FontString SetVertexColor redirects to this page also /Mikk --> | ||
Sets the color of an object. | Sets the color of an object. | ||
obj:SetVertexColor(red, green, blue); | obj:SetVertexColor(red, green, blue[, alpha]); | ||
---- | ---- | ||
| Line 13: | Line 13: | ||
; green : The green color value to set the object to. The range is 0 to 1. | ; green : The green color value to set the object to. The range is 0 to 1. | ||
; blue : The blue color value to set the object to. The range is 0 to 1. | ; blue : The blue color value to set the object to. The range is 0 to 1. | ||
; alpha : The alpha value to set the object to. The range is 0 to 1. | |||
---- | ---- | ||
| Line 38: | Line 39: | ||
: You have a background layer with a texture (named 'myModBackground') set as a filled color of (decimal RGB triplet) '0.5,0,0.5'. | : You have a background layer with a texture (named 'myModBackground') set as a filled color of (decimal RGB triplet) '0.5,0,0.5'. | ||
: You execute the following in one of your functions: | : You execute the following in one of your functions: | ||
: <code>_G["myModBackground"]:SetVertexColor(0.5,1,0.5);</code> | |||
: The result would be that the color for 'myModBackground' is set to (0.25,0,0.25), not (0.5,1,0.5). | : The result would be that the color for 'myModBackground' is set to (0.25,0,0.25), not (0.5,1,0.5). | ||
| Line 47: | Line 48: | ||
: Presumably this method sets all four vertexes of the quad used to make up interface elements to the given color, creating a filtering effect. The color is a direct filtering effect. Each color component of the object will be multiplied by the value given to determine the final color. | : Presumably this method sets all four vertexes of the quad used to make up interface elements to the given color, creating a filtering effect. The color is a direct filtering effect. Each color component of the object will be multiplied by the value given to determine the final color. | ||
: So, setting (1.0, 1.0, 0.0) on a white object will color it yellow. But doing the same thing on a blue object will make it black. Be careful when using this on textured items. | : So, setting (1.0, 1.0, 0.0) on a white object will color it yellow. But doing the same thing on a blue object will make it black. Be careful when using this on textured items. | ||