View Single Post
06-30-12, 05:03 PM   #9
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by Neza View Post
The interesting part for me here would be if this works on dynamic textures like player portraits and npc portraits.

Most posts i've found said something its not possible.
No, those are actually rendered on the spot then applied to a texture with the circle mask. Sadly there is no way to get in between the rendering and masking processes. The closest you could get would be to use a PlayerModel object and use the SetUnit() method, but that would create an animated model instead of the still portrait you see.



Edit: CharacterMicroButton seems to achieve a rectangular unit portrait by setting texcoords. The following has been found in MainMenuBarMacroButtons.xml.

Code:
<Texture name="MicroButtonPortrait">
	<Size>
		<AbsDimension x="18" y="25"/>
	</Size>
	<Anchors>
		<Anchor point="TOP">
			<Offset>
				<AbsDimension x="0" y="-28"/>
			</Offset>
		</Anchor>
	</Anchors>
	<TexCoords left="0.2" right="0.8" top="0.0666" bottom="0.9"/>
</Texture>
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 06-30-12 at 05:19 PM.
  Reply With Quote