Commit 8e91b906 authored by Anna.Pavlova's avatar Anna.Pavlova

Поправила баг для итератора в CLimit, расстояние от основания до итератора...

Поправила баг для итератора в CLimit, расстояние от основания до итератора было неправильным. Теперь текстовые настройки пересчитываются и для инлайновых мат объектов тоже (и настройки для управляющих элементов тоже с учетом настроек родительского класса) на Apply_TextPr

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60015 954022d7-b5bf-4e40-9824-e11837661b57
parent 97524908
......@@ -22,7 +22,7 @@ function CAccentCircumflex()
Asc.extendClass(CAccentCircumflex, CGlyphOperator);
CAccentCircumflex.prototype.calcSize = function(stretch)
{
var alpha = this.Parent.GetTPrpToControlLetter().FontSize/36;
var alpha = this.Parent.Get_TxtPrControlLetter().FontSize/36;
var width = 3.88*alpha;
var height = 3.175*alpha;
......@@ -40,7 +40,7 @@ CAccentCircumflex.prototype.calcSize = function(stretch)
}
CAccentCircumflex.prototype.calcCoord = function(stretch)
{
var fontSize = this.Parent.GetTPrpToControlLetter().FontSize;
var fontSize = this.Parent.Get_TxtPrControlLetter().FontSize;
//var penW = fontSize*g_dKoef_pt_to_mm*this.PEN_W;
//penW *= 96/25.4;
......@@ -126,7 +126,7 @@ function CAccentLine()
Asc.extendClass(CAccentLine, CGlyphOperator);
CAccentLine.prototype.calcSize = function(stretch)
{
var alpha = this.Parent.GetTPrpToControlLetter().FontSize/36;
var alpha = this.Parent.Get_TxtPrControlLetter().FontSize/36;
var height = 1.68*alpha;
var width = 4.938*alpha;
......@@ -137,7 +137,7 @@ CAccentLine.prototype.calcSize = function(stretch)
}
CAccentLine.prototype.draw = function(x, y, pGraphics)
{
var fontSize = this.Parent.GetTPrpToControlLetter().FontSize;
var fontSize = this.Parent.Get_TxtPrControlLetter().FontSize;
var penW = fontSize*0.067 * 25.4/96;
var x1 = x + 25.4/96,
......@@ -156,7 +156,7 @@ function CAccentDoubleLine()
Asc.extendClass(CAccentDoubleLine, CGlyphOperator);
CAccentDoubleLine.prototype.calcSize = function(stretch)
{
var alpha = this.Parent.GetTPrpToControlLetter().FontSize/36;
var alpha = this.Parent.Get_TxtPrControlLetter().FontSize/36;
var height = 2.843*alpha;
var width = 4.938*alpha;
......@@ -177,7 +177,7 @@ CAccentDoubleLine.prototype.calcSize = function(stretch)
}
CAccentDoubleLine.prototype.draw = function(x, y, pGraphics)
{
var fontSize = this.Parent.GetTPrpToControlLetter().FontSize;
var fontSize = this.Parent.Get_TxtPrControlLetter().FontSize;
var diff = this.diff;
......@@ -204,7 +204,7 @@ function CAccentTilde()
Asc.extendClass(CAccentTilde, CGlyphOperator);
CAccentTilde.prototype.calcSize = function(stretch)
{
var betta = this.Parent.GetTPrpToControlLetter().FontSize/36;
var betta = this.Parent.Get_TxtPrControlLetter().FontSize/36;
var width = 9.047509765625*betta; // реальная на отрисовке width 7.495282031249999
var height = 2.469444444444444*betta;
......@@ -257,7 +257,7 @@ CAccentTilde.prototype.calcCoord = function(stretch)
var XX = [],
YY = [];
var fontSize = this.Parent.GetTPrpToControlLetter().FontSize;
var fontSize = this.Parent.Get_TxtPrControlLetter().FontSize;
var textScale = fontSize/1000, // 1000 pt
alpha = textScale*25.4/96 /64 ; // g_dKoef_px_to_mm = 25.4/96
......@@ -304,7 +304,7 @@ function CAccentBreve()
Asc.extendClass(CAccentBreve, CGlyphOperator);
CAccentBreve.prototype.calcSize = function(stretch)
{
var betta = this.Parent.GetTPrpToControlLetter().FontSize/36;
var betta = this.Parent.Get_TxtPrControlLetter().FontSize/36;
var width = 4.2333333333333325*betta;
var height = 2.469444444444445*betta;
......@@ -344,7 +344,7 @@ CAccentBreve.prototype.calcCoord = function(stretch)
var XX = [],
YY = [];
var fontSize = this.Parent.GetTPrpToControlLetter().FontSize;
var fontSize = this.Parent.Get_TxtPrControlLetter().FontSize;
var textScale = fontSize/1000, // 1000 pt
alpha = textScale*25.4/96 /64 ; // g_dKoef_px_to_mm = 25.4/96
......
......@@ -157,23 +157,11 @@ CMathBase.prototype =
{
return this.Parent.Get_CompiledArgSize();
},
// для управляющих символов в приоритете GetFirstRunPrp
// если первый элемент - мат объект, то берутся его CtrPrp
GetTPrpToControlLetter: function()
Get_TxtPrControlLetter: function(RPI) // TextPrControlLetter не копируются !
{
var TextPrControlLetter;
if(this.bInside)
{
TextPrControlLetter = this.Parent.GetTPrpToControlLetter();
}
else
{
this.Set_CompiledCtrPrp(this.Parent, this.ParaMath);
TextPrControlLetter = this.TextPrControlLetter;
}
this.Set_CompiledCtrPrp(this.Parent, this.ParaMath, RPI);
return TextPrControlLetter;
return this.TextPrControlLetter;
},
fillPlaceholders: function()
{
......@@ -339,7 +327,7 @@ CMathBase.prototype =
{
if(this.elements[i][j].IsJustDraw()) // для Just-Draw элементов надо выставить Font
{
var ctrPrp = this.GetTPrpToControlLetter();
var ctrPrp = this.Get_TxtPrControlLetter();
var Font =
{
......@@ -412,7 +400,7 @@ CMathBase.prototype =
{
if(this.elements[i][j].IsJustDraw()) // для Just-Draw элементов надо выставить Font
{
var ctrPrp = this.GetTPrpToControlLetter();
var ctrPrp = this.Get_TxtPrControlLetter();
var Font =
{
......@@ -499,12 +487,6 @@ CMathBase.prototype =
this.RecalcInfo.bCtrPrp = false;
}
},
Get_TxtPrControlLetter: function(RPI) // TextPrControlLetter не копируются !
{
this.Set_CompiledCtrPrp(this.Parent, this.ParaMath, RPI);
return this.TextPrControlLetter;
},
getAscent: function(oMeasure, _height)
{
var Ascent = 0;
......@@ -739,12 +721,18 @@ CMathBase.prototype =
}
// если у нас вложенный мат объект, то CtrPrp возьмутся у родительского класса
// нужно пройтись по всем элементам и вложенным формулам в том числе, чтобы пересчитать ctrPrp у всех мат объектов
// для некоторых формул (например, для итератора в Limit) важно учесть собственные настройки (ArgSize), а не только родительские, поэтому и нужно профтись по всем inline-формулам
for(var i = 0 ; i < this.Content.length; i++)
for(var i=0; i < this.nRow; i++)
for(var j = 0; j < this.nCol; j++)
if(!this.elements[i][j].IsJustDraw())
this.elements[i][j].Apply_TextPr(TextPr, IncFontSize, ApplyToAll);
/*for(var i = 0 ; i < this.Content.length; i++)
{
this.Content[i].Apply_TextPr(TextPr, IncFontSize, ApplyToAll);
}
}*/
},
GetMathTextPrForMenu: function(ContentPos, Depth)
......
......@@ -182,7 +182,7 @@ CBorderBox.prototype.recalculateSize = function()
var height = base.height;
var ascent = base.ascent;
this.gapBrd = this.GetTPrpToControlLetter().FontSize*0.08104587131076388;
this.gapBrd = this.Get_TxtPrControlLetter().FontSize*0.08104587131076388;
if(this.Pr.hideTop == false)
{
......@@ -205,7 +205,7 @@ CBorderBox.prototype.draw = function(x, y, pGraphics, PDSE)
{
this.elements[0][0].draw(x, y, pGraphics, PDSE);
var penW = this.GetTPrpToControlLetter().FontSize*0.02;
var penW = this.Get_TxtPrControlLetter().FontSize*0.02;
var Width = this.size.width - this.GapLeft - this.GapRight,
Height = this.size.height;
......
......@@ -106,7 +106,7 @@ CDegreeBase.prototype.recalculateSup = function(oMeasure)
var base = this.elements[0][0].size,
iter = this.elements[0][1].size;
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var shCenter = this.ParaMath.GetShiftCenter(oMeasure, mgCtrPrp);
this.upBase = 0;
......@@ -157,7 +157,7 @@ CDegreeBase.prototype.recalculateSubScript = function(oMeasure)
var base = this.elements[0][0].size,
iter = this.elements[0][1].size;
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var shCenter = this.ParaMath.GetShiftCenter(oMeasure, mgCtrPrp);
var width = base.width + iter.width + this.dW;
......@@ -437,7 +437,7 @@ CDegreeSubSupBase.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI,
};
CDegreeSubSupBase.prototype.recalculateSize = function(oMeasure, RPI)
{
//var mgCtrPrp = this.GetTPrpToControlLetter();
//var mgCtrPrp = this.Get_TxtPrControlLetter();
var mgCtrPrp = this.Get_CompiledCtrPrp(); // Get_CompiledCtrPrp - чтобы итераторы не разъезжались
// половину ascent брать нельзя, т.к. черта дроби будет разделительной для верхнего и нижнего итератора => соответственно
......@@ -468,7 +468,7 @@ CDegreeSubSupBase.prototype.recalculateSize = function(oMeasure, RPI)
//var lUp = base.size.height/2; // center of base
var lDown = base.size.height - lUp; // height - center of base
var ctrPrpIter = iters.GetTPrpToControlLetter();
var ctrPrpIter = iters.Get_TxtPrControlLetter();
var shIter = this.ParaMath.GetShiftCenter(oMeasure, ctrPrpIter); //смещение
var minGap = 0.7*shIter;
......
......@@ -71,7 +71,7 @@ CFraction.prototype.draw = function(x, y, pGraphics, PDSE)
}
CFraction.prototype.drawBarFraction = function(x, y, pGraphics, PDSE)
{
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var penW = mgCtrPrp.FontSize* 25.4/96 * 0.08;
......@@ -95,7 +95,7 @@ CFraction.prototype.drawBarFraction = function(x, y, pGraphics, PDSE)
}
CFraction.prototype.drawSkewedFraction = function(x, y, pGraphics, PDSE)
{
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var penW = mgCtrPrp.FontSize/12.5*g_dKoef_pix_to_mm;
......@@ -199,7 +199,7 @@ CFraction.prototype.drawLinearFraction = function(x, y, pGraphics, PDSE)
x2 = X + this.elements[0][0].size.width + shift,
y2 = Y + this.size.height;
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var penW = mgCtrPrp.FontSize/12.5*g_dKoef_pix_to_mm;
pGraphics.SetFont(mgCtrPrp);
......@@ -298,7 +298,7 @@ CFraction.prototype.recalculateBarFraction = function(oMeasure)
var num = this.elements[0][0].size,
den = this.elements[1][0].size;
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var width = num.width > den.width ? num.width : den.width;
var height = num.height + den.height;
......@@ -310,7 +310,7 @@ CFraction.prototype.recalculateBarFraction = function(oMeasure)
}
CFraction.prototype.recalculateSkewed = function(oMeasure)
{
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
//this.gapSlash = 5.011235894097222 * mgCtrPrp.FontSize/36;
this.dW = 5.011235894097222 * mgCtrPrp.FontSize/36;
......@@ -331,7 +331,7 @@ CFraction.prototype.recalculateLinear = function()
var H = AscentFirst + DescentSecond;
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var gap = 5.011235894097222*mgCtrPrp.FontSize/36;
......@@ -458,7 +458,7 @@ CNumerator.prototype.recalculateSize = function()
{
var arg = this.elements[0][0].size;
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var Descent = arg.height - arg.ascent; // baseLine
......@@ -510,7 +510,7 @@ CDenominator.prototype.recalculateSize = function()
{
var arg = this.elements[0][0].size;
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var Ascent = arg.ascent - 4.938888888888888*mgCtrPrp.FontSize/36;
......
......@@ -88,7 +88,7 @@ CLimitPrimary.prototype.Resize = function(oMeasure, RPI)
if(this.Type == LIMIT_LOW)
this.dH = 0;
else
this.dH = 0.06*this.GetTPrpToControlLetter().FontSize;
this.dH = 0.06*this.Get_TxtPrControlLetter().FontSize;
this.FName.Resize(oMeasure, RPI);
......@@ -218,7 +218,7 @@ CMathFunc.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInf
};
CMathFunc.prototype.setDistance = function()
{
this.dW = this.GetTPrpToControlLetter().FontSize/6*g_dKoef_pt_to_mm;
this.dW = this.Get_TxtPrControlLetter().FontSize/6*g_dKoef_pt_to_mm;
};
CMathFunc.prototype.getFName = function()
{
......
......@@ -248,7 +248,7 @@ CMatrixBase.prototype.recalculateSize = function(oMeasure, RPI)
this.RecalcInfo.bProps = false;
}
var FontSize = this.GetTPrpToControlLetter().FontSize;
var FontSize = this.Get_TxtPrControlLetter().FontSize;
var metrics = this.getMetrics();
if(this.nCol > 1)
......
......@@ -411,7 +411,7 @@ CNary.prototype.setCtrPrp = function(txtPrp)
}
CNary.prototype.setDistance = function()
{
this.dW = this.GetTPrpToControlLetter().FontSize/36*2.45;
this.dW = this.Get_TxtPrControlLetter().FontSize/36*2.45;
}
CNary.prototype.getBase = function()
{
......@@ -469,7 +469,7 @@ function CNaryUnd(bInside)
Asc.extendClass(CNaryUnd, CMathBase);
CNaryUnd.prototype.setDistance = function()
{
var zetta = this.GetTPrpToControlLetter().FontSize*25.4/96;
var zetta = this.Get_TxtPrControlLetter().FontSize*25.4/96;
this.dH = zetta*0.25;
}
CNaryUnd.prototype.getAscent = function()
......@@ -515,7 +515,7 @@ function CNaryOvr(bInside)
Asc.extendClass(CNaryOvr, CMathBase);
CNaryOvr.prototype.old_setDistance = function()
{
var zetta = this.GetTPrpToControlLetter().FontSize* 25.4/96;
var zetta = this.Get_TxtPrControlLetter().FontSize* 25.4/96;
this.dH = zetta*0.1;
}
CNaryOvr.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
......@@ -536,7 +536,7 @@ CNaryOvr.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
}
CNaryOvr.prototype.recalculateSize = function()
{
var FontSize = this.GetTPrpToControlLetter().FontSize;
var FontSize = this.Get_TxtPrControlLetter().FontSize;
var zetta = FontSize*25.4/96;
var minGapBottom = zetta*0.1,
......@@ -601,7 +601,7 @@ CNaryUndOvr.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI)
}
CNaryUndOvr.prototype.recalculateSize = function()
{
var FontSize = this.GetTPrpToControlLetter().FontSize;
var FontSize = this.Get_TxtPrControlLetter().FontSize;
var zetta = FontSize*25.4/96;
this.gapTop = zetta*0.25;
......@@ -700,7 +700,7 @@ CNaryOperator.prototype.drawGlyph = function(x, y,pGraphics)
YY = [];
//var textScale = this.getTxtPrp().FontSize/850; // 1000 pt
var textScale = this.GetTPrpToControlLetter().FontSize/850; // 1000 pt
var textScale = this.Get_TxtPrControlLetter().FontSize/850; // 1000 pt
var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры
// g_dKoef_px_to_mm = 25.4/96
......@@ -740,7 +740,7 @@ CNaryOperator.prototype.drawTextElem = function(x, y, pGraphics)
{
//pGraphics.b_color1(0,0,0,255);
var ctrPrp = this.GetTPrpToControlLetter();
var ctrPrp = this.Get_TxtPrControlLetter();
var Font =
{
......@@ -769,7 +769,7 @@ CNaryOperator.prototype.recalculateSize = function()
var height = this.sizeGlyph.height,
width = this.sizeGlyph.width,
ascent = this.sizeGlyph.height/2 + DIV_CENT*this.GetTPrpToControlLetter().FontSize;
ascent = this.sizeGlyph.height/2 + DIV_CENT*this.Get_TxtPrControlLetter().FontSize;
this.size = {height: height, width: width, ascent: ascent};
}
......@@ -782,9 +782,9 @@ CNaryOperator.prototype.Resize = function(oMeasure, RPI)
{
this.recalculateSize(); //обычный пересчет, oMeasure не нужен
}
CNaryOperator.prototype.GetTPrpToControlLetter = function()
CNaryOperator.prototype.Get_TxtPrControlLetter = function()
{
return this.Parent.GetTPrpToControlLetter();
return this.Parent.Get_TxtPrControlLetter();
}
/*CNaryOperator.prototype.IsOnlyText = function()
{
......@@ -907,7 +907,7 @@ CSigma.prototype.getCoord = function()
//var textScale = this.getTxtPrp().FontSize/850; // 1000 pt
var textScale = this.GetTPrpToControlLetter().FontSize/850; // 1000 pt
var textScale = this.Get_TxtPrControlLetter().FontSize/850; // 1000 pt
var alpha = textScale*25.4/96 /64;
var h1 = Y[0] - Y[21],
......@@ -979,7 +979,7 @@ CSigma.prototype.calculateSizeGlyph = function()
// пока размер не меняем в зависимости от высоты аргумента
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
var _width = 8.997900390624999*betta,
_height = 11.994444444444444*betta;
......@@ -1111,7 +1111,7 @@ CProduct.prototype.getCoord = function()
//var textScale = this.getTxtPrp().FontSize/850, // 1000 pt
var textScale = this.GetTPrpToControlLetter().FontSize/850, // 1000 pt
var textScale = this.Get_TxtPrControlLetter().FontSize/850, // 1000 pt
alpha = textScale*25.4/96 /64;
var h1 = Y[9],
......@@ -1142,7 +1142,7 @@ CProduct.prototype.getCoord = function()
CProduct.prototype.calculateSizeGlyph = function()
{
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
var _width = 10.312548828125*betta,
_height = 11.994444444444444*betta;
......@@ -1214,7 +1214,7 @@ CUnion.prototype.getCoord = function()
CUnion.prototype.calculateSizeGlyph = function()
{
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
this.gap = 0.93*betta;
var _width = 9.38*betta,
......@@ -1333,7 +1333,7 @@ CLogicalOr.prototype.getCoord = function()
X[7] = 0; Y[7] = 0;
//var textScale = this.getTxtPrp().FontSize/850, // 1000 pt
var textScale = this.GetTPrpToControlLetter().FontSize/850, // 1000 pt
var textScale = this.Get_TxtPrControlLetter().FontSize/850, // 1000 pt
alpha = textScale*25.4/96 /64;
var w1 = X[1],
......@@ -1365,7 +1365,7 @@ CLogicalOr.prototype.getCoord = function()
CLogicalOr.prototype.calculateSizeGlyph = function()
{
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
var _width = 9.6159*betta,
_height = 11.994444444444444*betta;
......@@ -1502,7 +1502,7 @@ CIntegral.prototype.drawPath = function(pGraphics, XX, YY)
CIntegral.prototype.calculateSizeGlyph = function()
{
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
var _width = 8.624*betta,
_height = 13.7*betta;
......@@ -1543,7 +1543,7 @@ CDoubleIntegral.prototype.drawPath = function(pGraphics, XX, YY)
CDoubleIntegral.prototype.calculateSizeGlyph = function()
{
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
var _width = 14.2296*betta,
_height = 13.7*betta;
......@@ -1594,7 +1594,7 @@ CTripleIntegral.prototype.drawPath = function(pGraphics, XX, YY)
CTripleIntegral.prototype.calculateSizeGlyph = function()
{
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
var _width = 18.925368*betta,
_height = 13.7*betta;
......@@ -1958,7 +1958,7 @@ CContourIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
HH = coord2.H;
//var textScale = this.getTxtPrp().FontSize/850;// 1000 pt
var FontSize = this.GetTPrpToControlLetter().FontSize;
var FontSize = this.Get_TxtPrControlLetter().FontSize;
var textScale = FontSize/850;// 1000 pt
var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры
......@@ -2006,7 +2006,7 @@ CContourIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
CContourIntegral.prototype.calculateSizeGlyph = function()
{
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
var _width = 8.624*betta,
_height = 13.7*betta;
......@@ -2043,7 +2043,7 @@ CSurfaceIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
WW = 1.6*coord2.W,
HH = coord2.H;
var FontSize = this.GetTPrpToControlLetter().FontSize;
var FontSize = this.Get_TxtPrControlLetter().FontSize;
var textScale = FontSize/850; // 1000 pt
var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры
......@@ -2092,7 +2092,7 @@ CSurfaceIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
CSurfaceIntegral.prototype.calculateSizeGlyph = function()
{
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
var _width = 14.2296*betta,
_height = 13.7*betta;
......@@ -2128,7 +2128,7 @@ CVolumeIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
WW = 2.1*coord2.W,
HH = coord2.H;
var FontSize = this.GetTPrpToControlLetter().FontSize;
var FontSize = this.Get_TxtPrControlLetter().FontSize;
var textScale = FontSize/850; // 1000 pt
var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры
......@@ -2176,7 +2176,7 @@ CVolumeIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
CVolumeIntegral.prototype.calculateSizeGlyph = function()
{
//var betta = this.getTxtPrp().FontSize/36;
var betta = this.GetTPrpToControlLetter().FontSize/36;
var betta = this.Get_TxtPrControlLetter().FontSize/36;
var _width = 18.925368*betta,
_height = 13.7*betta;
......
......@@ -401,7 +401,7 @@ CGlyphOperator.prototype.drawOnlyLines = function(x, y, pGraphics, PDSE)
}
CGlyphOperator.prototype.getCtrPrp = function()
{
return this.Parent.GetTPrpToControlLetter();
return this.Parent.Get_TxtPrControlLetter();
}
CGlyphOperator.prototype.PreRecalc = function(Parent)
{
......@@ -2943,7 +2943,7 @@ COperator.prototype.draw = function(x, y, pGraphics, PDSE)
this.Make_ShdColor(PDSE);
var ctrPrp = this.GetTPrpToControlLetter();
var ctrPrp = this.Get_TxtPrControlLetter();
var Font =
{
......@@ -3035,7 +3035,7 @@ COperator.prototype.fixSize = function(oMeasure, stretch)
var width, height, ascent;
var dims;
var ctrPrp = this.GetTPrpToControlLetter();
var ctrPrp = this.Get_TxtPrControlLetter();
var Font =
{
......@@ -3108,7 +3108,7 @@ COperator.prototype.fixSize = function(oMeasure, stretch)
// Ascent
var mgCtrPrp = this.Parent.GetTPrpToControlLetter();
var mgCtrPrp = this.Parent.Get_TxtPrControlLetter();
var shCenter = this.ParaMath.GetShiftCenter(oMeasure, mgCtrPrp);
if(!bLine && (this.operator.loc == LOCATION_TOP || this.operator.loc == LOCATION_BOT))
......@@ -3193,9 +3193,9 @@ COperator.prototype.PreRecalc = function(Parent, ParaMath)
if(this.typeOper !== OPERATOR_EMPTY)
this.operator.PreRecalc(this); // в данном случае mathText нужен только один параметр
}
COperator.prototype.GetTPrpToControlLetter = function()
COperator.prototype.Get_TxtPrControlLetter = function()
{
return this.Parent.GetTPrpToControlLetter();
return this.Parent.Get_TxtPrControlLetter();
}
COperator.prototype.getChr = function()
{
......@@ -3514,7 +3514,7 @@ CDelimiter.prototype.Resize = function(oMeasure, RPI)
heightG = ascentG + descentG;
var mgCtrPrp = this.GetTPrpToControlLetter();
var mgCtrPrp = this.Get_TxtPrControlLetter();
var shCenter = this.ParaMath.GetShiftCenter(oMeasure, mgCtrPrp);
var maxAD = ascentG - shCenter > descentG + shCenter ? ascentG - shCenter: descentG + shCenter;
......@@ -3820,7 +3820,7 @@ CCharacter.prototype.draw = function(x, y, pGraphics, PDSE)
{
this.elements[0][0].draw(x, y, pGraphics, PDSE);
var ctrPrp = this.GetTPrpToControlLetter();
var ctrPrp = this.Get_TxtPrControlLetter();
var Font =
{
......@@ -4025,7 +4025,7 @@ CGroupCharacter.prototype.getAscent = function(oMeasure)
//var shCent = DIV_CENT*this.getCtrPrp().FontSize;
var ctrPrp = this.GetTPrpToControlLetter();
var ctrPrp = this.Get_TxtPrControlLetter();
var shCent = this.ParaMath.GetShiftCenter(oMeasure, ctrPrp);
if(this.Pr.vertJc === VJUST_TOP && this.Pr.pos === LOCATION_TOP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment