This commit is contained in:
ermau 2012-04-09 12:53:04 -04:00
Родитель af3ae5855e
Коммит 357b547429
7 изменённых файлов: 16 добавлений и 15 удалений

Просмотреть файл

@ -84,7 +84,7 @@ namespace Xwt.CairoBackend
la.Measured = false;
}
public void SetHeigth (object backend, double value)
public void SetHeight (object backend, double value)
{
LayoutBackend la = (LayoutBackend) backend;
la.Heigth = value;

Просмотреть файл

@ -54,7 +54,7 @@ namespace Xwt.GtkBackend
Pango.Layout pl = (Pango.Layout)WidgetRegistry.GetBackend (layout);
CairoContextBackend ctx = (CairoContextBackend)backend;
ctx.Context.MoveTo (x, y);
if (layout.Heigth <= 0) {
if (layout.Height <= 0) {
Pango.CairoHelper.ShowLayout (ctx.Context, pl);
} else {
var lc = pl.LineCount;
@ -66,7 +66,7 @@ namespace Xwt.GtkBackend
var extl = new Pango.Rectangle ();
line.GetExtents (ref ext, ref extl);
h += (extl.Height / scale);
if (h > layout.Heigth)
if (h > layout.Height)
break;
ctx.Context.MoveTo (x, y + h);
Pango.CairoHelper.ShowLayoutLine (ctx.Context, line);

Просмотреть файл

@ -74,7 +74,7 @@ namespace Xwt.GtkBackend
tl.Width = (int) (value * Pango.Scale.PangoScale);
}
public void SetHeigth (object backend, double value)
public void SetHeight (object backend, double value)
{
this.Heigth = value;
}

Просмотреть файл

@ -272,10 +272,11 @@ namespace Xwt.WPFBackend
var c = (DrawingContext)backend;
var sfont = layout.Font.ToDrawingFont ();
var measure = layout.GetSize ();
var h = layout.Heigth > 0 ? (float)layout.Heigth : (float)measure.Height;
var h = layout.Height > 0 ? (float)layout.Height : (float)measure.Height;
var stringFormat = TextLayoutContext.StringFormat;
var sdStringFormat = layout.Trimming.ToDrawingStringTrimming ();
if (layout.Heigth > 0 && stringFormat.Trimming != sdStringFormat) {
if (layout.Height > 0 && stringFormat.Trimming != sdStringFormat) {
stringFormat = (System.Drawing.StringFormat)stringFormat.Clone ();
stringFormat.Trimming = sdStringFormat;
}

Просмотреть файл

@ -54,7 +54,7 @@ namespace Xwt.WPFBackend
((TextLayoutContext) backend).Width = value;
}
public void SetHeigth (object backend, double value)
public void SetHeight (object backend, double value)
{
((TextLayoutContext) backend).Heigth = value;
}

Просмотреть файл

@ -36,7 +36,7 @@ namespace Xwt.Backends
object Create (ICanvasBackend canvas);
void SetWidth (object backend, double value);
void SetHeigth (object backend, double value);
void SetHeight (object backend, double value);
void SetText (object backend, string text);
void SetFont (object backend, Font font);
void SetTrimming (object backend, TextTrimming textTrimming);

Просмотреть файл

@ -38,7 +38,7 @@ namespace Xwt.Drawing
Font font;
string text;
double width = -1;
double heigth = -1;
double height = -1;
TextTrimming textTrimming;
static TextLayout ()
@ -86,20 +86,20 @@ namespace Xwt.Drawing
}
/// <summary>
/// Gets or sets desired heigth.
/// Gets or sets desired Height.
/// </summary>
/// <value>
/// The heigth. A value of -1 uses GetSize().Heigth on drawings
/// The Height. A value of -1 uses GetSize().Height on drawings
/// </value>
public double Heigth {
get { return heigth; }
set { heigth = value; handler.SetHeigth (Backend, value); }
public double Height {
get { return this.height; }
set { this.height = value; handler.SetHeight (Backend, value); }
}
/// <summary>
/// measures the text
/// if Width is other than -1, it measures the height according to Width
/// Heigth is ignored
/// Height is ignored
/// </summary>
/// <returns>
/// The size.