Skip to content

Instantly share code, notes, and snippets.

@mfurtak
Created October 14, 2015 01:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mfurtak/ff78ff575172846cc76f to your computer and use it in GitHub Desktop.
Save mfurtak/ff78ff575172846cc76f to your computer and use it in GitHub Desktop.
Is it Swing?
hourPaint = new Paint();
hourPaint.setARGB(255, 200, 200, 200);
hourPaint.setStrokeWidth(6F);
hourPaint.setAntiAlias(true);
hourPaint.setStrokeCap(Paint.Cap.ROUND);
// ...
float hrX = (float) Math.sin(hrRot) * hrLength;
float hrY = (float) -Math.cos(hrRot) * hrLength;
canvas.drawLine(centerX, centerY, centerX + hrX, centerY + hrY, hourPaint);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment