Download - Introduction to Canvas
Transcript
![Page 1: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/1.jpg)
ANDROID: CANVAS THE BASICS
CodeAndroid.org
![Page 2: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/2.jpg)
Why Canvas? For Multimedia Applications
Games, full visual applications
Control over the Visual Effects
Allows animation to be done freely
Unique Response according to author’s design
![Page 3: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/3.jpg)
No longer Needed
![Page 4: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/4.jpg)
Fundamentals
![Page 5: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/5.jpg)
Drawing an image(basic) Specify the coordinate and paint
Coordinate X and Y and paint
Paint functions
Color
Alpha(transparent)
http://developer.android.com/reference/android/graphics/Paint.html
Canvas itself
Color(background)
![Page 6: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/6.jpg)
Drawing shape and text
![Page 7: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/7.jpg)
Adding Bitmap
![Page 8: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/8.jpg)
Text Size and alpha
![Page 9: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/9.jpg)
Response onKeyDown(int, KeyEvent)
onKeyUp(int, KeyEvent)
onTrackballEvent(int, KeyEvent)
onTouchEvent(int, KeyEvent)
![Page 10: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/10.jpg)
Question and Sharing
![Page 11: Introduction to Canvas](https://reader036.vdocument.in/reader036/viewer/2022082916/54b9de474a7959f6708b45f6/html5/thumbnails/11.jpg)
Thank you