Method
AddText
(text string, font *Font, color Color, preferredSize Size, format DrawTextFormat)
Source from the content-addressed store, hash-verified
| 213 | } |
| 214 | |
| 215 | func (doc *Document) AddText(text string, font *Font, color Color, preferredSize Size, format DrawTextFormat) os.Error { |
| 216 | item := &simpleTextItem{ |
| 217 | text: utf8.NewString(text), |
| 218 | font: font, |
| 219 | color: color, |
| 220 | preferredSize: preferredSize, |
| 221 | format: format, |
| 222 | parts: make([]*simpleTextPart, 0, 1), |
| 223 | } |
| 224 | |
| 225 | return doc.paginateItem(item) |
| 226 | } |
| 227 | |
| 228 | func (doc *Document) Print() (err os.Error) { |
| 229 | defer func() { |
Tested by
no test coverage detected