Skip to content

Instantly share code, notes, and snippets.

Created July 3, 2015 20:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
private int mWidth;
private int mHeight;
private float mCenterX;
private float mCenterY;
public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
super.onSurfaceChanged(holder, format, width, height);
mWidth = width;
mHeight = height;
//Genişliği ve yüksekliği ikiye bölerek saatin merkezini hesaplıyoruz.
//İşlemlerde float değerler kullanmanız gerekmektedir.
mCenterX = mWidth / 2f;
mCenterY = mHeight / 2f;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment