Graphics in Android 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.
CHAPTER 20 CREATING SVG GRAPHICS. LEARNING OBJECTIVES How to embed a graphic stored within a.SVG file in an HTML page How to use the and tag pair to specify.
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
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.
Macromedia Flash MX 2004 – Design Professional Macromedia Flash MX DRAWING IN.
1 L38 Graphics and Java 2D™ (3). 2 OBJECTIVES In this chapter you will learn:  To understand graphics contexts and graphics objects.  To understand.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 2 2D Graphics: Basics F The architecture.
Graphics in Android 1 Fall 2012 CS2302: Programming Principles.
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.
 A tool that allows you to select through a free hand method › Unlike the marquee which defines the shape of your selection.
6-2 2D Graphics CSNB544 Mobile Application Development Thanks to Utexas Austin.
Java Software Solutions Lewis and Loftus Chapter 7 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphics -- Introduction The.
Tutorial 2 Drawing Text, Adding Shapes, and Creating Symbols.
Graphic Communication
 Pearson Education, Inc. All rights reserved. 1 Ch 12 Graphics and Java 2D In this chapter you will learn:  To understand graphics contexts.
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.
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.
Creating Vectors – Part One 2.02 Understand Digital Vector Graphics.
Sketching an Isometric Circle © 2012 Project Lead The Way, Inc.Introduction to Engineering Design.
Graphics in Android 1 CS7030: Mobile App Development.
Paint Tutorial Created February 2006 Start Paint: Start>Programs>Accessories>Paint.
Computer Graphics Lecture 08 Taqdees A. Siddiqi Computer Graphics Filled Area Primitives I Lecture 08 Taqdees A. Siddiqi
Volumize3d Volumize3d Training Lesson 6 - Planner.
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.
Mobile Computing With Android ACST Intro to Android, Part 2
Graphic Communication
Bitmap Basics in Fireworks
Basic Graphics Chapter 5 3/19/15 Thursday Section Only
ANM 100 ADOBE CREATIVE SUITE
Fill and Stroke Stroke is the outline of a shape, text or image.
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.)
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.
Creating Vectors – Part One
Sketching an Isometric Circle
Graphic Communication
Basic Constructions Skill 06.
Creating Vectors – Part One
Title in table of contents called – Part A isometric circles
Presentation transcript:

Graphics in Android Fall 2012 CS2302: Programming Principles

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

Path A Path can, for example, be used to build up a polygon. 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. 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. 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. Fall 2012 CS2302: Programming Principles

Paint 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. 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. Fall 2012 CS2302: Programming Principles