Home | History | Annotate | Download | only in widget

Lines Matching refs:ps

90         PointerState ps = new PointerState();
91 ps.mVelocity = VelocityTracker.obtain();
92 mPointers.add(ps);
124 final PointerState ps = mPointers.get(0);
129 final int N = ps.mXs.size();
130 if ((mCurDown && ps.mCurDown) || N == 0) {
132 canvas.drawText("X: " + ps.mCurX, 1 + itemW, base, mTextPaint);
134 canvas.drawText("Y: " + ps.mCurY, 1 + itemW * 2, base, mTextPaint);
136 float dx = ps.mXs.get(N-1) - ps.mXs.get(0);
137 float dy = ps.mYs.get(N-1) - ps.mYs.get(0);
149 int velocity = ps.mVelocity == null ? 0 : (int) (ps.mVelocity.getXVelocity() * 1000);
153 velocity = ps.mVelocity == null ? 0 : (int) (ps.mVelocity.getYVelocity() * 1000);
157 canvas.drawRect(itemW * 5, 0, (itemW * 5) + (ps.mCurPressure * itemW) - 1,
159 canvas.drawText("Prs: " + String.format("%.2f", ps.mCurPressure), 1 + itemW * 5,
163 canvas.drawRect(itemW * 6, 0, (itemW * 6) + (ps.mCurSize * itemW) - 1,
165 canvas.drawText("Size: " + String.format("%.2f", ps.mCurSize), 1 + itemW * 6,
170 final PointerState ps = mPointers.get(p);
172 if (mCurDown && ps.mCurDown) {
173 canvas.drawLine(0, (int)ps.mCurY, getWidth(), (int)ps.mCurY, mTargetPaint);
174 canvas.drawLine((int)ps.mCurX, 0, (int)ps.mCurX, getHeight(), mTargetPaint);
175 int pressureLevel = (int)(ps.mCurPressure*255);
177 canvas.drawPoint(ps.mCurX, ps.mCurY, mPaint);
178 canvas.drawCircle(ps.mCurX, ps.mCurY, ps.mCurWidth, mPaint);
183 final PointerState ps = mPointers.get(p);
185 final int N = ps.mXs.size();
191 float x = ps.mXs.get(i);
192 float y = ps.mYs.get(i);
208 if (ps.mVelocity != null) {
210 float xVel = ps.mVelocity.getXVelocity() * (1000/60);
211 float yVel = ps.mVelocity.getYVelocity() * (1000/60);
240 final PointerState ps = mPointers.get(p);
241 ps.mXs.clear();
242 ps.mYs.clear();
243 ps.mVelocity = VelocityTracker.obtain();
244 ps.mCurDown = false;
258 PointerState ps = new PointerState();
259 ps.mVelocity = VelocityTracker.obtain();
260 mPointers.add(ps);
263 final PointerState ps = mPointers.get(id);
264 ps.mVelocity = VelocityTracker.obtain();
265 ps.mCurDown = true;
282 final PointerState ps = mPointers.get(id);
283 ps.mVelocity.addMovement(event);
284 ps.mVelocity.computeCurrentVelocity(1);
294 ps.mXs.add(event.getHistoricalX(i, j));
295 ps.mYs.add(event.getHistoricalY(i, j));
303 ps.mXs.add(event.getX(i));
304 ps.mYs.add(event.getY(i));
305 ps.mCurX = (int)event.getX(i);
306 ps.mCurY = (int)event.getY(i);
307 //Log.i("Pointer", "Pointer #" + p + ": (" + ps.mCurX
308 // + "," + ps.mCurY + ")");
309 ps.mCurPressure = event.getPressure(i);
310 ps.mCurSize = event.getSize(i);
311 ps.mCurWidth = (int)(ps.mCurSize*(getWidth()/3));
318 final PointerState ps = mPointers.get(id);
319 ps.mXs.add(Float.NaN);
320 ps.mYs.add(Float.NaN);
321 ps.mCurDown = false;
330 final PointerState ps = mPointers.get(id);
331 if (ps.mCurDown) {
332 ps.mCurDown = false;