Advanced AWT Paint. ● Paint is used to fill a shape, its inside is covered with paint. ● Use the setPaint method to set the paint style to an object with.

Slides:



Advertisements
Similar presentations
Factoring with Algebra Tiles
Advertisements

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);
Draw Shapes Introduction to simple graphics. What is a graphics context? An instance of the Graphics class Graphics is ABSTRACT! You can extend Graphics.
1 L36 Graphics and Java 2D™ (1). 2 OBJECTIVES  To understand graphics contexts and graphics objects.  To understand and be able to manipulate colors.
Lecture07 Graphics Programming in Java. Introduction Most of the graphics programming of java is done with: Most of the graphics programming of java is.
1 L38 Graphics and Java 2D™ (3). 2 OBJECTIVES In this chapter you will learn:  To understand graphics contexts and graphics objects.  To understand.
Slide Transitions Slide Show, Slide Transition opens Slide Transition task pane Practice each option setting to select the transition style, its speed,
Lecture 7 Graphics under AWT Graphics Attributes Shapes Clips Affine Transformations Strokes, Paints, Colors, Translucency RenderingHints, Anti-aliasing.
Chapter 6 Color Image Processing Chapter 6 Color Image Processing.
© T Madas.
Composition and Elements of Design
Java ME & Blackberry APIs for Game Dev Week III. Overview Java 2D API Java 3D API SVG Blackberry APIs
1 Graphical User Components (II) Outline JTextArea Creating a Customized Subclass of JPanel JPanel Subclass that Handles Its Own Events Windows: Additional.
2D Graphics: Rendering Details
Chapter 15 Graphics and Java 2D™ Java How to Program, 8/e (C) 2010 Pearson Education, Inc. All rights reserved.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 28 - Java Graphics and Java2D Outline 28.1Introduction.
Chapter 28 - Java Graphics and Java2D Outline 28.1Introduction 28.2Graphics Contexts and Graphics Objects 28.3Color Control 28.4Font Control 28.5Drawing.
 Pearson Education, Inc. All rights reserved. 1 Ch 12 Graphics and Java 2D In this chapter you will learn:  To understand graphics contexts.
Advanced User Interfaces with Java SD’98 - Session 3206 Ted Faison Faison Computing Inc.
1 Chapter 3 2D Graphics: Rendering Details  Color spaces, paints stroke types  Affine transforms including translation, rotation, scaling, shearing,
ART ART ART Mr. Erdmans. Applied & Visual Arts  Graphic Design  Photography  Drawing  Painting  Printmaking.
Perimeter Perimeter is the distance around a 2D shape.
11in X 8.5in Resoultion:300 Color Mode: RGB Color 8 Bit.
My Book These images are grouped. You may find it easier to ungroup and work with them.
Aim: What is Adobe Illustrator?. Adobe Illustrator is a vector based drawing program.
Georgia Institute of Technology Drawing in Java Barb Ericson Georgia Institute of Technology August 2005.
Chapter 6 Value and Texture. Goals Differentiate between the use of value and texture in illustrative art Get a handle on the various attributes of strokes.
Do Now: Please take out your notebook and a pen Ms. Edelman Technology Aim: How can I use type to express movement and rhythm?
1.) Write the equation of the line passing through the two points (-5, 7), (-3, -1). 2.) Write the equation of a line in slope- intercept form perpendicular.
Principles of Design Visual Arts 10. Definitions (principles) Balance The distribution of the visual weight of objects, colors, texture, and space. If.
Composition of Art Composition means the piece as a whole Lots of different things go into a composition… Line Shape Form Space Color Texture.
Georgia Institute of Technology Drawing in Java – part 3 Barb Ericson Georgia Institute of Technology September 2006.
Creating Vectors – Part One 2.02 Understand Digital Vector Graphics.
Using the elements of art and principles of design In free from sculptures.
Illuminated letters & Zentagles. An illuminated manuscript is a manuscript in which the text is supplemented by the addition of decoration, such as decorated.
X = Y. Direct variation X 1 X = Y 1 Y 2.
The Principles of Art Visual Arts 8
1 Drawing C Sc 335 Object-Oriented Programming and Design Rick Mercer.
Computer Graphics Through OpenGL: From Theory to Experiments, Second Edition Chapter 12.
Advanced Java Screen Update Techniques SD’98 - Session 4406 Ted Faison Faison Computing Inc.
Explore Area MAFS.3.MD.3.5, MAFS.3.MD.3.6. What makes something ?
Graphics in Java Opening Discussion zDo you have any questions about the quiz? zWhat did we talk about last class? zDo you have any questions.
Bell Ringer: Draw yourself if you were a superhero.
Projects: not limited to spec Error checking File filters Create multiple file formats Polygons Filled shapes Etc.
Georgia Institute of Technology Drawing in Java – part 2 Dr Usman Saeed Assistant Professor Faculty of Computing and Information Technology North Jeddah.
How can I find the area and perimeter of a rectangle? MCC.4.MD.3.
10/20/2005week71 Graphics, mouse and mouse motion events, KeyEvent Agenda Classes in AWT for graphics Example java programs –Graphics –Mouse events –Mouse.
Barb Ericson Georgia Institute of Technology September 2005
Advanced AWT The Rendering Pipeline
12 Graphics and Java 2D™.
Using the principles of design….Patterns, balance, and Repetition
Line These icon designs show line, by using line to display images by outlining them This book cover shows line by using straight lines and curved lines.
Fill and Stroke Stroke is the outline of a shape, text or image.
Advanced AWT Strokes.
Shape and One Point Perspective Project
Design Elements & Principles
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.
Enlargements and area Scale factor Area of object Area of image.
Graphic Editing Terms Cropping
PRINCIPLES OF DESIGN Pattern.
Scrapbooking.
Chapter 49 Java 2D.
Color Image Processing
Factor Using Algebra Tiles
Creating Vectors – Part One
The Elements of Design in Art
Creating Vectors – Part One
Barb Ericson Georgia Institute of Technology September 2005
Select the polygon lasso tool and draw round an area where you want to change the colour. Complete the shape so you get matching ants round it. Select.
Presentation transcript:

Advanced AWT Paint

● Paint is used to fill a shape, its inside is covered with paint. ● Use the setPaint method to set the paint style to an object with a class that implements the Paint interface. ● The Java 2D API provides three such classes ● The Color class implements the Paint interface – g2.setPaint(Color.red);

● The GradientPaint class varies colors by interpolating between two given color values – g2.setPaint(new GradientPaint(p1, Color.RED, p2, Color.YELLOW)); ● Colors are interpolated along the line joining the two points. Colors are constant along lines that are perpendicular to that joining line. Points beyond an end point of the line are given the color at the end point. – g2.setPaint(new GradientPaint(p1, Color.RED, p2, Color.YELLOW, true)); ● The color variation cycles and keeps varying beyond the end points.

● The TexturePaint class fills an area with repetitions of an image. – TexturePaint(BufferedImage texture, Rectangle2D anchor) – The anchor rectangle defines the tiling of the space to be painted; it is repeated indefinitely in x- and y-directions, and the texture image is scaled to fill each tile.