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

Unified Diff: example/round/main.go

Issue 1850041: code review 1850041: freetype: update for image representation change (1849041). (Closed)
Patch Set: code review 1850041: freetype: update for image representation change (1849041). Created 14 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « example/raster/main.go ('k') | freetype/raster/paint.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: example/round/main.go
===================================================================
--- a/example/round/main.go
+++ b/example/round/main.go
@@ -31,9 +31,10 @@
t := raster.Fix32(r * math.Tan(math.Pi/8))
m := image.NewRGBA(800, 600)
- for y := 0; y < m.Height(); y++ {
- for x := 0; x < m.Width(); x++ {
- m.Pixel[y][x] = image.RGBAColor{63, 63, 63, 255}
+ for y := 0; y < 600; y++ {
+ p := m.Pix[y*m.Stride : y*m.Stride+800]
+ for i := range p {
+ p[i] = image.RGBAColor{63, 63, 63, 255}
}
}
mp := raster.NewRGBAPainter(m)
« no previous file with comments | « example/raster/main.go ('k') | freetype/raster/paint.go » ('j') | no next file with comments »

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