Google Login
Questions
Unanswered
Tags
Users
Ask a Question
Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!
All categories
CSC 211
(749)
CSC 211 (F17)
(239)
CSC 211 (F16)
(185)
(Winter 15-16)
(184)
(Winter 14)
(140)
CSC 285
(360)
CSC 320
(1)
CSC 330
(0)
CSC 370
(0)
CSC 490
(123)
other
(9)
Color pixelColor = panel.getColorAtPixel(srcX,srcY)?
+15
votes
Confused about how to go about getting these numbers to put in for the getColorAtPixel. Any ideas how to go about this?
asked
Jan 16, 2016
in
(Winter 15-16)
by
Austin Chausse
(
100
points)
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
+6
votes
Best answer
Well, before doing anything fancy, I would try it out at some random coordinates by just doing:
int srcX = 100;
int srcY = 150;
and see if I could get ONE dot to appear.
Then eventually, you want to make it so that srcX takes on multiple values that are regularly spaced along the source image coordinates. e.g. if the image width is 600, and numDotsWide is 10, then you'd want srcX to be:
0, then 60, then 120, then 180, ... etc.
answered
Jan 16, 2016
by
Forrest Stonedahl
(
100
points)
selected
Jan 17, 2016
by
Austin Chausse
Please
log in
or
register
to add a comment.
...