Graphics and Multimedia

Slides:



Advertisements
Similar presentations
Microsoft® Small Basic
Advertisements

Nov 2005 MSc Slide 1 - Another Example of a Structural Pattern Alternative way of adding Functionality to an existing class (alternative to a derived class)
CHAPTER 20 CREATING SVG GRAPHICS. LEARNING OBJECTIVES How to embed a graphic stored within a.SVG file in an HTML page How to use the and tag pair to specify.
Chapter 9 Color, Sound and Graphics
COMPUTER PROGRAMMING I Objective 8.03 Apply Animation and Graphic Methods in a Windows Form (4%)
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);
Graphics and Multimedia Session 13 Mata kuliah: M0874 – Programming II Tahun: 2010.
User Interface Programming in C#: Graphics
Chapter 7 Creating Graphics. Chapter Objectives Use the Pen tool Reshape frames and apply stroke effects Work with polygons and compound paths Work with.
1 L37 Graphics and Java 2D™ (2). 2 OBJECTIVES To use methods of class Graphics to draw lines,  rectangles,  rectangles with rounded corners,  three-dimensional.
Chapter 13 Graphics, Animation, Sound, and Drag-and-Drop Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
 2006 Pearson Education, Inc. All rights reserved Graphics and Multimedia.
Graphics and Multimedia. Outline Introduction Graphics Contexts and Graphics Objects Color Control.
Graphics and Multimedia. Outline Drawing Polygons and Polylines Advanced Graphics Capabilities.
Graphics and Multimedia. Introduction The language contains many sophisticated drawing capabilities as part of namespace System.Drawing and the other.
Graphics Images – PictureBox control Drawing graphics - Graphics object Multimedia controls PictureBox control Image property – select image Choose how.
Computer Graphics Prof. Muhammad Saeed. Drawing and Transformation of Figures in C# August 1,
1 Chapter 26 D&D – Graphics Outline 26.1 Introduction 26.3 Graphics Contexts and Graphics Objects 26.4 Color Control 26.5 Font Control 26.6 Drawing Lines,
Chapter 3 Survival Techniques. Goals Discover that being an Illustrator artist is more than just knowing the tools Develop a basic understanding of the.
Lecture Set 13 Drawing Mouse and Keyboard Events Part A - Drawing.
Vector Graphics Making custom images. Raster vs. Vector Graphics In computer graphics, a raster graphics image, or bitmap, is a dot matrix data structure.
Introducing Photoshop to level 2 learners 16 – 18 First Diploma in Art & Design Understanding the basics.
CST238 Week 5 Questions / Concerns? Announcements – HW#1 due (Project ideas) – Check-off Take Home lab#4 Recap New topics – Drawing Coming up: – GUI Bloopers.
Computer Graphics Lecture 1 July 11, Computer Graphics What do you think of? The term “computer graphics” is a blanket term used to refer to the.
Object Oriented Programming Graphics and Multimedia Dr. Mike Spann
C# Programming Lecture 4 “GDI+” PGL01/CSP/2006.
Graphics and Multimedia Part #2
Graphics A graphics program allows you to combine pictures and text in many different ways. Features – General Level Draw graphics Enter Text Common Tools.
Chapter 28 - Java Graphics and Java2D Outline 28.1Introduction 28.2Graphics Contexts and Graphics Objects 28.3Color Control 28.4Font Control 28.5Drawing.
Graphics & Java 2D Drawing Two Dimensional Shapes Controlling Fonts Controlling Colors.
Java Graphics. Review 3 kinds of elements in components API? Layout managers Events Extend vs. Implement.
General Purpose Packages GRAPHICS Chapter 5. General Purpose Packages Features of Graphics Packages Entering text Entering text Common tools Common tools.
SVG for Designers Tom Hoferek. Objectives Introduce SVG Illustrate its capabilities Demonstrate SVG in action Speculate, discuss, answer questions.
Lecture 5 Graphics Erick Pranata. » Graphics Overview » About GDI+ » Getting Started.
© 2010 Delmar, Cengage Learning Chapter 7 Creating Graphics.
1 Graphic Device Interface (GDI). 2 Class Form A Form is a representation of any window displayed in your application. The Form class can be used to create.
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.
Merete S COLLEGEFACULTY OF ENGINEERING & SCIENCE Graphics ikt403 – Object-Oriented Software Development.
Graphics and Java2D Chapter Java Coordinate System Origin is in _____________ corner –Behind title bar of window X values increase to the ________.
ADOBE INDESIGN CS3 Chapter 7 CREATING GRAPHICS. Chapter 72 Introduction InDesign allows you to create graphics using tools in InDesign The Pen Tool can.
Graphics and Multimedia. OUTLINE Font Control Drawing Lines, Rectangles and Ovals Drawing Arcs Drawing a General Path.
Chapter 16 – Graphics and Multimedia. Outline 16.1Introduction 16.2 Graphics Contexts and Graphics Objects 16.3 Color Control 16.4 Font Control 16.5 Drawing.
Windows Programming C# Software Development. Overview  DLLs / PInvoke  DirectX .NET Component Library  Custom Controls  Event Model (in C++)  GUI.
2. Point A dot; visible mark In typography, a point is a period – the definitive end of a line.
(PART III) Graphics and Multimedia 16/02/1437 Lect6 CT
GDI +. Graphics class's methods System.Drawing Graphics Objects.
Georgia Institute of Technology Drawing in Java – part 2 Dr Usman Saeed Assistant Professor Faculty of Computing and Information Technology North Jeddah.
Chapter 7 Introduction to High-Level Language Programming.
(PART II) Graphics and Multimedia. Font Control Font s  After a Font is created, its properties cannot be modified  Programmers must create a new Font.
Graphics and Multimedia 2 Lecture 8. OUTLINE Font Control Drawing Lines, Rectangles and Ovals Drawing a General Path.
Graphics and Multimedia
12 Graphics and Java 2D™.
Bitmap Basics in Fireworks
Graphics and Multimedia
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
ThS. Nguyễn Hà Giang Khoa CNTT - Hutech
CASE Tools Graphical User Interface Programming Using C#
Graphic Editing Terms Cropping
GUI Graphics Chris North cs3724: HCI.
Digital Media Objective
Graphics and Multimedia
Inheritance in Graphics
Object Oriented Programming
Concrete Poems Poetic Forms.
2 types of scale factor problems
Graphics and Multimedia
Chapter 12 Graphics in Windows and the Web
CPT 450 Computer Graphics 3rd Lecture.
Presentation transcript:

Graphics and Multimedia Lecture 9

Outline Drawing Polygons and Polylines Advanced Graphics Capabilities

Drawing Polygons and Polylines Multisided shapes Graphics methods used to draw polygons DrawLines, DrawPolygon, and FillPolygon

Drawing Polygons and Polylines

Drawing a Triangle Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) Dim myGraphics As Graphics = e.Graphics Dim myPen As Pen Dim A As New Point(10, 10) Dim B As New Point(100, 50) Dim C As New Point(60, 150) Dim myPoints As Point() = {A, B, C} myPen = New Pen(Drawing.Color.Blue, 5) myGraphics.DrawPolygon(myPen, myPoints) End Sub

Advanced Graphics Capabilities Visual Basic offers many additional graphics capabilities Examples Brush hierarchy also includes: HatchBrush, LinearGradientBrush, PathGradientBrush and TextureBrush Additional graphics features Dashed lines, thick lines, filling shapes with patterns, etc

Advanced Graphics Capabilities Bitmap Class Produce images in color and gray scale with a particular width and height. Used to work with images defined by pixel data. How to use… Dim graphicsObject As Graphics = e.Graphics Dim BitmapVar As Bitmap = New Bitmap(width, height) . Dim BrushVar As TextureBrush = New TextureBrush(BitmapVar) graphicsObject.FillRectangle(BrushVar, X, Y, width, height)

Texture Brush Dim pts() As Point = { _ New Point(20, 5), _ New Point(100, 30), _ New Point(80, 100), _ New Point(120, 120), _ New Point(60, 140), _ New Point(5, 60) _ } ' Fill a polygon with a textured brush. e.Graphics.FillPolygon(New Drawing.TextureBrush(picFace.Image), pts) ' Make a pen. Dim a_pen As New Pen(Color.Tomato, 3) a_pen.DashStyle = Drawing.Drawing2D.DashStyle.Dash ' Outline the polygon. e.Graphics.DrawPolygon(a_pen, pts)