SetTexture()

Example 1:

To set the Texture effect on the NormalObject State for an Image object named IntroGraph with a Silk gloss and an image file named CompLogo.bmp that is stretched over the surface of the Image object, use the following syntax:

ImageUsed = SYSTEM_PUBLICATION_DIR + "\\CompLogo.bmp"
IntroGraph.SetTexture("Silk",false,false,ImageUsed,false)

Note:
In Example 1 above, the variable ImageUsed contains the pathname to the image (CompLogo.bmp) that will be used to create the texture – the <SYSTEM_PUBLICATION_DIR> is a System variable that contains the pathname of the current publication.

Example 2:

To set the same Texture effect as Example 1 above on the Mouse Over Object State for an Image object named IntroGraph, use the following syntax:

ImageUsed = SYSTEM_PUBLICATION_DIR + "\\CompLogo.bmp "
createEffect = IntroGraph.GetAppearance("Mouse Over")
createEffect.SetTexture("Silk",false,false,ImageUsed)

 

see also:RemoveTexture and GetAppearance

Close