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.

Slides:



Advertisements
Similar presentations
Computer Graphics Prof. Muhammad Saeed Dept. of Computer Science & IT Federal Urdu University of Arts, Sciences and Technology.
Advertisements

Microsoft® Small Basic
2D Graphics Drawing Things. Graphics In your GUI, you might want to draw graphics E.g. draw lines, circles, shapes, draw strings etc The Graphics class.
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)
Cosc 5/4730 Blackberry Drawing. Screen size With Blackberry devices, they have a known screen size in pixels. If you are programming for specific device.
Chapter 9 Color, Sound and Graphics
COMPUTER PROGRAMMING I Objective 8.03 Apply Animation and Graphic Methods in a Windows Form (4%)
Chapter 3 Creating a Business Letter with a Letterhead and Table
User Interface Programming in C#: Graphics

CS 280 Data Structures Professor John Peterson. Quiz 4 Recap Consider the following array: {2, 6, 7, 3, 4, 1, 5, 9}. Draw this in tree form and then show.
Chapter 13 Graphics, Animation, Sound, and Drag-and-Drop Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Graphics Procedure (IDrawable) 1. Basic Procedure For Drawing ThingsToDraw Create Objects From Classes Add Them to PictureBox Use the Paint Event to draw.
Graphics and Multimedia. Outline Introduction Graphics Contexts and Graphics Objects Color Control.
Chapter 13: Advanced GUI and Graphics
Syracuse University 3D Framework using GDI+.Net Carmen Vaca Ruiz Independent Study Fall 2004 Instructor: Dr. Jim Fawcett.
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.
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,
Software Engineering1 The.NET Framework and the CLI 2D Graphics with GDI+ Visual Studio.NET 2008.
Graphics Object. Group Activity! In each group, pull out one piece of blank paper and one pen or pencil Start with the piece of paper on the left side.
Lecture Set 13 Drawing Mouse and Keyboard Events Part A - Drawing.
Computer Programming and Basic Software Engineering 9 Building Graphical User Interface A Brief Introduction to GDI+ S.R.G. Fraser, Pro Visual C++/CLI.
Technological Debates. Debate Unit Debate Procedure Opening Statement by affirmative (2 minute max) Opening Statement by opposition (2 minute max) Argument.
CST238 Week 6 Questions / Concerns? Announcements – HW#2 due next Monday (project concept/preliminary design) – Check-off Take Home lab#5 Comment about.
BFTAW BDPA Workshop Introduction to GIMP Chris
BFTAW BDPA Workshop Introduction to GIMP Chris
1 Windows Graphics. 2 Objectives You will be able to Use the Windows GDI+ to draw arbitrary figures and text on a Windows form. Add a handler for the.
Object Oriented Programming Graphics and Multimedia Dr. Mike Spann
C# Programming Lecture 4 “GDI+” PGL01/CSP/2006.
Graphics and Multimedia Part #2
BIM211 – Visual Programming Objects, Collections, and Events 1.
Visual Basic .NET BASICS
CSE 219 Computer Science III Images. HW1 Has been posted on Blackboard Making a Game of Life with limited options.
CST238 Week 4 Questions / Concerns? Announcements – Start thinking about project ideas – Test#1 next Monday, 4/28/14 Recap Check-off Take Home Lab#3 New.
Mimio Making Madness How can I create a lesson using Mimio? In this session, you will see and use all the unique tools to create an exciting lesson that.
GDI+ 1. Objectives 2 GDI+ class  Create and render Graphic  Display information on the computer screen, printer 3.
BIM211 – Visual Programming Interacting with Users Graphics 1.
McGraw-Hill © 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter 13 Graphics, Animation, Sound and Drag-and-Drop.
Lecture 5 Graphics Erick Pranata. » Graphics Overview » About GDI+ » Getting Started.
Chapter 5. Shape tool  Vector images  Can be resized without loss of quality  Must rasterize to work with in some cases.
Copyright 2007, Paradigm Publishing Inc. WORD 2007 Chapter 5 BACKNEXTEND 5-1 LINKS TO OBJECTIVES Section Breaks Columns Hyphenation Drop Caps Insert Symbols,
Chapter 4 Working with Information 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.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Graphics Concepts CS 2302, Fall /17/20142 Drawing in Android.
Painting (Chapter 12) Java Certification Study Group January 25, 1999 Mark Roth.
Graphics and Java2D Chapter Java Coordinate System Origin is in _____________ corner –Behind title bar of window X values increase to the ________.
Images Part 11 dbg. 2 Images The form and several controls can display a number of different types of image files in the BackgroundImage Property. These.
Windows Programming C# Software Development. Overview  DLLs / PInvoke  DirectX .NET Component Library  Custom Controls  Event Model (in C++)  GUI.
Paint Tutorial Created February 2006 Start Paint: Start>Programs>Accessories>Paint.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 6A Methods (Concepts)
GDI +. Graphics class's methods System.Drawing Graphics Objects.
Enhancing a Presentation with Pictures, Shapes, and WordArt
International Electrotechnical Commission Speaker name Title Title Event Date Location.
Chapter 4 Drawing and Painting with Color
Finishing and Presenting Logo
Bitmap Basics in Fireworks
Graphics.
Basic Graphics Chapter 5 3/19/15 Thursday Section Only
Graphics and Multimedia
Computer Programming I
Graphics and Multimedia
Drawing Mouse and Keyboard Events Part A - Drawing
ThS. Nguyễn Hà Giang Khoa CNTT - Hutech
CASE Tools Graphical User Interface Programming Using C#
Jan. 22, 2016 Please Do Now Sharpen Pencil
Chapter 12 Graphics in Windows and the Web
CPT 450 Computer Graphics 3rd Lecture.
Presentation transcript:

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 presentations start next Monday (#1&#2) Test#1 Take Home Lab#5

Recap Timer – Tick event DateTime – Get current date / time MDI applications – Main form – Child form (set its MDIparent to main form)

GUI Blooper Presentations Limit your presentation to 30 minutes. Both team members need to present. Summary the key points in the chapter. Show examples given in the book. When possible, show actual GUI examples from applications/websites that you have used.

Drawing You need the Graphics class from System.Drawing namespace. Two ways to get a Graphics object – Create a new that’s associated with the form or control – Grab the Graphics object in the Paint event’s PaintEventArgs

Drawing There are 2 types of draw: – Immediate Draw Not updated after form resize, covered or uncovered. – Redraw Updated each time a form is updated. This is done through Paint event. This event can be triggered using Invalidate

Drawing Get Graphics object: – Create a Graphics object for the form or control Graphics g = this.CreateGraphics(); Graphics g = pictureBox1.CreateGraphics(); – void DrawingForm_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics;

Drawing Classes that you might need: – Color – Brushes – Pens Read Chapter 5, 6 & 7 in the Chris Sells book as reference on different shapes to draw and different pens and brushes to use.

Grid System X Y (X, Y)

Drawing Drawing procedure: 1.Obtain a Graphics object. 2.Obtain a tool to use on the Graphics object. - pen, brushes, fonts, etc. 3.Call methods on the Graphics object to draw your picture. 4.Trigger redraw is necessary by Invalidate the form or control

Methods of the Graphics class Draw methods – DrawLine, DrawArc, DrawImage, DrawEllipse, DrawRectangle Fill methods – FillEllipse, FillPolygon, FillRectangle

Drawing Drawing directly on the form – Know the size of the form Drawing on one of the controls – Panel – PictureBox – Use the Width and Height for the control

Form: Size Form’s ClientRectangle (284, 262) (300, 300)

Take Home Lab #5 Draw a static picture. – Try different styles of pens and brushes. – Try different shapes, lines, images, text. – Add some immediately drawn shapes via a button, but keep the main picture updated. – Be creative but it doesn’t have to be very complex or fancy.