Skip to content

Instantly share code, notes, and snippets.

@osdrv
Created March 21, 2012 10:14
Show Gist options
  • Save osdrv/2145977 to your computer and use it in GitHub Desktop.
Save osdrv/2145977 to your computer and use it in GitHub Desktop.
withEllipseMode( CENTER, new Runnable() { public void run() {
withTranslate( SHADOW_DISPOSE_X, SHADOW_DISPOSE_Y, new Runnable() { public void run() {
withRotate( -PI / 2, new Runnable() { public void run() {
withRotate( 2 * PI * hours / 12, new Runnable() { public void run() {
rect( round( ( CLOCK_HOUR_ARROW_LENGTH ) / 2 * scale_factor ), 0,
round( ( CLOCK_HOUR_ARROW_LENGTH + CLOCK_HOUR_ARROW_WIDTH ) * scale_factor ), round( CLOCK_HOUR_ARROW_WIDTH * scale_factor ), round( CLOCK_HOUR_ARROW_WIDTH * scale_factor / 2 ) );
} } );
withRotate( 2 * PI * minutes / 60, new Runnable() { public void run() {
rect( round( ( CLOCK_MINUTE_ARROW_LENGTH ) / 2 * scale_factor ), 0,
round( ( CLOCK_MINUTE_ARROW_LENGTH + CLOCK_MINUTE_ARROW_WIDTH ) * scale_factor ), round( CLOCK_MINUTE_ARROW_WIDTH * scale_factor ), round( CLOCK_MINUTE_ARROW_WIDTH * scale_factor / 2 ) );
} } );
} } );
} } );
} } );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment