Lines Matching refs:ps

152         PointerState ps = new PointerState();
153 mPointers.add(ps);
211 final PointerState ps = mPointers.get(mActivePointerId);
219 final int N = ps.mTraceCount;
220 if ((mCurDown && ps.mCurDown) || N == 0) {
223 .append("X: ").append(ps.mCoords.x, 1)
227 .append("Y: ").append(ps.mCoords.y, 1)
230 float dx = ps.mTraceX[N - 1] - ps.mTraceX[0];
231 float dy = ps.mTraceY[N - 1] - ps.mTraceY[0];
248 .append("Xv: ").append(ps.mXVelocity, 3)
253 .append("Yv: ").append(ps.mYVelocity, 3)
257 canvas.drawRect(itemW * 5, 0, (itemW * 5) + (ps.mCoords.pressure * itemW) - 1,
260 .append("Prs: ").append(ps.mCoords.pressure, 2)
264 canvas.drawRect(itemW * 6, 0, (itemW * 6) + (ps.mCoords.size * itemW) - 1,
267 .append("Size: ").append(ps.mCoords.size, 2)
273 final PointerState ps = mPointers.get(p);
276 final int N = ps.mTraceCount;
282 float x = ps.mTraceX[i];
283 float y = ps.mTraceY[i];
301 float lx = ps.mEstimator.estimateX(-ESTIMATE_PAST_POINTS * ESTIMATE_INTERVAL);
302 float ly = ps.mEstimator.estimateY(-ESTIMATE_PAST_POINTS * ESTIMATE_INTERVAL);
304 float x = ps.mEstimator.estimateX(i * ESTIMATE_INTERVAL);
305 float y = ps.mEstimator.estimateY(i * ESTIMATE_INTERVAL);
313 float xVel = ps.mXVelocity * (1000 / 60);
314 float yVel = ps.mYVelocity * (1000 / 60);
320 lx = ps.mAltEstimator.estimateX(-ESTIMATE_PAST_POINTS * ESTIMATE_INTERVAL);
321 ly = ps.mAltEstimator.estimateY(-ESTIMATE_PAST_POINTS * ESTIMATE_INTERVAL);
323 float x = ps.mAltEstimator.estimateX(i * ESTIMATE_INTERVAL);
324 float y = ps.mAltEstimator.estimateY(i * ESTIMATE_INTERVAL);
331 xVel = ps.mAltXVelocity * (1000 / 60);
332 yVel = ps.mAltYVelocity * (1000 / 60);
337 if (mCurDown && ps.mCurDown) {
339 canvas.drawLine(0, ps.mCoords.y, getWidth(), ps.mCoords.y, mTargetPaint);
340 canvas.drawLine(ps.mCoords.x, 0, ps.mCoords.x, getHeight(), mTargetPaint);
343 int pressureLevel = (int)(ps.mCoords.pressure * 255);
345 canvas.drawPoint(ps.mCoords.x, ps.mCoords.y, mPaint);
349 drawOval(canvas, ps.mCoords.x, ps.mCoords.y, ps.mCoords.touchMajor,
350 ps.mCoords.touchMinor, ps.mCoords.orientation, mPaint);
354 drawOval(canvas, ps.mCoords.x, ps.mCoords.y, ps.mCoords.toolMajor,
355 ps.mCoords.toolMinor, ps.mCoords.orientation, mPaint);
358 float arrowSize = ps.mCoords.toolMajor * 0.7f;
363 float orientationVectorX = (float) (Math.sin(ps.mCoords.orientation)
365 float orientationVectorY = (float) (-Math.cos(ps.mCoords.orientation)
367 if (ps.mToolType == MotionEvent.TOOL_TYPE_STYLUS
368 || ps.mToolType == MotionEvent.TOOL_TYPE_ERASER) {
370 canvas.drawLine(ps.mCoords.x, ps.mCoords.y,
371 ps.mCoords.x + orientationVectorX,
372 ps.mCoords.y + orientationVectorY,
377 ps.mCoords.x - orientationVectorX,
378 ps.mCoords.y - orientationVectorY,
379 ps.mCoords.x + orientationVectorX,
380 ps.mCoords.y + orientationVectorY,
386 ps.mCoords.getAxisValue(MotionEvent.AXIS_TILT));
388 ps.mCoords.x + orientationVectorX * tiltScale,
389 ps.mCoords.y + orientationVectorY * tiltScale,
501 final PointerState ps = mPointers.get(p);
502 ps.clearTrace();
503 ps.mCurDown = false;
521 PointerState ps = new PointerState();
522 mPointers.add(ps);
531 final PointerState ps = mPointers.get(id);
532 ps.mCurDown = true;
548 final PointerState ps = mCurDown ? mPointers.get(id) : null;
549 final PointerCoords coords = ps != null ? ps.mCoords : mTempCoords;
555 if (ps != null) {
556 ps.addTrace(coords.x, coords.y);
562 final PointerState ps = mCurDown ? mPointers.get(id) : null;
563 final PointerCoords coords = ps != null ? ps.mCoords : mTempCoords;
569 if (ps != null) {
570 ps.addTrace(coords.x, coords.y);
571 ps.mXVelocity = mVelocity.getXVelocity(id);
572 ps.mYVelocity = mVelocity.getYVelocity(id);
573 mVelocity.getEstimator(id, ps.mEstimator);
575 ps.mAltXVelocity = mAltVelocity.getXVelocity(id);
576 ps.mAltYVelocity = mAltVelocity.getYVelocity(id);
577 mAltVelocity.getEstimator(id, ps.mAltEstimator);
579 ps.mToolType = event.getToolType(i);
590 final PointerState ps = mPointers.get(id);
591 ps.mCurDown = false;
602 ps.addTrace(Float.NaN, Float.NaN);