[a supprimer] PS la couleur de fond de mon texte ne s'affiche pas
59cortex59
Messages postés11Date d'inscriptionlundi 31 mars 2008StatutMembreDernière intervention15 janvier 2009
-
31 mars 2008 à 11:17
NHenry
Messages postés15090Date d'inscriptionvendredi 14 mars 2003StatutModérateurDernière intervention 6 novembre 2023
-
31 mars 2008 à 17:03
bonjour,
je voudrais afficher du texte qui change de couleur sur un fond rouge.
Le texte s'affiche et change de couleur, mais la couleur de fond ne s'affiche pas!!
j'aurai besoin d'une aide svp
merci
voici mon code :
/******************************************************************************
* Textback Class
******************************************************************************/
Textback.prototype = new DynamicComponent();
Textback.parent = DynamicComponent.prototype;
Textback.prototype.constructor = Textback;
/******************************************************************************
* Constructor
******************************************************************************/
function Textback()
{
}
/******************************************************************************
* Initialize object
* svgId -> Id of SVG node
* objectName -> global variable name of the object
******************************************************************************/
Textback.prototype.init = function(svgId, objectName)
{
Textback.parent.init.call(this, svgId, objectName, false);
this.m_SizeFont = GetVisioPropAsInt(this.m_SvgNode, "FontSize");
/******************************************************************************
* Callback for refresh event
******************************************************************************/
Textback.prototype.OnRefresh = function()
{
// Get the value
var value = this.m_arrayValueDefinition[0].getValue();
var coltext = colortext;
var red = Math.round((coltext & 0x000000FF) >> 0);
var green = Math.round((coltext & 0x0000FF00) >> 8);
var blue = Math.round((coltext & 0x00FF0000) >> 16);
var fill = "fill:rgb("+ red +","+ green+","+blue+")";
var size = "font-size:"+this.m_SizeFont;
var fontType = "font-family:Arial Unicode MS"
this.m_txtParentElem.setAttribute("style", fill+";"+size+";"+fontType);