Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
a3e971d3
Commit
a3e971d3
authored
Oct 12, 2010
by
Nigel Tao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
image: another build fix regarding ColorImage.
R=adg TBR=adg CC=golang-dev
https://golang.org/cl/2449041
parent
cd0a75f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
xs.go
src/pkg/exp/4s/xs.go
+12
-12
names.go
src/pkg/image/names.go
+4
-4
No files found.
src/pkg/exp/4s/xs.go
View file @
a3e971d3
...
...
@@ -144,17 +144,17 @@ var txbits = [NCOL][32]byte{
},
}
var
txpix
=
[
NCOL
]
image
.
Color
Image
{
image
.
ColorImage
{
image
.
RGBAColor
{
0xFF
,
0xFF
,
0x00
,
0xFF
}}
,
/* yellow */
image
.
ColorImage
{
image
.
RGBAColor
{
0x00
,
0xFF
,
0xFF
,
0xFF
}}
,
/* cyan */
image
.
ColorImage
{
image
.
RGBAColor
{
0x00
,
0xFF
,
0x00
,
0xFF
}}
,
/* lime green */
image
.
ColorImage
{
image
.
RGBAColor
{
0x00
,
0x5D
,
0xBB
,
0xFF
}}
,
/* slate */
image
.
ColorImage
{
image
.
RGBAColor
{
0xFF
,
0x00
,
0x00
,
0xFF
}}
,
/* red */
image
.
ColorImage
{
image
.
RGBAColor
{
0x55
,
0xAA
,
0xAA
,
0xFF
}}
,
/* olive green */
image
.
ColorImage
{
image
.
RGBAColor
{
0x00
,
0x00
,
0xFF
,
0xFF
}}
,
/* blue */
image
.
ColorImage
{
image
.
RGBAColor
{
0xFF
,
0x55
,
0xAA
,
0xFF
}}
,
/* pink */
image
.
ColorImage
{
image
.
RGBAColor
{
0xFF
,
0xAA
,
0xFF
,
0xFF
}}
,
/* lavender */
image
.
ColorImage
{
image
.
RGBAColor
{
0xBB
,
0x00
,
0x5D
,
0xFF
}}
,
/* maroon */
var
txpix
=
[
NCOL
]
image
.
Image
{
image
.
NewColorImage
(
image
.
RGBAColor
{
0xFF
,
0xFF
,
0x00
,
0xFF
})
,
/* yellow */
image
.
NewColorImage
(
image
.
RGBAColor
{
0x00
,
0xFF
,
0xFF
,
0xFF
})
,
/* cyan */
image
.
NewColorImage
(
image
.
RGBAColor
{
0x00
,
0xFF
,
0x00
,
0xFF
})
,
/* lime green */
image
.
NewColorImage
(
image
.
RGBAColor
{
0x00
,
0x5D
,
0xBB
,
0xFF
})
,
/* slate */
image
.
NewColorImage
(
image
.
RGBAColor
{
0xFF
,
0x00
,
0x00
,
0xFF
})
,
/* red */
image
.
NewColorImage
(
image
.
RGBAColor
{
0x55
,
0xAA
,
0xAA
,
0xFF
})
,
/* olive green */
image
.
NewColorImage
(
image
.
RGBAColor
{
0x00
,
0x00
,
0xFF
,
0xFF
})
,
/* blue */
image
.
NewColorImage
(
image
.
RGBAColor
{
0xFF
,
0x55
,
0xAA
,
0xFF
})
,
/* pink */
image
.
NewColorImage
(
image
.
RGBAColor
{
0xFF
,
0xAA
,
0xFF
,
0xFF
})
,
/* lavender */
image
.
NewColorImage
(
image
.
RGBAColor
{
0xBB
,
0x00
,
0x5D
,
0xFF
})
,
/* maroon */
}
func
movemouse
()
int
{
...
...
@@ -735,7 +735,7 @@ func Play(pp []Piece, ctxt draw.Window) {
N
=
len
(
pieces
[
0
]
.
d
)
initPieces
()
rand
.
Seed
(
int64
(
time
.
Nanoseconds
()
%
(
1e9
-
1
)))
whitemask
=
image
.
ColorImage
{
image
.
AlphaColor
{
0x7F
}}
whitemask
=
image
.
NewColorImage
(
image
.
AlphaColor
{
0x7F
})
tsleep
=
50
timerc
=
time
.
Tick
(
int64
(
tsleep
/
2
)
*
1e6
)
suspc
=
make
(
chan
bool
)
...
...
src/pkg/image/names.go
View file @
a3e971d3
...
...
@@ -6,13 +6,13 @@ package image
var
(
// Black is an opaque black ColorImage.
Black
=
ColorImage
{
Gray16Color
{
0
}}
Black
=
NewColorImage
(
Gray16Color
{
0
})
// White is an opaque white ColorImage.
White
=
ColorImage
{
Gray16Color
{
0xffff
}}
White
=
NewColorImage
(
Gray16Color
{
0xffff
})
// Transparent is a fully transparent ColorImage.
Transparent
=
ColorImage
{
Alpha16Color
{
0
}}
Transparent
=
NewColorImage
(
Alpha16Color
{
0
})
// Opaque is a fully opaque ColorImage.
Opaque
=
ColorImage
{
Alpha16Color
{
0xffff
}}
Opaque
=
NewColorImage
(
Alpha16Color
{
0xffff
})
)
// A ColorImage is a practically infinite-sized Image of uniform Color.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment