Introduction to Canvas

8,206 views

Published on

by Tan Teck Loon

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
8,206
On SlideShare
0
From Embeds
0
Number of Embeds
4,356
Actions
Shares
0
Downloads
59
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to Canvas

  1. 1. Android: Canvas The Basics<br />CodeAndroid.org<br />
  2. 2. Why Canvas?<br />For Multimedia Applications<br /><ul><li>Games, full visual applications
  3. 3. Control over the Visual Effects
  4. 4. Allows animation to be done freely
  5. 5. Unique Response according to author’s design</li></li></ul><li>No longer Needed<br />
  6. 6. Fundamentals<br />
  7. 7. Drawing an image(basic)<br />Specify the coordinate and paint<br />Coordinate X and Y and paint<br />Paint functions<br />Color<br />Alpha(transparent)<br />http://developer.android.com/reference/android/graphics/Paint.html<br />Canvas itself<br />Color(background)<br />
  8. 8. Drawing shape and text<br />
  9. 9. Adding Bitmap<br />
  10. 10. Text Size and alpha<br />
  11. 11. Response <br />onKeyDown(int, KeyEvent)<br />onKeyUp(int, KeyEvent)<br />onTrackballEvent(int, KeyEvent)<br />onTouchEvent(int, KeyEvent)<br />
  12. 12. Question and Sharing<br />
  13. 13. Thank you <br />

×