Permalink
Browse files

Added Support for Text Rotation

  • Loading branch information...
1 parent 8348e7c commit f8f6903b69a2cd28f380129bc72363ea8bf69c60 @efontana efontana committed Apr 29, 2013
Showing with 129 additions and 0 deletions.
  1. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/ExampleLibrary.dll
  2. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/ExampleLibrary.dll.mdb
  3. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Default-568h@2x.png
  4. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/ExampleLibrary.dll
  5. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/ExampleLibrary.dll.mdb
  6. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Icon114x114.png
  7. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Icon29x29.png
  8. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Icon50x50.png
  9. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Icon57x57.png
  10. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Icon58x58.png
  11. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Icon72x72.png
  12. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Images/Icon.png
  13. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Images/Icon114x114.png
  14. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Images/Icon29x29.png
  15. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Images/Icon50x50.png
  16. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Images/Icon57x57.png
  17. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Images/Icon58x58.png
  18. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Images/Icon72x72.png
  19. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Info.plist
  20. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Mono.Security.dll
  21. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Mono.Security.dll.mdb
  22. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/MonoTouch.Dialog-1.dll
  23. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/MonoTouch.Dialog-1.dll.mdb
  24. +2 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/MonoTouchDebugConfiguration.txt
  25. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/MonoTouchDemo
  26. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/MonoTouchDemo.exe
  27. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/MonoTouchDemo.exe.mdb
  28. +10 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/MonoTouchSimulatorAssemblies.list
  29. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/OxyPlot.MonoTouch.dll
  30. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/OxyPlot.MonoTouch.dll.mdb
  31. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/OxyPlot.dll
  32. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/OxyPlot.dll.mdb
  33. +47 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/Settings.bundle/Root.plist
  34. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/System.Core.dll
  35. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/System.Core.dll.mdb
  36. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/System.Json.dll
  37. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/System.Json.dll.mdb
  38. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/System.Xml.dll
  39. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/System.Xml.dll.mdb
  40. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/System.dll
  41. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/System.dll.mdb
  42. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/monotouch.dll
  43. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/monotouch.dll.mdb
  44. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/mscorlib.dll
  45. +1 −0 MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.app/mscorlib.dll.mdb
  46. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.exe
  47. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/MonoTouchDemo.exe.mdb
  48. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/OxyPlot.MonoTouch.dll
  49. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/OxyPlot.MonoTouch.dll.mdb
  50. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/OxyPlot.dll
  51. BIN MonoTouch.Demo/bin/iPhoneSimulator/Debug/OxyPlot.dll.mdb
  52. +3 −0 MonoTouch.Demo/obj/Debug/monotouch_dll_content_processed
  53. +1 −0 MonoTouch.Demo/obj/Debug/monotouch_version
  54. +30 −0 OxyPlot.2DGraphLib.MonoTouch.userprefs
  55. +12 −0 OxyPlot.MonoTouch/MonoTouchRenderContext.cs
  56. BIN OxyPlot.MonoTouch/bin/Debug/OxyPlot.MonoTouch.dll
  57. BIN OxyPlot.MonoTouch/bin/Debug/OxyPlot.MonoTouch.dll.mdb
  58. BIN OxyPlot.MonoTouch/bin/Debug/OxyPlot.dll
  59. BIN OxyPlot.MonoTouch/bin/Debug/OxyPlot.dll.mdb
  60. BIN OxyPlot/Source/Examples/ExampleLibrary/bin/Debug/ExampleLibrary.dll
  61. BIN OxyPlot/Source/Examples/ExampleLibrary/bin/Debug/ExampleLibrary.dll.mdb
  62. BIN OxyPlot/Source/Examples/ExampleLibrary/bin/Debug/OxyPlot.MonoTouch.dll
  63. BIN OxyPlot/Source/Examples/ExampleLibrary/bin/Debug/OxyPlot.MonoTouch.dll.mdb
  64. BIN OxyPlot/Source/Examples/ExampleLibrary/bin/Debug/OxyPlot.dll
  65. BIN OxyPlot/Source/Examples/ExampleLibrary/bin/Debug/OxyPlot.dll.mdb
  66. BIN OxyPlot/Source/OxyPlot/bin/Debug/OxyPlot.dll
  67. BIN OxyPlot/Source/OxyPlot/bin/Debug/OxyPlot.dll.mdb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,10 @@
