media @ VU
web3d-STText.vr
web3d-STText.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
Web3D/VR
STText
# In Contact 4.3 there is the new option of creating a
# textured rectangle for each character. The
# user first must supply a special Font texture in a
# ImageTexture node and sets the fontstyle
# family attribute to "TEXTURE".
#
# The Text attributes length and maxExtent, the FontStyle
# attributes size, spacing, leftToRight, topToBottom, justify
# and style = PLANE or ITALIC are implemented for TEXTURE text.
# The square texture map is divided into 16*16 cells for 256 different
# characters, the character 0 start in the upper left corner
# of the pixel image. The character width is scaled by 0.8. The
# Appearance node or Texture node should be reused between
# different text strings for speed.
#
# For special effects or fonts the texture map can be tuned.
# Using textures with alpha (or a transparent GIF) can give a
# transparent background. Using grayscale or black & white textures
# allows color changes using the Material diffuseColor.
#
# To further optimize the Text texture resolution and layout
# custom layout settings can be specified with up to 7 numbers
# after the family "TEXTURE" string. The format is "TEXTURE
# minChar maxChar cols rows aspect extraSpace shift"
proto
PROTO STText [
exposedField MFString string []
] {
Shape {
appearance Appearance {
texture ImageTexture {
url "font.gif"
repeatS FALSE
repeatT FALSE
}
material Material { diffuseColor 1 1 1 }
}
geometry Text {
string IS string
fontStyle FontStyle {
family ["TEXTURE 32 92 15 4 1.28 0 0"]
justify "LEFT"
}
}
}
}
(C) A. Eliëns
21/5/2007
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.