WPFandInk - Fall 2009 CAP 6105 – Pen-Based User...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Fall 2009 CAP 6105 – Pen-Based User Interfaces ©Joseph J. LaViola Jr. Ink and Windows Presentation Foundation Lecture #4: Ink and WPF Joseph J. LaViola Jr. Fall 2009 Fall 2009 CAP 6105 – Pen-based User Interfaces ©Joseph J. LaViola Jr. From Last Time ¡ Windows Presentation Foundation (WPF) ¢ integration of ¡ ink ¡ 2D Graphics ¡ 3D Graphics ¡ video and audio ¢ uses visual tree model ¡ component based ¡ XAML and C# code ¡ Important control – InkCanvas Fall 2009 CAP 6105 – Pen-based User Interfaces ©Joseph J. LaViola Jr. Important Ink Components ¡ InkCanvas – System.Windows.Controls ¢ receives and displays ink strokes ¢ starting point for ink applications ¢ stores ink in Strokes ¡ System.Windows.Ink Namespace ¢ contains classes to interact with and manipulate ink ¢ examples ¡ Stroke ¡ InkRecognizer ¡ InkAnalyzer ¡ GestureRecognizer Fall 2009 CAP 6105 – Pen-based User Interfaces ©Joseph J. LaViola Jr. Dealing with InkCanvas ¡ InkCanvas collects Strokes ¡ Strokes contain StylusPoints ¡ StylusPoints contain X,Y, Pressure ¢ can also be converted into Geometry objects ¡ Strokes contain ¢ digitizer packets ¢ drawing attributes ¢ application-defined data ¡ InkCanvas has several stylus level events ¢ StrokeCollected, StylusInAirMove , … Fall 2009 CAP 6105 – Pen-based User Interfaces ©Joseph J. LaViola Jr. Strokes and Geometry ¡ Strokes ¢ perform hit tests ¢ get geometry, bounds, Bezier points ¢ add properties ¢ transformations ¡ Geometry ¢ lose pressure and stylus specific data ¢ Within scope of 2D graphics API ¢ get area ¢ create shapes ¡ No Cusp or self-intersection detection Fall 2009 CAP 6105 – Pen-based User Interfaces ©Joseph J. LaViola Jr. More InkCanvas Features ¡ Enough support to implement Windows Journal ¡ Modes ¢ Ink ¢ InkandGesture ¢ GestureOnly ¢ EraseByStroke ¢ EraseByPoint ¢ Select ¢ None Fall 2009 CAP 6105 – Pen-based User Interfaces ©Joseph J. LaViola Jr. Drawing Attributes ¡ Can access on stroke level using Drawing Attributes property ¡ Can access on global level using the InkCanvas DefaultDrawingAttributes property ¡ Example attributes ¢ color ¢ Bezier curves ¢ height and width of ink stroke ¢ ignoring pressure Fall 2009 CAP 6105 – Pen-based User Interfaces ©Joseph J. LaViola Jr....
View Full Document

This note was uploaded on 06/12/2011 for the course CAP 6105 taught by Professor Lavoila during the Spring '09 term at University of Central Florida.

Page1 / 11

WPFandInk - Fall 2009 CAP 6105 – Pen-Based User...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online