Revision 7e9a35eb
Added by Leszek Koltunski 11 months ago
src/main/java/org/distorted/objectlib/helpers/ObjectSticker.java | ||
---|---|---|
13 | 13 |
|
14 | 14 |
public class ObjectSticker |
15 | 15 |
{ |
16 |
private final float[] mCoords; |
|
16 |
private final float[][] mCoords;
|
|
17 | 17 |
private final float[] mCurvature; |
18 | 18 |
private final float[] mRadii; |
19 | 19 |
private final float mStroke; |
20 | 20 |
|
21 | 21 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
22 | 22 |
|
23 |
public ObjectSticker(float[] coords, float[] curvature, float[] radii, float stroke) |
|
23 |
public ObjectSticker(float[][] coords, float[] curvature, float[] radii, float stroke)
|
|
24 | 24 |
{ |
25 | 25 |
mCoords = coords; |
26 | 26 |
mCurvature = curvature; |
... | ... | |
30 | 30 |
|
31 | 31 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
32 | 32 |
|
33 |
public float[] getCoords() |
|
33 |
public float[][] getCoords()
|
|
34 | 34 |
{ |
35 | 35 |
return mCoords; |
36 | 36 |
} |
... | ... | |
62 | 62 |
{ |
63 | 63 |
String dbg="coords: "; |
64 | 64 |
int len = mCoords.length; |
65 |
for(int i=0; i<len; i++) dbg+= (" "+mCoords[i]); |
|
65 |
for(int i=0; i<len; i++) dbg+= (" "+mCoords[i][0]+" "+mCoords[i][1]);
|
|
66 | 66 |
|
67 | 67 |
dbg+= "\ncurvature: "; |
68 | 68 |
len = mCurvature==null ? 0: mCurvature.length; |
Also available in: Unified diff
change the way the coordinates of stickers are kept from float[2*N] to float[N][2]