Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9571)

Issue 1240047: code review 1240047: Make it possible to draw text using an arbitrary Painter.

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 11 months ago by rog
Modified:
13 years, 11 months ago
Reviewers:
nigeltao
CC:
golang-dev
Visibility:
Public.

Description

Make it possible to draw text using an arbitrary Painter. This requires that Dx and Dy are in Rasterizer rather than RGBAPainter. RGBAContext then becomes a specialized version of the more general Context. Dx and Dy are removed from RGBAPainter and AlphaPainter as they're now unnecessary. One other minor change: avoid allocating table when gamma is 1. BTW the Painter abstraction is lovely - a great example of composability in Go (I think Russ's suggestion of a nil ss in Paint to signify the end of the spans is probably slightly better than the current bool flag though).

Patch Set 1 #

Patch Set 2 : code review 1240047: Make it possible to draw text using an arbitrary Painter. #

Total comments: 2

Patch Set 3 : code review 1240047: Make it possible to draw text using an arbitrary Painter. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -46 lines) Patch
M AUTHORS View 1 chunk +2 lines, -0 lines 0 comments Download
M CONTRIBUTORS View 1 chunk +1 line, -0 lines 0 comments Download
M freetype/freetype.go View 10 chunks +53 lines, -35 lines 0 comments Download
M freetype/raster/paint.go View 7 chunks +7 lines, -9 lines 0 comments Download
M freetype/raster/raster.go View 3 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 16
rog
Hello nigeltao_golang (cc: golang-dev@googlegroups.com), I'd like you to review this change.
13 years, 11 months ago (2010-05-24 16:05:06 UTC) #1
nigeltao
On 2010/05/24 16:05:06, rog wrote: > Hello nigeltao_golang (cc: mailto:golang-dev@googlegroups.com), > > I'd like you ...
13 years, 11 months ago (2010-05-24 16:51:08 UTC) #2
nigeltao
http://codereview.appspot.com/1240047/diff/2001/3002 File freetype/raster/paint.go (right): http://codereview.appspot.com/1240047/diff/2001/3002#newcode215 freetype/raster/paint.go:215: a *[256]uint16 I'd rather keep this the way it ...
13 years, 11 months ago (2010-05-24 16:51:25 UTC) #3
nigeltao
http://codereview.appspot.com/1240047/diff/2001/3002 File freetype/raster/paint.go (right): http://codereview.appspot.com/1240047/diff/2001/3002#newcode215 freetype/raster/paint.go:215: a *[256]uint16 On 2010/05/24 16:51:25, nigeltao_golang wrote: > I'd ...
13 years, 11 months ago (2010-05-24 17:01:00 UTC) #4
nigeltao
Oh, please also add yourself to AUTHORS and CONTRIBUTORS.
13 years, 11 months ago (2010-05-24 17:04:31 UTC) #5
rog
On 24 May 2010 17:51, <nigeltao@golang.org> wrote: > On 2010/05/24 16:05:06, rog wrote: >> >> ...
13 years, 11 months ago (2010-05-24 17:27:53 UTC) #6
rog
i guess i was optimising for the possibly common case of gamma=1.0. it's true it's ...
13 years, 11 months ago (2010-05-24 17:34:54 UTC) #7
nigeltao_gnome
On 24 May 2010 10:27, roger peppe <rogpeppe@gmail.com> wrote: > RGBAContext is less necessary (i ...
13 years, 11 months ago (2010-05-24 23:22:42 UTC) #8
nigeltao_gnome
On 24 May 2010 09:05, <rogpeppe@gmail.com> wrote: > BTW the Painter abstraction is lovely - ...
13 years, 11 months ago (2010-05-24 23:28:02 UTC) #9
rog
On 25 May 2010 00:28, Nigel Tao <nigel.tao.gnome@gmail.com> wrote: > On 24 May 2010 09:05, ...
13 years, 11 months ago (2010-05-25 06:25:43 UTC) #10
rog
On 25 May 2010 00:22, Nigel Tao <nigel.tao.gnome@gmail.com> wrote: > If you do the freetype.Painter ...
13 years, 11 months ago (2010-05-25 06:53:39 UTC) #11
nigeltao_gnome
On 24 May 2010 23:25, roger peppe <rogpeppe@gmail.com> wrote: > it doesn't have to mean ...
13 years, 11 months ago (2010-05-25 18:57:46 UTC) #12
rog
On 25 May 2010 19:57, Nigel Tao <nigel.tao.gnome@gmail.com> wrote: > On 24 May 2010 23:25, ...
13 years, 11 months ago (2010-05-25 19:27:51 UTC) #13
nigeltao
This change does three things: 1. It moves Dx,Dy from the painters to the rasterizer. ...
13 years, 11 months ago (2010-05-26 18:02:25 UTC) #14
nigeltao
Oh, don't forget to update the change description via "hg change 1240047".
13 years, 11 months ago (2010-05-26 18:04:17 UTC) #15
nigeltao_gnome
13 years, 11 months ago (2010-05-26 20:15:40 UTC) #16
On 26 May 2010 11:02,  <nigeltao@golang.org> wrote:
> This change does three things:
> 1. It moves Dx,Dy from the painters to the rasterizer.
> 2. It makes the gamma correction table lazily allocated.
> 3. It factors out a Context out of a RGBAContext.
>
> I'm happy with 1, unhappy with 2, and am still thinking about 3. If you
> update this change to do only 1 (and the AUTHORS + CONTRIBUTORS edit)
> then I'll happily check this in.

Ah, I'm guessing that it's bedtime in your timezone. I'll just do this
myself (http://codereview.appspot.com/1332041).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b