Top Banner
CS 456 Drawing
25

CS 456

Feb 06, 2016

Download

Documents

ivrit

CS 456. Drawing. Component. Widget Component Control Pane JComponent. AWT and Swing. Drawing Models. Pixels Stroke Region. Tank. Red 24, Green 0, Blue 255 Red 79, Green 129, Blue 189 Red 200, Green 100, Blue 200. Red 24, Green 0, Blue 255 Red 79, Green 129, Blue 189 - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CS 456

CS 456

Drawing

Page 2: CS 456

Component

• Widget• Component• Control• Pane• JComponent

Page 3: CS 456
Page 4: CS 456
Page 5: CS 456
Page 6: CS 456

Drawing Models

• Pixels

• Stroke

• Region

Page 7: CS 456
Page 8: CS 456
Page 9: CS 456

Tank

Page 10: CS 456
Page 11: CS 456

Hue – The color (red, green, orange)

Saturation – Amount of color vs. amount of gray/white

Value – how light or dark is the color

Page 12: CS 456
Page 13: CS 456

Some junkon the wall

Page 14: CS 456

Some junkSome junk

Page 15: CS 456

Some junkSome junkSome junk

Page 16: CS 456

VAVA

Page 17: CS 456

Curves - Continuity

• G(0)• G(1)• G(2)

• Quadratic• Cubic

Page 18: CS 456

Quadratic Bezier

Page 19: CS 456

Quadratic Bezier

Page 20: CS 456

Cubic Bezier

• G(0)• G(1)

Page 21: CS 456

Region Shapes

• moveTo(x,y)• lineTo(x,y)• quadraticTo( cx, cy, x, y)• cubicTo(c1x, c1y, c2x, c2y, x,y)

Page 22: CS 456

Quadratic Shape

• G.moveTo(P0x,P0y);• G.quadraticTo(P1x,P1y,P2x,P2y);

Page 23: CS 456

Cubic Shape

• G.moveTo(A0x,A0y);• G.cubicTo(A1x,A1y,A2x,A2y,A3x,A3y);• G.cubicTo(B1x,B1y,B2x,B2y,B3x,B3y);

Page 24: CS 456

Catmull-Rom Curves

• P0, P1, P2, P3• P1, P2, P3, P4• P2, P3, P4, P5• P3, P4, P5, P6• P4, P5, P6, P7• P5, P6, P7, P8• P6, P7, P8, P9

Page 25: CS 456

Catmull-Rom

• P3, P0, P1, P2• P0, P1, P2, P3• P1, P2, P3, P0• P2, P3, P0, P1