Revision ed1c0b33
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java | ||
---|---|---|
124 | 124 |
|
125 | 125 |
try |
126 | 126 |
{ |
127 |
Distorted.onSurfaceCreated(mView); |
|
127 |
Distorted.onSurfaceCreated(mView.getContext());
|
|
128 | 128 |
} |
129 | 129 |
catch(Exception ex) |
130 | 130 |
{ |
... | ... | |
172 | 172 |
mRoot.attach(mStars[i]); |
173 | 173 |
} |
174 | 174 |
|
175 |
float scale = (float) (0.5f*w/mGFFA.getWidth());
|
|
175 |
float scale = (0.5f*w/mGFFA.getWidth()); |
|
176 | 176 |
|
177 | 177 |
Interpolator1D di = new Interpolator1D(); |
178 | 178 |
di.setDuration(6000); |
... | ... | |
277 | 277 |
|
278 | 278 |
if( len>0 && str.charAt(len-1) == ' ' ) numspaces--; |
279 | 279 |
|
280 |
float left=x,w = (numspaces>0 ? (float)(length-paint.measureText(str))/numspaces : 0);
|
|
280 |
float left=x,w = (numspaces>0 ? (length-paint.measureText(str))/numspaces : 0); |
|
281 | 281 |
String tmp; |
282 | 282 |
int begin,end=0; |
283 | 283 |
|
Also available in: Unified diff
Switch to sending a Context (rather than a GLSurfaceView) to the library.