CS 456 Drawing
Feb 06, 2016
CS 456
Drawing
Component
• Widget• Component• Control• Pane• JComponent
Drawing Models
• Pixels
• Stroke
• Region
Tank
Hue – The color (red, green, orange)
Saturation – Amount of color vs. amount of gray/white
Value – how light or dark is the color
Some junkon the wall
Some junkSome junk
Some junkSome junkSome junk
VAVA
Curves - Continuity
• G(0)• G(1)• G(2)
• Quadratic• Cubic
Quadratic Bezier
Quadratic Bezier
Cubic Bezier
• G(0)• G(1)
Region Shapes
• moveTo(x,y)• lineTo(x,y)• quadraticTo( cx, cy, x, y)• cubicTo(c1x, c1y, c2x, c2y, x,y)
Quadratic Shape
• G.moveTo(P0x,P0y);• G.quadraticTo(P1x,P1y,P2x,P2y);
Cubic Shape
• G.moveTo(A0x,A0y);• G.cubicTo(A1x,A1y,A2x,A2y,A3x,A3y);• G.cubicTo(B1x,B1y,B2x,B2y,B3x,B3y);
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
Catmull-Rom
• P3, P0, P1, P2• P0, P1, P2, P3• P1, P2, P3, P0• P2, P3, P0, P1