Video for this seminar can be found here: http://www.youtube.com/watch?v=MNxVMYKaZP0
Mike has been an active member of the community since MonoTouch launched, and recently joined Xamarin’s excellent documentation team. He’ll show you how to get to grips with creating 2D graphics and modify PDF files on the fly within your MonoTouch applications.
13. It’s Device Independent
• Also resolution independent
• Don’t work in pixels
• Instead use geometric points
14. It’s Device Independent
• Also resolution independent
• Don’t work in pixels
• Instead use geometric points
• Code will generally work on any iOS device
27. Draw during Run Loop
• Drawing with Core Graphics begins life
during run loop processing
28. Draw during Run Loop
• Drawing with Core Graphics begins life
during run loop processing
• During each iteration through the run loop
29. Draw during Run Loop
• Drawing with Core Graphics begins life
during run loop processing
• During each iteration through the run loop
• System checks if any views need to be
drawn
30. Draw during Run Loop
• Drawing with Core Graphics begins life
during run loop processing
• During each iteration through the run loop
• System checks if any views need to be
drawn
• Calls the UIView’s Draw method
32. Overriding Draw
• Subclass UIView and Override Draw to
introduce drawing code
• When run loop cycles, Draw will be called
33. Overriding Draw
• Subclass UIView and Override Draw to
introduce drawing code
• When run loop cycles, Draw will be called
public override void Draw (RectangleF rect)
{
base.Draw (rect);
// drawing code goes here
}
36. Basic Steps to Draw
1. Get a graphics context
2. Set up drawing attributes
37. Basic Steps to Draw
1. Get a graphics context
2. Set up drawing attributes
3. Create geometry from drawing primitives
38. Basic Steps to Draw
1. Get a graphics context
2. Set up drawing attributes
3. Create geometry from drawing primitives
4. Call a Draw or Stroke method