Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ttt
TTTAndroidClient
Commits
704a4711
Commit
704a4711
authored
Jan 29, 2014
by
Thomas Krex
Browse files
k
parent
3a6bb33e
Changes
3
Hide whitespace changes
Inline
Side-by-side
TTTCLient/bin/classes/tttclient/ttt/GraphicsContext$2$1.class
0 → 100644
View file @
704a4711
File added
TTTCLient/bin/classes/tttclient/utils/BitmapContainer.class
0 → 100644
View file @
704a4711
File added
TTTCLient/src/tttclient/utils/BitmapContainer.java
0 → 100644
View file @
704a4711
package
tttclient.utils
;
import
android.graphics.Bitmap
;
public
class
BitmapContainer
{
private
final
Bitmap
image
;
private
final
int
width
,
height
;
private
final
int
[]
pixels
;
public
BitmapContainer
(
Bitmap
_source
)
{
image
=
_source
;
width
=
image
.
getWidth
();
height
=
image
.
getHeight
();
pixels
=
new
int
[
width
*
height
];
image
.
getPixels
(
pixels
,
0
,
width
,
0
,
0
,
width
,
height
);
}
public
int
getPixel
(
int
x
,
int
y
)
{
return
pixels
[
x
+
y
*
width
];
}
public
void
setPixel
(
int
x
,
int
y
,
int
color
)
{
pixels
[
x
+
y
*
width
]
=
color
;
}
public
Bitmap
getBimap
()
{
image
.
setPixels
(
pixels
,
0
,
width
,
0
,
0
,
width
,
height
);
return
image
;
}
public
int
getWidth
()
{
return
image
.
getWidth
();
}
public
int
getHeight
()
{
return
image
.
getHeight
();
}
public
int
[]
getPixels
()
{
return
pixels
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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