introduction to canvas

Post on 17-Jan-2015

7.335 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

by Tan Teck Loon

TRANSCRIPT

ANDROID: CANVAS THE BASICS

CodeAndroid.org

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

No longer Needed

Fundamentals

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)

Drawing shape and text

Adding Bitmap

Text Size and alpha

Response onKeyDown(int, KeyEvent)

onKeyUp(int, KeyEvent)

onTrackballEvent(int, KeyEvent)

onTouchEvent(int, KeyEvent)

Question and Sharing

Thank you

top related