Clear Up
SharpKit Reference

Paper.print Method (JsNumber, JsNumber, string, object, JsNumber, string, JsNumber)

Creates set of shapes to represent given font at given position with given size. Result of the method is set object (see Paper.set) which contains each letter as separate path object.

Namespace: SharpKit.Raphael

Class: Paper

Syntax

public object print(JsNumber x, JsNumber y, string text, object font, JsNumber size, string origin, JsNumber letter_spacing)

Parameters

x
Type: SharpKit.JavaScript.JsNumber
x position of the text
y
Type: SharpKit.JavaScript.JsNumber
y position of the text
text
Type: System.String
text to print
font
Type: System.Object
font object, see Paper.getFont
size
Type: SharpKit.JavaScript.JsNumber
size of the font, default is 16
origin
Type: System.String
could be "baseline" or "middle", default is "middle"
letter_spacing
Type: SharpKit.JavaScript.JsNumber
number in range -1..1, default is 0

Return Value

Type: System.Object
resulting set of letters

Examples

usage
var txt = r.print(10, 50, "print", r.getFont("Museo"), 30).attr({fill: "#fff"});
// following line will paint first letter in red
txt[0].attr({fill: "#f00"});
            
© Copyright 2005-2011 SharpKit. All rights reserved.