+ExampleLibrary.dll
+Mono.Security.dll
+MonoTouch.Dialog-1.dll
+OxyPlot.MonoTouch.dll
+OxyPlot.dll
+System.Core.dll
+System.Json.dll
+System.Xml.dll
+System.dll
+mscorlib.dll
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Title</key>
+ <string>AppSettings</string>
+ <key>StringsTable</key>
+ <string>Root</string>
+ <key>PreferenceSpecifiers</key>
+ <array>
+ <dict>
+ <key>Type</key>
+ <string>PSGroupSpecifier</string>
+ <key>Title</key>
+ <string>Debug Settings</string>
+ </dict>
+ <dict>
+ <key>Type</key>
+ <string>PSToggleSwitchSpecifier</string>
+ <key>Title</key>
+ <string>Enabled</string>
+ <key>Key</key>
+ <string>__monotouch_debug_enabled</string>
+ <key>DefaultValue</key>
+ <string>1</string>
+ <key>TrueValue</key>
+ <string>1</string>
+ <key>FalseValue</key>
+ <string>0</string>
+ </dict>
+ <dict>
+ <key>Type</key>
+ <string>PSTextFieldSpecifier</string>
+ <key>Title</key>
+ <string>Xamarin Studio Host</string>
+ <key>Key</key>
+ <string>__monodevelop_host</string>
+ <key>AutocapitalizationType</key>
+ <string>None</string>
+ <key>AutocorrectionType</key>
+ <string>No</string>
+ <key>DefaultValue</key>
+ <string>automatic</string>
+ </dict>
+ </array>
+</dict>
+</plist>
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
+/Users/eric/OxyPlot.2DGraphLib.MonoTouch.Eric/OxyPlot.MonoTouch/bin/Debug/OxyPlot.MonoTouch.dll
+/Users/eric/OxyPlot.2DGraphLib.MonoTouch.Eric/OxyPlot/Source/OxyPlot/bin/Debug/OxyPlot.dll
+/Users/eric/OxyPlot.2DGraphLib.MonoTouch.Eric/OxyPlot/Source/Examples/ExampleLibrary/bin/Debug/ExampleLibrary.dll
@@ -0,0 +1 @@
+6.2.4.2
@@ -0,0 +1,30 @@
+<Properties>
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.IPhone.6.0" />
+ <MonoDevelop.Ide.Workbench ActiveDocument="OxyPlot.MonoTouch/MonoTouchRenderContext.cs">
+ <Files>
+ <File FileName="OxyPlot.MonoTouch/MonoTouchRenderContext.cs" Line="228" Column="5" />
+ <File FileName="../OxyPlot.2DGraphLib.MonoTouch/OxyPlot.MonoTouch/MonoTouchRenderContext.cs" Line="227" Column="10" />
+ </Files>
+ <Pads>
+ <Pad Id="ProjectPad">
+ <State expanded="True" />
+ </Pad>
+ <Pad Id="ClassPad">
+ <State expanded="True" selected="True" />
+ </Pad>
+ <Pad Id="MonoDevelop.Debugger.WatchPad">
+ <State />
+ </Pad>
+ <Pad Id="ConnectionManagerPad">
+ <State selected="True">
+ <Option id="ShowSystemObjects" value="True" />
+ <Option id="ShowDatabaseName" value="True" />
+ </State>
+ </Pad>
+ </Pads>
+ </MonoDevelop.Ide.Workbench>
+ <MonoDevelop.Ide.DebuggingService.Breakpoints>
+ <BreakpointStore />
+ </MonoDevelop.Ide.DebuggingService.Breakpoints>
+ <MonoDevelop.Ide.DebuggingService.PinnedWatches />
+</Properties>
@@ -221,6 +221,11 @@ public override void DrawRectangle (OxyRect rect, OxyColor fill, OxyColor stroke
gctx.DrawPath (CGPathDrawingMode.Stroke);
}
+ public static double DegreesToRadians(double angle)
+ {
+ return Math.PI * angle / 180.0;
+ }
+
public override void DrawText (ScreenPoint p, string text, OxyColor fill, string fontFamily, double fontSize, double fontWeight, double rotate, HorizontalTextAlign halign, VerticalTextAlign valign, OxySize? maxSize)
{
@@ -267,6 +272,13 @@ public override void DrawText (ScreenPoint p, string text, OxyColor fill, string
float y = (float)(p.Y);
float x = (float)(p.X);
+ // Rotate the text here.
+ var m = CGAffineTransform.MakeTranslation(-x,-y);
+ m.Multiply( CGAffineTransform.MakeRotation((float)DegreesToRadians(rotate)));
+ m.Multiply( CGAffineTransform.MakeTranslation(x,y));
+
+ gctx.ConcatCTM( m );
+
switch(halign)
{
case HorizontalTextAlign.Left:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit f8f6903

Please sign in to comment.