Copyright © 2003-2010 MultiMedia Soft

How to apply a texture to the control surface

Previous pageReturn to chapter overviewNext page

The simplest way to apply a texture over the control surface is to open, at Design-time, the 3D Button Visual Editor application from inside the Visual Studio.NET IDE as described inside the chapter Editing control properties through the 3D Button Visual Editor application contained inside the How to use the product in your projects section and selecting the editor "Texture" tab.

Supported texture formats are:

BMP

JPG

PNG

Below you can see a sample of a button with a blue marble texture applied.

3dcm_i000072

Note: The image below has hot links to take you to explanations of the various settings.

3dcm_i000102

 

 

Item name

Description

Corresponding property


Texture preview

Preview of the loaded texture picture

Texture.Filepath or PictureTexture


Mode

The mode used to display a texture over the button surface.

Texture.Mode


Mix with Color

The color that will be mixed to the texture.

Texture.ColorToMix


"Change..." button

This button will open the color choice dialog box

 


"Undefine" button

This button will set the color mixed to the texture to an undefined state: when a color is set to undefined no color mixing is performed.

The undefined state is represented with the 3dcm_i00005a symbol in place of the color.

 


Mix percentage

The mixing percentage between the texture and the chosen color.

Texture.PercentageColorMix


Light intensity percentage

The intensity of the light hitting the texture

Texture.LightIntensity


3dcm_i000013 Browse button

Browses the current PC folders for a texture picture.

 


3dcm_i000015Delete button

Deletes the current texture picture

 

The Texture property is internally implemented as an "expandable object" of class TextureDesc: thanks to this "object oriented" approach, this property has a set of sub-properties that allow a better control of the texture rendering.

 

At Run-time the texture picture can be changed using the following methods:

SetPictureFromHandle method to change the texture picture using a bitmap loaded in memory, identified by a bitmap handle.