123 |
public boolean inverseTransformPoints3(int withCS, float[] pt, float[]into) { |
public boolean inverseTransformPoints3(int withCS, float[] pt, float[]into) { |
124 |
throw new UnsupportedOperationException("inverse transform not supported yet"); |
throw new UnsupportedOperationException("inverse transform not supported yet"); |
125 |
} |
} |
126 |
|
|
127 |
|
java.awt.Point transformPoint(int cs, float x, float y, java.awt.Point into) { |
128 |
|
// Slow default impl |
129 |
|
float[] pt = new float[] {x, y, 0}; |
130 |
|
transformPoints3(cs, pt, pt); |
131 |
|
if(into == null) into = new java.awt.Point(); |
132 |
|
into.x = (int)pt[0]; |
133 |
|
into.y = (int)pt[1]; |
134 |
|
return into; |
135 |
|
} |
136 |
|
|
137 |
|
java.awt.Point[] transformPoints2(int cs, float[] coords, java.awt.Point[] into) { |
138 |
|
// Slow default impl |
139 |
|
float[] pt = new float[coords.length * 3 / 2]; |
140 |
|
for(int i=0; i<coords.length/2; i++) { |
141 |
|
pt[3*i+0] = coords[2*i+0]; |
142 |
|
pt[3*i+1] = coords[2*i+1]; |
143 |
|
pt[3*i+2] = 0; |
144 |
|
} |
145 |
|
transformPoints3(cs, pt, pt); |
146 |
|
if(into == null) into = new java.awt.Point[pt.length / 3]; |
147 |
|
for(int i=0; i<pt.length/3; i++) { |
148 |
|
into[i].x = (int)pt[3*i+0]; |
149 |
|
into[i].y = (int)pt[3*i+1]; |
150 |
|
} |
151 |
|
return into; |
152 |
|
} |
153 |
|
|
154 |
|
|
155 |
} |
} |
156 |
|
|
157 |
|
|