/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-*-
Add Text
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-**-*-*-*-*-*-*-*-*-*-*-*-*-
343164
public function addText($text, $pos = '20x20', $padding = 0, $fontColor = '#fff', $fontSize = 12, $angle = 0, $font = null)
		# Author:     Jarrod Oberto
		# Date:       18-11-09
		# Purpose:    Add text to an image
		# Param in:
		# Param out:
		# Reference:  http://php.net/manual/en/function.imagettftext.php
		# Notes:      Make sure you supply the font.
		#
	{

		// *** Convert color
		$rgbArray = $this->formatColor($fontColor);
		$r = $rgbArray['r'];
		$g = $rgbArray['g'];
		$b = $rgbArray['b'];

		// *** Get text font
		$font = $this->getTextFont($font);

		// *** Get text size
		$textSizeArray = $this->getTextSize($fontSize, $angle, $font, $text);
		$textWidth = $textSizeArray['width'];
		$textHeight = $textSizeArray['height'];

		// *** Find co-ords to place text
		$posArray = $this->calculatePosition($pos, $padding, $textWidth, $textHeight, false);
		$x = $posArray['width'];
		$y = $posArray['height'];

		$fontColor = imagecolorallocate($this->imageResized, $r, $g, $b);

		// *** Add text
		imagettftext($this->imageResized, $fontSize, $angle, $x, $y, $fontColor, $font, $text);
	}
875984
function paintText(ctx, location, xOffset, yOffset, text, color = '#000000') {
  ctx.fillStyle = color;
  ctx.font = '20px serif';
  ctx.textBaseline = 'top';
  ctx.fillText(text, location.x + xOffset, location.y + yOffset);
}
176769
@Override
    public void setText(String text) {
        if (text == null) {
            if (header != null) flow.remove(header);
        } else {
            if (header == null) {
                header = new Heading(1);
                flow.add(header);
            }
            header.setText(text);
        }
    }
228592
function( text ) {
			if ( this._.indent ) {
				this.indentation();
				!this._.inPre && ( text = CKEDITOR.tools.ltrim( text ) );
			}

			this._.output.push( text );
		}
1260328
def add_text(self, value):
        """"""
        if isinstance(value, (list, tuple)):
            self.pieces.extend(value)
        else:
            self.pieces.append(value)
1116882
function add ($title, $text, $menu, $footer, $lang, $id=null)
    {
        global $config;
        $this->title=$title;
        $this->content=$text;
        if (isset($id)) {
            $query = sprintf(
                file_get_contents("sql/addPageID.sql"),
                mysql_real_escape_string($title),
                mysql_real_escape_string($text), mysql_real_escape_string($menu),
                mysql_real_escape_string($footer), $lang, $id
            );
        } else {
            $query = sprintf(
                file_get_contents("sql/addPage.sql"),
                mysql_real_escape_string($title),
                mysql_real_escape_string($text), mysql_real_escape_string($menu),
                mysql_real_escape_string($footer), $lang
            );
        }
        $config->connexionBdd->requete($query);
    }
605676
function(text) {
      // remove contents
      while (this.node.hasChildNodes())
        this.node.removeChild(this.node.lastChild)

      // create text node
      this.node.appendChild(document.createTextNode(text))

      return this
    }
371746
function setText(element, text) {
    if (element.textContent != null) {
        element.textContent = text;
    } else if (element.innerText != null) {
        element.innerText = text;
    }
}
1176261
function insertTextScript(text) {
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.text = text;
    insertHeaderNode(script);
    return script;
}
674375
def add_text(self, text, x, y, **kws):
        """"""
        self.panel.add_text(text, x, y, **kws)
931636
public void add(String text, Image image) {
        this.imageElem = image.getElement().toString();
        add(text + image);
    }
1084103
private void addLine(Content pre, String line, int currentLineNo) {
        if (line != null) {
            pre.addContent(Util.replaceTabs(configuration, line));
            Content anchor = HtmlTree.A_NAME("line." + Integer.toString(currentLineNo));
            pre.addContent(anchor);
            pre.addContent(NEW_LINE);
        }
    }
886232
def add_text(self, text):
        
        t = self._r.add_t(text)
        return _Text(t)
652342
public void add(Object id, String text)
    {
        List<Term> termList = preprocess(text);
        add(id, termList);
    }
581268
function appendPre(message) {
	var pre = document.getElementById('content');
	var textContent = document.createTextNode(message + '\n');
	pre.appendChild(textContent);
}
160558
function () {
        
        var n = this.c[2].textContent;

        if(!isNaN( n )){ 
            this.value = this.numValue( n ); 
            this.update(true); 
        }

        else this.c[2].textContent = this.value;

    }
83067
function text(txt) {
  if(!this.length) {
    return this;
  }
  if(txt === undefined) {
    return this.dom[0].textContent;
  }
  txt = txt || '';
  this.each(function(el) {
    el.textContent = txt;
  });
  return this;
}