Java 2- Graphics

Introduction

Course Introduction
Course Overview

Getting Started

Where to Get Java
The Command Line Installation
Writing and Compiling a Program
The Mainline

The Graphics Object and Colors

The Graphics Class
The Graphics2D Class
The Coordinate System
Filling a Window with Color
Inventing a Color of Your Own
Shading Up and Down
A Color Gradient
Color Gradient Directions
Cyclical Color Gradient

Positioning/Sizing/Rotating

Polygon
Translate and Rotate
Circling
Scaling
Shearing
The Affine Transform

Fundamental Drawing

A Random Drawing
Arcs
Rounded Rectangles
Basic Line Drawing
Corners and Ends
Dashed Lines

Fundamental Fonts

Font Measuring
Positioning Text
Font List

Image Files

Loading Image Files
Scaling
Types of Scaling
Pixel by Pixel pt. 1
Pixel by Pixel pt. 2
Convolving pt. 1
Convolving pt. 2
Transformation pt. 1
Transformation pt. 2
Compositing
Cross Fading

The Mouse and Keyboard

Reading Mouse Events
Mouse Motion
All Mouse Events
Reading Keyboard Events
Selecting a Mouse Cursor
Dragging Objects
Dragging Solid Objects
Rubberbanding

Making Shapes and Fitting Curves

Building a Rectangle with GeneralPath
Scaling and Zig Zagging
The Winding Rule
Quadratic Curves
Asymmetric Quadratic Curves
Cubic Curves
Asymmetric Cubic Curves
Attaching Shapes with GeneralPath
Combining Shapes with GeneralPath
Combining Shapes with an Area Object
Crop Image
Filling an Area

Fitting Text

Ways of Displaying Text pt. 1
Ways of Displaying Text pt. 2
Positioning Text
Text Attributes
Drawn Letters
Letters with Pictures
Dynamic Resizing of Text

Stupid Animation Tricks

Flicker
No Flicker
No Flicker Applet
Pong and Electrons pt. 1
Pong and Electrons pt. 2

Credits

About this Author