Graphics in Android 1 Fall 2012 CS2302: Programming Principles.

Slides:



Advertisements
Similar presentations
Applets and Graphics.
Advertisements

HTML5 CANVAS.  Rectangles  Arcs  Lines  Features we won’t look at  Images  Drag and drop  Animation  Widely supported DRAWING PICTURES IN HTML.
Cosc 5/4730 Blackberry Drawing. Screen size With Blackberry devices, they have a known screen size in pixels. If you are programming for specific device.
PHY-102 SAPIntroductory GraphicsSlide 1 Introductory Graphics In this section we will learn how about how to draw graphics on the screen in Java:  Drawing.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 2 2D Graphics: Basics.
Georgia Institute of Technology Drawing in Java – part 2 Barb Ericson Georgia Institute of Technology September 2005.
CSC1401 Drawing in Java - 2. Reminder from last class How do you save your modified picture? String filename = …; Picture stevePicture = new Picture(filename);
Shawlands Academy Department Of Technical Education
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 21 - “Cat and Mouse” Painter Application.
HOW TO SKETCH LIKE AN ENGINEER Line Conventions. What are line conventions? Line conventions convey information about the shape and size of an object.
GUI and Swing, part 2 The illustrated edition. Scroll bars As we have previously seen, a JTextArea has a fixed size, but the amount of text that can be.
1 L37 Graphics and Java 2D™ (2). 2 OBJECTIVES To use methods of class Graphics to draw lines,  rectangles,  rectangles with rounded corners,  three-dimensional.
Use the Macromedia Flash drawing tools Edit drawings Work with objects Work with text Work with layers Unit Lessons.
1 L38 Graphics and Java 2D™ (3). 2 OBJECTIVES In this chapter you will learn:  To understand graphics contexts and graphics objects.  To understand.
Custom Views, Drawing, Styles, Themes, ViewProperties, Animations, oh my!
Elements and Principles of Design Introduction
Vector Graphics Making custom images. Raster vs. Vector Graphics In computer graphics, a raster graphics image, or bitmap, is a dot matrix data structure.
6-2 2D Graphics CSNB544 Mobile Application Development Thanks to Utexas Austin.
Graphic Communication
Element. The element Used to dynamically draw graphics using javascript. Capable of drawing paths, circles, rectangles, text, and images.
Introduction to Java Simple Graphics. Objects and Methods Recall that a method is an action which can be performed by an object. –The action takes place.
Android Graphics Library. Color Android colors are represented with four numbers, one each for alpha, red, green, and blue (ARGB). Each component can.
Flash CS 5 Interface BY NSCHEWCZYK | ©2012. MENU BAR A bar at the top of the window. It lists menu options including: File, Edit, View, Insert, Modify,
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
Tkinter Canvas.
Merete S COLLEGEFACULTY OF ENGINEERING & SCIENCE Graphics ikt403 – Object-Oriented Software Development.
Graphics Concepts CS 2302, Fall /17/20142 Drawing in Android.
Painting (Chapter 12) Java Certification Study Group January 25, 1999 Mark Roth.
* Bitmap images are based on a grid of pixels * Each pixel is assigned a specific location and color value * Bitmaps contain a limited number of pixels,
ANDROID 中的 2D 繪圖 作者:陳鍾誠. ANDROID 架構與 2D 繪圖 SGL: 繪圖引擎 Surface Manager 繪圖管理者.
Sketching an Isometric Circle © 2012 Project Lead The Way, Inc.Introduction to Engineering Design.
CISC 110 Day 8 “The Outliers, Part 2” Frames, Classes, Vectors, String Manipulation, File I/O, Downloading Images.
Graphics in Android 1 CS7030: Mobile App Development.
Paint Tutorial Created February 2006 Start Paint: Start>Programs>Accessories>Paint.
Basic 2D Graphics in Android. Android Graphics Programming There are many ways to do graphics programming in Android – 2D vs. 3D – static vs. dynamic.
Line Types. Line Conventions Construction Line: lines used as guides to help draw all other lines and shapes properly. Construction Line.
Computer Graphics Lecture 08 Taqdees A. Siddiqi Computer Graphics Filled Area Primitives I Lecture 08 Taqdees A. Siddiqi
Chapter 7 Vector Editing © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
Graphics Drawing Things With Java. Today's Topics Course Updates Java Graphics –Java 1.1 versus Java 1.2 (Java 2) Drawing Lines Drawing Shapes.
Intro to Graphics from Chapter 2 of Java Software Solutions
12 Graphics and Java 2D™.
Sketching an Isometric Circle
Android Application 2D Graphics cs.
CS499 – Mobile Application Development
Adobe Flash Professional CS5 – Illustrated
Graphic Communication
Bitmap Basics in Fireworks
Adobe Flash CS6 Tools and Functions
Android Layouts 24 July 2018 S.RENUKADEVI/AP/SCD/ANDROID LAYOUTS 1.
Basic Graphics Chapter 5 3/19/15 Thursday Section Only
ANM 100 ADOBE CREATIVE SUITE
Grand Prix Racing Circuit
ISC440: Web Programming II Ch14: HTML5 Canvas
Sketching an Isometric Circle
4.14 GUI and Graphics Case Study: Creating Simple Drawings (Cont.)
Chapter 7 Vector Editing
Graphics in Android Fall 2012 CS2302: Programming Principles.
Graphics -- Introduction
Sketching an Isometric Circle
Brush Tool Apply and draw with brushes to create artistic elements.
Sketching an Isometric Circle
Drawing in Illustrator
Drawing Graphics in JavaScript
Sketching an Isometric Circle
Sketching an Isometric Circle
Sketching an Isometric Circle
2D Car In Sketchup.
Sketching an Isometric Circle
Graphic Communication
Title in table of contents called – Part A isometric circles
Presentation transcript:

Graphics in Android 1 Fall 2012 CS2302: Programming Principles

Canvas  Class android.graphics.Canvas represents a surface on which to drawandroid.graphics.Canvas  Some of the useful drawing methods 1. drawArc draws an arc of a circle. Can be used for 'pie segments' as well. drawArc 2. drawBitmap draws an image represented as a bitmap drawBitmap 3. drawCircle drawCircle 4. drawOval drawOval 5. drawRect drawRect 6. drawText drawText 7. drawColor fills the background of the canvas with a color drawColor Fall 2012 CS2302: Programming Principles 2

Path Fall 2012 CS2302: Programming Principles 3  A Path can, for example, be used to build up a polygon.Path  A path is understood as being drawn by a pen. When the pen is touching the drawing surface, a visible trace is left. However, the pen can also be moved without leaving a visible mark.  At any stage during the construction of a path, there is a current point. This is the current position of the pen.  The lineTo moves the pen to a new point, drawing a straight line from the previous current point to the point given by the parameters to the method call. The end point of the line becomes the new current point.lineTo  By contrast, the moveTo method moves the pen, changing the current point, but does not leave a trace. The path should begin with a moveTo call so that the path can start at a well determined position.moveTo  The close adds a line segment from the current point back to the first point on the path. This signals that the path is closed and, therefore, can be filled with color.close

Paint Fall 2012 CS2302: Programming Principles 4  In Android, the android.graphics.Paint class is used to contain many details of how drawing should be done. Most drawing methods require a Paint object be provided as an argument.android.graphics.Paint  The color of the drawing is one property.  The style property is specified by a value of class Paint.Style. The three values specify whether the shape is to be outlined, filled or both filled and outlined.Paint.Style