Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 3 2D Graphics: Rendering Details.

Slides:



Advertisements
Similar presentations
Chapter 4 Transforming and Distorting Objects. Objectives Transform objects Offset and outline paths Create compound paths Work with the Pathfinder panel.
Advertisements

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 2 2D Graphics: Basics.
7.1 – The Logarithm Defined as an Integral © 2010 Pearson Education, Inc. All rights reserved.
Graphics 2D 1 Subject:T0934 / Multimedia Programming Foundation Session:6 Tahun:2009 Versi:1/0.
1 Computer Graphics Chapter 6 2D Transformations.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation F To understand the.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Topics  Applets  Classes used for graphics Graphics Point Dimension.
Slides prepared by Rose Williams, Binghamton University Chapter 19 Swing II.
May 11, 1998CS102-02Lecture 7-1 More Graphics in Java CS Lecture 7-1 A picture's worth a thousand words.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 7 Geometric Transformation.
1 L38 Graphics and Java 2D™ (3). 2 OBJECTIVES In this chapter you will learn:  To understand graphics contexts and graphics objects.  To understand.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 5 Java Graphics Applets.
Graphics Programming Graphics Programming: Transformations.
Glencoe Digital Communication Tools Create a Web Page with HTML Chapter Contents Lesson 4.1Lesson 4.1 Get Started with HTML (85) Lesson 4.2Lesson 4.2 Format.
Graphics and Multimedia. Introduction The language contains many sophisticated drawing capabilities as part of namespace System.Drawing and the other.
Web Design & Development Lecture 18. Java Graphics.
CS324e - Elements of Graphics and Visualization Java2D Graphics.
© 2010 Delmar, Cengage Learning Chapter 4 Transforming and Distorting Objects.
1 Review of COMPSCI 221  Chapters 1-11 in text  User Interfaces will be addressed as a take- home question.
Java ME & Blackberry APIs for Game Dev Week III. Overview Java 2D API Java 3D API SVG Blackberry APIs
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 6 Graphics Contents.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 26 – CheckWriter Application Introducing Graphics.
CS324e - Elements of Graphics and Visualization Compositing.
2D Graphics: Rendering Details
Computer Graphics. Requirements Prerequisites Prerequisites CS 255 : Data Structures CS 255 : Data Structures Math 253 Math 253 Experience with C Programming.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 28 - Java Graphics and Java2D Outline 28.1Introduction.
 Pearson Education, Inc. All rights reserved. 1 Ch 12 Graphics and Java 2D In this chapter you will learn:  To understand graphics contexts.
TEXT Size and typeface of text Bold, italics, capitals, underlines Spacing between lines, words, and letters.
Adobe Illustrator Basics Instructor: Cristol Gregory Assistant: Tara Caimi.
Advanced User Interfaces with Java SD’98 - Session 3206 Ted Faison Faison Computing Inc.
Drawing and Filling Geometric Shapes. Java comes with more than just points and lines. Within the Graphics2D class, there are also methods for drawing.
GDI+ 1. Objectives 2 GDI+ class  Create and render Graphic  Display information on the computer screen, printer 3.
Java Graphics. Review 3 kinds of elements in components API? Layout managers Events Extend vs. Implement.
INT 840E Computer graphics Introduction & Graphic’s Architecture.
Nov 111 Example Program DemoMouseInk.java. Nov 112 Example Program DemoMouseUnistrokes.java.
1 Chapter 3 2D Graphics: Rendering Details  Color spaces, paints stroke types  Affine transforms including translation, rotation, scaling, shearing,
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
2/17/04© University of Wisconsin, CS559 Spring 2004 Last Time Resampling –Ideal reconstruction –You can only ideally reconstruct band-limited functions.
9/30/04© University of Wisconsin, CS559 Fall 2004 Last Time Reconstruction Aliasing Compositing Intro.
Creating Graphics in Java CSE301 University of Sunderland Harry R Erwin, PhD.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 9 Lighting and Texturing.
Reflection Question 1. Reflection Question 2 m Reflection Question 3.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation.
Handle By, S.JENILA AP/IT
Java Graphics Opening Discussion zWhat did we talk about last class? zDo you have any questions about the assignment? zOffset between class.
OV Copyright © 2012 Logical Operations, Inc. All rights reserved. Working with Vector Image Tools  Create Images with Vector Paths  Use the Shape.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 5 Basic 3D Graphics.
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
Advanced Java Screen Update Techniques SD’98 - Session 4406 Ted Faison Faison Computing Inc.
PROJECT Transformations Chapter 14 beginning on page 570 Student Notes.
Main characteristics of Vector graphics  Vector graphics provide an elegant way of constructing digital images (diagrams, technical illustration and.
Computer Graphics Lecture 15 Fasih ur Rehman. Last Class Combining Transformations Affine versus Rigid body Transformations Homogenous Transformations.
Advanced AWT The Rendering Pipeline
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Operator Overloading; Class string
Graphics Fundamentals
Unit 2.1: Identifying design elements when preparing graphics
Web Development & Design Foundations with HTML5 7th Edition
Java Graphics The basic rendering mechanism is the drawing system that controls when and how programs can draw on a graphics component. When a component.
Translations.
(c) 2002 University of Wisconsin, CS 559
Warm up Rotate P(-4, -4) 180 Rotate Q(-1, -3) 90 CCW
Transforming and Distorting Objects
Chapter 49 Java 2D.
Translations.
Geometrical Transformations
Translations.
Translations.
Translations.
Presentation transcript:

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 3 2D Graphics: Rendering Details

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 2 Objectives F To understand color spaces F To use the Java Color class F To be able to use different types of paints in drawing visual objects F To apply stroke types F To construct affine transforms including translation, rotation, scaling, shearing, and reflection F To understand object transformations and viewing transformations F To combine basic transformations to form more complex ones F To identify the compositing rules F To use clipping path F To apply fonts and font metrics F To understand glyph, ligature, and derived font

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 3 Color Space F CIEXYZ F RGB F CYMK F sRGB Source Run

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 4 Paint Source Run Generalizing the concept of color, Java 2D drawing applies an attribute called paint

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 5 Strokes F Width F End style F Join style F Miter limit F Dash pattern Source Run

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 6 Affine Transformation F Maps parallel lines to parallel lines F Common affine transforms –Translation –Rotation –Reflection –Scale –Shear

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 7 Affine Transformation

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 8 Transformation Matrix Source Run

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 9 Composition of Transforms F Combining transforms F Non-commutative F Matrix product Source Run

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 10 Alpha Compositing F α-channel F Transparency F Porter-Duff rules

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 11 Porter-Duff Rules F Xor F DstOver F DstIn F DstOut F Dst F DstAtop F Clear F SrcOver F SrcIn F SrcOut F Src F SrcAtop

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 12 A Probabilistic Model F α value as the probability of the color to be shown F Four different events: –source color occurs only –destination color occurs only –both colors occur –neither color occurs. Source Run

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 13 Clipping Path Source The rendered image may be clipped by a clipping path Run

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 14 Font F Logical fonts –Serif –SansSerif –Monospaced –Dialog –DialogInput F Font styles –PLAIN –ITALIC –BOLD F Derived font F Font metrics Source Run

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 15 Ligature F A glyph may contain multiple letters F A common ligature:

Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 16 Glyph F Geometry of a text string with a font F Obtain a glyph Source Run Font font = new Font("Serif", Font.BOLD, 144); FontRenderContext frc = g2.getFontRenderContext(); GlyphVector gv = font.createGlyphVector(frc, "Java"); Shape glyph = gv.getOutline(100,200);