Commit Graph

12 Commits

Author SHA1 Message Date
Nigel Tao
220b691d5c freetype: add NewAlpha{Src,Over}Painter constructor function for
consistency with existing NewFooPainter functions.

Unbreak build from ColorImage change in the core image package.

R=adg
CC=golang-dev
http://codereview.appspot.com/2450041
2010-10-12 16:55:01 +11:00
Nigel Tao
eda48ef1c3 freetype: make the point an argument to DrawString, not part of the
context state. Also rename DrawText to DrawString.

R=r
CC=golang-dev
http://codereview.appspot.com/2208041
2010-09-15 14:35:22 +10:00
Nigel Tao
06369b10f7 freetype: add a clip rectangle.
R=r
CC=golang-dev
http://codereview.appspot.com/2171045
2010-09-13 18:20:47 +10:00
Nigel Tao
570e8c24b9 freetype: Split AlphaPainter into two separate types depending on the
Porter-Duff composition operator used. This saves a malloc when passing
an AlphaSrcPainter as a value of Painter interface type.

R=r
CC=golang-dev
http://codereview.appspot.com/2149044
2010-09-10 12:06:50 +10:00
Nigel Tao
84097fa410 freetype: cache glyphs during DrawText.
A freetype.Context now has dst and src image setters and the notion of
a current point, instead of having to pass a painter and pt to DrawText.

R=r, rsc
CC=golang-dev
http://codereview.appspot.com/2169041
2010-09-09 19:22:48 +10:00
Nigel Tao
b8ed0a9c12 freetype-go: change freetype.DrawText's point to be at the baseline
instead of at 1em above the baseline.

R=r
CC=golang-dev
http://codereview.appspot.com/2042041
2010-08-27 15:49:35 +10:00
Nigel Tao
2af394dab9 freetype: clarify that the GPL licence is "version 2 or later", not
just version 2. The FTL (Freetype Licence) is still available. This
matches the original Freetype library (written in C).

This only expands and does not further restrict the licensing options
available to users of the freetype-go library.

R=adg
CC=golang-dev
http://codereview.appspot.com/1731049
2010-08-03 11:07:23 +10:00
Nigel Tao
3e38a96419 freetype/raster: Rename Fixed and Fixed64 to Fix32 and Fix64.
R=rsc
CC=golang-dev, rog
http://codereview.appspot.com/1686048
2010-07-01 09:42:43 +10:00
Nigel Tao
5836d0e202 Freetype-Go: take the RGBAPainter out of a RGBAContext. Instead,
a Context can now take any Painter during DrawText.

R=r
CC=rog, golang-dev
http://codereview.appspot.com/1341041
2010-05-27 22:22:49 -07:00
Nigel Tao
0c4b93bdc3 Freetype-Go: move the pixel offset from the painter to the rasterizer.
R=rsc, r
CC=rog, golang-dev
http://codereview.appspot.com/1332041
2010-05-26 13:23:24 -07:00
Nigel Tao
9c4da76964 Freetype-Go: gamma is now a float instead of a float64.
R=r
CC=golang-dev
http://codereview.appspot.com/1236042
2010-05-19 17:37:01 -07:00
Nigel Tao
25c38cfec1 Freetype-Go: new freetype package to provide a convenience API to
draw text onto an image.

This is a simple API that doesn't handle line breaking, ligatures,
right-to-left or vertical scripts, and other fancy features.

R=r, rsc
CC=golang-dev
http://codereview.appspot.com/1121045
2010-05-14 13:29:53 +10:00