Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

stubbed out "Text" methods

  • Loading branch information...
commit 99a0b27a0e562172db64390f8c0a8bf9c4526c39 1 parent e510b79
@richardklafter richardklafter authored
Showing with 51 additions and 2 deletions.
  1. +51 −2 JollyBit.Canvas/Canvas.cs
View
53 JollyBit.Canvas/Canvas.cs
@@ -94,8 +94,8 @@ public void BeginPath()
}
public void ClosePath() // Untested
{
- if(lastSubpath != null && lastSubpath is ComplexPath)
- (lastSubpath as ComplexPath).ClosePath();
+ if(lastSubpath != null && lastSubpath is ComplexSubpath)
+ (lastSubpath as ComplexSubpath).ClosePath();
}
public void MoveTo(float x, float y)
{
@@ -192,6 +192,32 @@ bool IsPointInPath(double x, double y)
}
#endregion
+ #region Text
+ public String Font { get; set; }
+ public TextAlign textAlign { get; set; }
+ public TextBaseline TextBaseline { get; set; } // "top", "hanging", "middle", "alphabetic", "ideographic", "bottom" (default: "alphabetic")
+ public void FillText(string text, double x, double y, double maxWidth)
+ {
+ throw new System.NotImplementedException();
+ }
+ public void FillText(string text, double x, double y)
+ {
+ throw new System.NotImplementedException();
+ }
+ public void StrokeText(string text, double x, double y, double maxWidth)
+ {
+ throw new System.NotImplementedException();
+ }
+ public void StrokeText(string text, double x, double y)
+ {
+ throw new System.NotImplementedException();
+ }
+ public ITextMetrics MeasureText(string text)
+ {
+ throw new System.NotImplementedException();
+ }
+ #endregion
+
#region Stroking
protected virtual void strokeLineSegment(LineSegment segment1, LineSegment segment2, LineJoinStyle joinStyle, bool joinOnLeft)
{
@@ -290,6 +316,11 @@ public void PutImageData(IImageData imagedata, float dx, float dy, float dirtyX,
#endregion
}
+ public interface ITextMetrics
+ {
+ float Width { get; }
+ };
+
public interface IImageData
{
ulong Width { get; }
@@ -297,6 +328,24 @@ public interface IImageData
byte[] Data { get; }
};
+ public enum TextBaseline
+ {
+ Top,
+ Middle,
+ Alphabetic,
+ Ideographic,
+ Bottom
+ }
+
+ public enum TextAlign
+ {
+ Start,
+ End,
+ Left,
+ Right,
+ Center
+ }
+
public enum LineCapStyle
{
/// <summary>
Please sign in to comment.
Something went wrong with that request. Please try again.