Commit 7e6c2b42 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

1. убрала текстовые настройки для отрисовки мат объектов (вместо этого запрос ctrPrp) для "чтения"

2. переделала remove_internal для удаления объектов


git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51899 954022d7-b5bf-4e40-9824-e11837661b57
parent 3dba7939
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
function CCircumflex() function CCircumflex()
{ {
//this.incline = 0; //this.incline = 0;
this.Parent = null;
this.turn = TURN_0; this.turn = TURN_0;
} }
CCircumflex.prototype.setTurn = function(turn) CCircumflex.prototype.setTurn = function(turn)
...@@ -25,7 +26,7 @@ CCircumflex.prototype.setTurn = function(turn) ...@@ -25,7 +26,7 @@ CCircumflex.prototype.setTurn = function(turn)
} }
CCircumflex.prototype.fixSize = function(mesure, bIncl) CCircumflex.prototype.fixSize = function(mesure, bIncl)
{ {
var alpha = this.txtPrp.FontSize/36; var alpha = this.Parent.getCtrPrp().FontSize/36;
var width = 3.88*alpha; var width = 3.88*alpha;
var height = 3.175*alpha; var height = 3.175*alpha;
...@@ -77,9 +78,9 @@ CCircumflex.prototype.draw = function(pGraphics) ...@@ -77,9 +78,9 @@ CCircumflex.prototype.draw = function(pGraphics)
var x = this.pos.x, var x = this.pos.x,
y = this.pos.y; y = this.pos.y;
var fontSize = this.txtPrp.FontSize; var fontSize = this.Parent.getCtrPrp().FontSize;
var penW = fontSize*g_dKoef_pt_to_mm*this.PEN_W; var penW = fontSize*g_dKoef_pt_to_mm*this.PEN_W;
penW *= 96/25.4; penW *= 96/25.4;
// g_dKoef_px_to_mm = 25.4/96 // g_dKoef_px_to_mm = 25.4/96
...@@ -173,23 +174,24 @@ CCircumflex.prototype.draw = function(pGraphics) ...@@ -173,23 +174,24 @@ CCircumflex.prototype.draw = function(pGraphics)
pGraphics.SetIntegerGrid(intGrid); pGraphics.SetIntegerGrid(intGrid);
} }
CCircumflex.prototype.setTxtPrp = function(txtPrp)
{
this.txtPrp = txtPrp;
}
CCircumflex.prototype.setPosition = function(pos) CCircumflex.prototype.setPosition = function(pos)
{ {
this.pos = pos; this.pos = pos;
} }
CCircumflex.prototype.relate = function(parent)
{
this.Parent = parent;
}
function CLine() function CLine()
{ {
this.PEN_W = 0.04; this.PEN_W = 0.04;
this.Parent = null;
} }
CLine.prototype.fixSize = function(measure) CLine.prototype.fixSize = function(measure)
{ {
var alpha = this.txtPrp.FontSize/36; var alpha = this.Parent.getCtrPrp().FontSize/36;
var height = 1.68*alpha; var height = 1.68*alpha;
var width = 4.938*alpha; var width = 4.938*alpha;
...@@ -200,7 +202,8 @@ CLine.prototype.fixSize = function(measure) ...@@ -200,7 +202,8 @@ CLine.prototype.fixSize = function(measure)
} }
CLine.prototype.draw = function(pGraphics) CLine.prototype.draw = function(pGraphics)
{ {
var penW = this.txtPrp.FontSize*g_dKoef_pt_to_mm*this.PEN_W; var fontSize = this.Parent.getCtrPrp().FontSize;
var penW = fontSize*g_dKoef_pt_to_mm*this.PEN_W;
//penW *= 96/25.4; //penW *= 96/25.4;
//var penY = penW/2*25.4/96; //для того чтобы линии совпадали (для одинарной и двойной черты) //var penY = penW/2*25.4/96; //для того чтобы линии совпадали (для одинарной и двойной черты)
...@@ -227,18 +230,19 @@ CLine.prototype.setPosition = function(pos) ...@@ -227,18 +230,19 @@ CLine.prototype.setPosition = function(pos)
{ {
this.pos = pos; this.pos = pos;
} }
CLine.prototype.setTxtPrp = function(txtPrp) CLine.prototype.relate = function(parent)
{ {
this.txtPrp = txtPrp; this.Parent = parent;
} }
function CDoubleLine() function CDoubleLine()
{ {
this.PEN_W = 0.04; this.PEN_W = 0.04;
this.Parent = null;
} }
CDoubleLine.prototype.fixSize = function(measure) CDoubleLine.prototype.fixSize = function(measure)
{ {
var alpha = this.txtPrp.FontSize/36; var alpha = this.Parent.getCtrPrp().FontSize/36;
var height = 2.843*alpha; var height = 2.843*alpha;
var width = 4.938*alpha; var width = 4.938*alpha;
...@@ -251,13 +255,10 @@ CDoubleLine.prototype.setPosition = function(pos) ...@@ -251,13 +255,10 @@ CDoubleLine.prototype.setPosition = function(pos)
{ {
this.pos = pos; this.pos = pos;
} }
CDoubleLine.prototype.setTxtPrp = function(txtPrp)
{
this.txtPrp = txtPrp;
}
CDoubleLine.prototype.draw = function(pGraphics) CDoubleLine.prototype.draw = function(pGraphics)
{ {
var penW = this.txtPrp.FontSize*g_dKoef_pt_to_mm*this.PEN_W; var fontSize = this.Parent.getCtrPrp().FontSize;
var penW = fontSize*g_dKoef_pt_to_mm*this.PEN_W;
//penW *= 96/25.4; //penW *= 96/25.4;
//var penY = penW/2*25.4/96; //для того чтобы линии совпадали (для одинарной и двойной черты) //var penY = penW/2*25.4/96; //для того чтобы линии совпадали (для одинарной и двойной черты)
...@@ -282,13 +283,17 @@ CDoubleLine.prototype.draw = function(pGraphics) ...@@ -282,13 +283,17 @@ CDoubleLine.prototype.draw = function(pGraphics)
pGraphics.ds(); pGraphics.ds();
} }
CDoubleLine.prototype.relate = function(parent)
{
this.Parent = parent;
}
function CTilde() function CTilde()
{ {
} }
CTilde.prototype.fixSize = function() CTilde.prototype.fixSize = function()
{ {
var betta = this.txtPrp.FontSize/36; var betta = this.Parent.getCtrPrp().FontSize/36;
var width = 9.047509765625*betta; // реальная на отрисовке width 7.495282031249999 var width = 9.047509765625*betta; // реальная на отрисовке width 7.495282031249999
var height = 2.469444444444444*betta; var height = 2.469444444444444*betta;
...@@ -332,8 +337,7 @@ CTilde.prototype.draw = function(pGraphics) ...@@ -332,8 +337,7 @@ CTilde.prototype.draw = function(pGraphics)
var XX = new Array(), var XX = new Array(),
YY = new Array(); YY = new Array();
var fontSize = this.txtPrp.FontSize; var fontSize = this.Parent.getCtrPrp().FontSize;
var textScale = fontSize/1000, // 1000 pt var textScale = fontSize/1000, // 1000 pt
alpha = textScale*25.4/96 /64 ; // g_dKoef_px_to_mm = 25.4/96 alpha = textScale*25.4/96 /64 ; // g_dKoef_px_to_mm = 25.4/96
...@@ -383,9 +387,9 @@ CTilde.prototype.setPosition = function(pos) ...@@ -383,9 +387,9 @@ CTilde.prototype.setPosition = function(pos)
{ {
this.pos = pos; this.pos = pos;
} }
CTilde.prototype.setTxtPrp = function(txtPrp) CTilde.prototype.relate = function(parent)
{ {
this.txtPrp = txtPrp; this.Parent = parent;
} }
function CBreve() function CBreve()
...@@ -398,7 +402,7 @@ CBreve.prototype.setTurn = function(tturn) ...@@ -398,7 +402,7 @@ CBreve.prototype.setTurn = function(tturn)
} }
CBreve.prototype.fixSize = function() CBreve.prototype.fixSize = function()
{ {
var betta = this.txtPrp.FontSize/36; var betta = this.Parent.getCtrPrp().FontSize/36;
var width = 4.2333333333333325*betta; var width = 4.2333333333333325*betta;
var height = 2.469444444444445*betta; var height = 2.469444444444445*betta;
...@@ -442,8 +446,7 @@ CBreve.prototype.draw = function(pGraphics) ...@@ -442,8 +446,7 @@ CBreve.prototype.draw = function(pGraphics)
var XX = new Array(), var XX = new Array(),
YY = new Array(); YY = new Array();
var fontSize = this.txtPrp.FontSize; var fontSize = this.Parent.getCtrPrp().FontSize;
var textScale = fontSize/1000, // 1000 pt var textScale = fontSize/1000, // 1000 pt
alpha = textScale*25.4/96 /64 ; // g_dKoef_px_to_mm = 25.4/96 alpha = textScale*25.4/96 /64 ; // g_dKoef_px_to_mm = 25.4/96
...@@ -500,15 +503,16 @@ CBreve.prototype.draw = function(pGraphics) ...@@ -500,15 +503,16 @@ CBreve.prototype.draw = function(pGraphics)
pGraphics.SetIntegerGrid(intGrid); pGraphics.SetIntegerGrid(intGrid);
} }
CBreve.prototype.setTxtPrp = function(txtPrp) CBreve.prototype.relate = function(parent)
{ {
this.txtPrp = txtPrp; this.Parent = parent;
} }
function CSign() function CSign()
{ {
this.sign = new CMathText(); this.sign = new CMathText();
this.type = null; this.type = null;
this.Parent = null;
} }
CSign.prototype.setSign = function(props) CSign.prototype.setSign = function(props)
{ {
...@@ -575,7 +579,7 @@ CSign.prototype.fixSize = function(bIncline) ...@@ -575,7 +579,7 @@ CSign.prototype.fixSize = function(bIncline)
{ {
this.sign.recalculateSize(); this.sign.recalculateSize();
this.dH = 0.7*this.txtPrp.FontSize/36; this.dH = 0.7*this.Parent.getCtrPrp().FontSize/36;
var height = this.sign.size.height + this.dH, var height = this.sign.size.height + this.dH,
width = this.sign.size.widthG; width = this.sign.size.widthG;
...@@ -589,10 +593,9 @@ CSign.prototype.draw = function(pGraphics) ...@@ -589,10 +593,9 @@ CSign.prototype.draw = function(pGraphics)
{ {
this.sign.draw(pGraphics); this.sign.draw(pGraphics);
} }
CSign.prototype.setTxtPrp = function(txtPrp) CSign.prototype.relate = function(parent)
{ {
this.txtPrp = txtPrp; this.Parent = parent;
//this.sign.setTxtPrp(txtPrp);
} }
function old_CAccent() function old_CAccent()
...@@ -1083,7 +1086,4 @@ CAccent.prototype.getCenter = function() ...@@ -1083,7 +1086,4 @@ CAccent.prototype.getCenter = function()
CAccent.prototype.getProps = function() CAccent.prototype.getProps = function()
{ {
var prps = {}; var prps = {};
} }
...@@ -80,6 +80,9 @@ CMathBase.prototype = ...@@ -80,6 +80,9 @@ CMathBase.prototype =
this.alignment.wdt[u] = CENTER; this.alignment.wdt[u] = CENTER;
}, },
///////// RunPrp, CtrPrp
setCtrPrp: function(runPrp) setCtrPrp: function(runPrp)
{ {
this.CtrPrp.Merge(runPrp); // only runPrp for paragraph this.CtrPrp.Merge(runPrp); // only runPrp for paragraph
...@@ -89,9 +92,19 @@ CMathBase.prototype = ...@@ -89,9 +92,19 @@ CMathBase.prototype =
var ctrPrp = new CTextPr(); var ctrPrp = new CTextPr();
ctrPrp.Merge(DEFAULT_RUN_PRP); ctrPrp.Merge(DEFAULT_RUN_PRP);
ctrPrp.Merge(this.CtrPrp); ctrPrp.Merge(this.CtrPrp);
ctrPrp.Merge(this.Composition.GetFirstPrp() );
return ctrPrp;
},
getCtrPrp_2: function()
{
var ctrPrp = new CTextPr();
ctrPrp.Merge(DEFAULT_RUN_PRP);
ctrPrp.Merge(this.CtrPrp);
return ctrPrp; return ctrPrp;
}, },
getPrpToControlLetter: function() // getPrpToControlLetter => getCtrPrp
old_getPrpToControlLetter: function()
{ {
var rPrp = new CTextPr(); var rPrp = new CTextPr();
//rPrp.Merge(DEFAULT_RUN_PRP); //rPrp.Merge(DEFAULT_RUN_PRP);
...@@ -100,6 +113,18 @@ CMathBase.prototype = ...@@ -100,6 +113,18 @@ CMathBase.prototype =
return rPrp; return rPrp;
}, },
addRPrp: function(rPrp)
{
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].addRPrp(rPrp);
}
},
/////////
setComposition: function(composition) setComposition: function(composition)
{ {
this.Composition = composition; this.Composition = composition;
......
...@@ -53,8 +53,7 @@ CBorderBox.prototype.recalculateSize = function() ...@@ -53,8 +53,7 @@ CBorderBox.prototype.recalculateSize = function()
var height = ss.height; var height = ss.height;
var center = ss.center; var center = ss.center;
//this.gapBrd = this.getTxtPrp().FontSize*0.08104587131076388; this.gapBrd = this.getCtrPrp().FontSize*0.08104587131076388;
this.gapBrd = this.getPrpToControlLetter().FontSize*0.08104587131076388;
if(this.bTop) if(this.bTop)
{ {
...@@ -74,9 +73,7 @@ CBorderBox.prototype.recalculateSize = function() ...@@ -74,9 +73,7 @@ CBorderBox.prototype.recalculateSize = function()
CBorderBox.prototype.draw = function(pGraphics) CBorderBox.prototype.draw = function(pGraphics)
{ {
this.elements[0][0].draw(pGraphics); this.elements[0][0].draw(pGraphics);
var penW = this.getCtrPrp().FontSize* 25.4/96 * 0.08 ;
//var penW = this.getTxtPrp().FontSize* 25.4/96 * 0.08 ;
var penW = this.getPrpToControlLetter().FontSize* 25.4/96 * 0.08 ;
if(this.bTop) if(this.bTop)
{ {
......
This diff is collapsed.
...@@ -48,8 +48,7 @@ CFraction.prototype.getCenter = function() ...@@ -48,8 +48,7 @@ CFraction.prototype.getCenter = function()
if(this.type == BAR_FRACTION || this.type == NO_BAR_FRACTION) if(this.type == BAR_FRACTION || this.type == NO_BAR_FRACTION)
{ {
//var penW = this.getTxtPrp().FontSize* 25.4/96 * 0.08 /2; var penW = this.getCtrPrp().FontSize* 25.4/96 * 0.08 /2;
var penW = this.getPrpToControlLetter().FontSize* 25.4/96 * 0.08 /2;
center = this.elements[0][0].size.height + penW; center = this.elements[0][0].size.height + penW;
} }
else if(this.type == SKEWED_FRACTION) else if(this.type == SKEWED_FRACTION)
...@@ -74,7 +73,7 @@ CFraction.prototype.draw = function(pGraphics) ...@@ -74,7 +73,7 @@ CFraction.prototype.draw = function(pGraphics)
} }
CFraction.prototype.drawBarFraction = function(pGraphics) CFraction.prototype.drawBarFraction = function(pGraphics)
{ {
var ctrPrp = this.getPrpToControlLetter(); var ctrPrp = this.getCtrPrp();
var penW = ctrPrp.FontSize* this.reduct* 25.4/96 * 0.08; var penW = ctrPrp.FontSize* this.reduct* 25.4/96 * 0.08;
var x1 = this.pos.x, var x1 = this.pos.x,
...@@ -94,8 +93,8 @@ CFraction.prototype.drawBarFraction = function(pGraphics) ...@@ -94,8 +93,8 @@ CFraction.prototype.drawBarFraction = function(pGraphics)
} }
CFraction.prototype.drawSkewedFraction = function(pGraphics) CFraction.prototype.drawSkewedFraction = function(pGraphics)
{ {
var ctrPrp = this.getPrpToControlLetter(); var ctrPrp = this.getCtrPrp();
//var fontSize = this.getTxtPrp().FontSize;
var penW = ctrPrp.FontSize/12.5*g_dKoef_pix_to_mm; var penW = ctrPrp.FontSize/12.5*g_dKoef_pix_to_mm;
var gap = this.gapSlash/2 - penW/7.5; var gap = this.gapSlash/2 - penW/7.5;
...@@ -199,7 +198,7 @@ CFraction.prototype.drawLinearFraction = function(pGraphics) ...@@ -199,7 +198,7 @@ CFraction.prototype.drawLinearFraction = function(pGraphics)
x2 = this.pos.x + this.elements[0][0].size.width + shift, x2 = this.pos.x + this.elements[0][0].size.width + shift,
y2 = this.pos.y + this.size.center + desc; y2 = this.pos.y + this.size.center + desc;
var ctrPrp = this.getPrpToControlLetter(); var ctrPrp = this.getCtrPrp();
var penW = ctrPrp.FontSize/12.5*g_dKoef_pix_to_mm; var penW = ctrPrp.FontSize/12.5*g_dKoef_pix_to_mm;
pGraphics.SetFont(ctrPrp); pGraphics.SetFont(ctrPrp);
...@@ -248,7 +247,7 @@ CFraction.prototype.recalculateSize = function() ...@@ -248,7 +247,7 @@ CFraction.prototype.recalculateSize = function()
} }
CFraction.prototype.recalculateSkewed = function() CFraction.prototype.recalculateSkewed = function()
{ {
var ctrPrp = this.getPrpToControlLetter(); var ctrPrp = this.getCtrPrp();
this.gapSlash = 5.011235894097222 * ctrPrp.FontSize/36; this.gapSlash = 5.011235894097222 * ctrPrp.FontSize/36;
var _width = this.elements[0][0].size.width + this.gapSlash + this.elements[0][1].size.width; var _width = this.elements[0][0].size.width + this.gapSlash + this.elements[0][1].size.width;
var _height = this.elements[0][0].size.height + this.elements[0][1].size.height; var _height = this.elements[0][0].size.height + this.elements[0][1].size.height;
...@@ -260,7 +259,7 @@ CFraction.prototype.recalculateLinear = function() ...@@ -260,7 +259,7 @@ CFraction.prototype.recalculateLinear = function()
{ {
var H = this.elements[0][0].size.center + this.elements[0][1].size.height - this.elements[0][1].size.center; var H = this.elements[0][0].size.center + this.elements[0][1].size.height - this.elements[0][1].size.center;
//var txtPrp = this.getTxtPrp(); //var txtPrp = this.getTxtPrp();
var ctrPrp = this.getPrpToControlLetter(); var ctrPrp = this.getCtrPrp();
var gap = 5.011235894097222*ctrPrp.FontSize/36; var gap = 5.011235894097222*ctrPrp.FontSize/36;
...@@ -393,6 +392,7 @@ CNumerator.prototype.recalculateSize = function() ...@@ -393,6 +392,7 @@ CNumerator.prototype.recalculateSize = function()
var arg = this.elements[0][0].size; var arg = this.elements[0][0].size;
//var txtPrp = this.getTxtPrp(); //var txtPrp = this.getTxtPrp();
//txtPrp.FontSize *= this.Parent.reduct; //txtPrp.FontSize *= this.Parent.reduct;
var ctrPrp = this.getCtrPrp(); var ctrPrp = this.getCtrPrp();
var Descent = arg.height - arg.ascent; // baseLine var Descent = arg.height - arg.ascent; // baseLine
...@@ -454,6 +454,7 @@ CDenominator.prototype.recalculateSize = function() ...@@ -454,6 +454,7 @@ CDenominator.prototype.recalculateSize = function()
var arg = this.elements[0][0].size; var arg = this.elements[0][0].size;
/*var txtPrp = this.getTxtPrp(); /*var txtPrp = this.getTxtPrp();
txtPrp.FontSize *= this.Parent.reduct;*/ txtPrp.FontSize *= this.Parent.reduct;*/
var ctrPrp = this.getCtrPrp(); var ctrPrp = this.getCtrPrp();
var gap = 7.832769097222222 * ctrPrp.FontSize/36, var gap = 7.832769097222222 * ctrPrp.FontSize/36,
......
...@@ -99,8 +99,7 @@ CLimit.prototype.getIterator = function() ...@@ -99,8 +99,7 @@ CLimit.prototype.getIterator = function()
} }
CLimit.prototype.setDistance = function() CLimit.prototype.setDistance = function()
{ {
//this.dH = 0.03674768518518519*this.getTxtPrp().FontSize; this.dH = 0.03674768518518519*this.getCtrPrp().FontSize;
this.dH = 0.03674768518518519*this.getPrpToControlLetter().FontSize;
} }
...@@ -157,8 +156,7 @@ CMathFunc.prototype.init = function() ...@@ -157,8 +156,7 @@ CMathFunc.prototype.init = function()
} }
CMathFunc.prototype.setDistance = function() CMathFunc.prototype.setDistance = function()
{ {
//this.dW = this.getTxtPrp().FontSize/6*g_dKoef_pt_to_mm; this.dW = this.getCtrPrp().FontSize/6*g_dKoef_pt_to_mm;
this.dW = this.getPrpToControlLetter().FontSize/6*g_dKoef_pt_to_mm;
} }
CMathFunc.prototype.getFName = function() CMathFunc.prototype.getFName = function()
{ {
......
This diff is collapsed.
...@@ -4,8 +4,7 @@ function CMathMatrix() ...@@ -4,8 +4,7 @@ function CMathMatrix()
this.lineGapRow = 1; this.lineGapRow = 1;
this.gaps = null; this.gaps = null;
this.plcHide = false; this.plcHide = false;
this.row = 0;
this.column = 0;
this.spaceRow = this.spaceRow =
{ {
...@@ -29,6 +28,11 @@ function CMathMatrix() ...@@ -29,6 +28,11 @@ function CMathMatrix()
column: new Array() column: new Array()
}; };
//// special for "read" ////
this.row = 0;
this.column = 0;
////
CMathBase.call(this); CMathBase.call(this);
} }
extend(CMathMatrix, CMathBase); extend(CMathMatrix, CMathBase);
...@@ -161,8 +165,7 @@ CMathMatrix.prototype.setRuleGap = function(space, rule, gap, minGap) ...@@ -161,8 +165,7 @@ CMathMatrix.prototype.setRuleGap = function(space, rule, gap, minGap)
} }
CMathMatrix.prototype.recalculateSize = function() CMathMatrix.prototype.recalculateSize = function()
{ {
//var txtPrp = this.getTxtPrp(); var txtPrp = this.getCtrPrp();
var txtPrp = this.getPrpToControlLetter();
var interval = this.getLineGap(txtPrp); var interval = this.getLineGap(txtPrp);
this.gaps.column[0] = 0; this.gaps.column[0] = 0;
...@@ -466,7 +469,6 @@ CMathMatrix.prototype.baseJustification = function(type) ...@@ -466,7 +469,6 @@ CMathMatrix.prototype.baseJustification = function(type)
//// ////
function CEqArray() function CEqArray()
{ {
this.row = 0;
CMathMatrix.call(this); CMathMatrix.call(this);
} }
extend(CEqArray, CMathMatrix); extend(CEqArray, CMathMatrix);
......
...@@ -129,8 +129,7 @@ CNary.prototype.init = function(props) ...@@ -129,8 +129,7 @@ CNary.prototype.init = function(props)
} }
CNary.prototype.setDistance = function() CNary.prototype.setDistance = function()
{ {
//this.dW = this.getTxtPrp().FontSize/36*2.45; this.dW = this.getCtrPrp().FontSize/36*2.45;
this.dW = this.getPrpToControlLetter().FontSize/36*2.45;
} }
CNary.prototype.getBase = function() CNary.prototype.getBase = function()
{ {
...@@ -325,7 +324,7 @@ CNaryUndOvr.prototype.init = function(sign) ...@@ -325,7 +324,7 @@ CNaryUndOvr.prototype.init = function(sign)
CNaryUndOvr.prototype.recalculateSize = function() CNaryUndOvr.prototype.recalculateSize = function()
{ {
//var zetta = this.getTxtPrp().FontSize* 25.4/96; //var zetta = this.getTxtPrp().FontSize* 25.4/96;
var zetta = this.getPrpToControlLetter().FontSize* 25.4/96; var zetta = this.getCtrPrp().FontSize* 25.4/96;
this.gapTop = zetta*0.25; this.gapTop = zetta*0.25;
this.gapBottom = zetta*0.1; this.gapBottom = zetta*0.1;
...@@ -419,7 +418,6 @@ CNaryUndOvr.prototype.getUpperIterator = function() ...@@ -419,7 +418,6 @@ CNaryUndOvr.prototype.getUpperIterator = function()
function CNaryOperator(flip) function CNaryOperator(flip)
{ {
this.Composition = null; this.Composition = null;
this.TxtPrp = new CMathTextPrp();
this.bFlip = (flip == -1); this.bFlip = (flip == -1);
this.sizeGlyph = null; this.sizeGlyph = null;
} }
...@@ -434,7 +432,7 @@ CNaryOperator.prototype.draw = function(pGraphics) ...@@ -434,7 +432,7 @@ CNaryOperator.prototype.draw = function(pGraphics)
YY = new Array(); YY = new Array();
//var textScale = this.getTxtPrp().FontSize/850; // 1000 pt //var textScale = this.getTxtPrp().FontSize/850; // 1000 pt
var textScale = this.getPrpToControlLetter().FontSize/850; // 1000 pt var textScale = this.getCtrPrp().FontSize/850; // 1000 pt
var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры
// g_dKoef_px_to_mm = 25.4/96 // g_dKoef_px_to_mm = 25.4/96
...@@ -497,22 +495,14 @@ CNaryOperator.prototype.Resize = function() ...@@ -497,22 +495,14 @@ CNaryOperator.prototype.Resize = function()
{ {
this.recalculateSize(); this.recalculateSize();
} }
CNaryOperator.prototype.setTxtPrp = function(txtPrp)
{
this.TxtPrp.Merge(txtPrp);
}
CNaryOperator.prototype.setComposition = function(Compos) CNaryOperator.prototype.setComposition = function(Compos)
{ {
this.Composition = Compos; this.Composition = Compos;
} }
CNaryOperator.prototype.getPrpToControlLetter = function() CNaryOperator.prototype.getCtrPrp = function()
{ {
return this.Parent.getPrpToControlLetter(); return this.Parent.getCtrPrp();
} }
/*CNaryOperator.prototype.getTxtPrp = function()
{
return this.TxtPrp;
}*/
function CSigma() function CSigma()
{ {
...@@ -630,7 +620,7 @@ CSigma.prototype.getCoord = function() ...@@ -630,7 +620,7 @@ CSigma.prototype.getCoord = function()
//var textScale = this.getTxtPrp().FontSize/850; // 1000 pt //var textScale = this.getTxtPrp().FontSize/850; // 1000 pt
var textScale = this.getPrpToControlLetter().FontSize/850; // 1000 pt var textScale = this.getCtrPrp().FontSize/850; // 1000 pt
var alpha = textScale*25.4/96 /64; var alpha = textScale*25.4/96 /64;
var h1 = Y[0] - Y[21], var h1 = Y[0] - Y[21],
...@@ -702,7 +692,7 @@ CSigma.prototype.calculateSizeGlyph = function() ...@@ -702,7 +692,7 @@ CSigma.prototype.calculateSizeGlyph = function()
// пока размер не меняем в зависимости от высоты аргумента // пока размер не меняем в зависимости от высоты аргумента
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var _width = 8.997900390624999*betta, var _width = 8.997900390624999*betta,
_height = 11.994444444444444*betta; _height = 11.994444444444444*betta;
...@@ -834,7 +824,7 @@ CProduct.prototype.getCoord = function() ...@@ -834,7 +824,7 @@ CProduct.prototype.getCoord = function()
//var textScale = this.getTxtPrp().FontSize/850, // 1000 pt //var textScale = this.getTxtPrp().FontSize/850, // 1000 pt
var textScale = this.getPrpToControlLetter().FontSize/850, // 1000 pt var textScale = this.getCtrPrp().FontSize/850, // 1000 pt
alpha = textScale*25.4/96 /64; alpha = textScale*25.4/96 /64;
var h1 = Y[9], var h1 = Y[9],
...@@ -865,7 +855,7 @@ CProduct.prototype.getCoord = function() ...@@ -865,7 +855,7 @@ CProduct.prototype.getCoord = function()
CProduct.prototype.calculateSizeGlyph = function() CProduct.prototype.calculateSizeGlyph = function()
{ {
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var _width = 10.312548828125*betta, var _width = 10.312548828125*betta,
_height = 11.994444444444444*betta; _height = 11.994444444444444*betta;
...@@ -937,7 +927,7 @@ CUnion.prototype.getCoord = function() ...@@ -937,7 +927,7 @@ CUnion.prototype.getCoord = function()
CUnion.prototype.calculateSizeGlyph = function() CUnion.prototype.calculateSizeGlyph = function()
{ {
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
this.gap = 0.93*betta; this.gap = 0.93*betta;
var _width = 9.38*betta, var _width = 9.38*betta,
...@@ -1056,7 +1046,7 @@ CLogicalOr.prototype.getCoord = function() ...@@ -1056,7 +1046,7 @@ CLogicalOr.prototype.getCoord = function()
X[7] = 0; Y[7] = 0; X[7] = 0; Y[7] = 0;
//var textScale = this.getTxtPrp().FontSize/850, // 1000 pt //var textScale = this.getTxtPrp().FontSize/850, // 1000 pt
var textScale = this.getPrpToControlLetter().FontSize/850, // 1000 pt var textScale = this.getCtrPrp().FontSize/850, // 1000 pt
alpha = textScale*25.4/96 /64; alpha = textScale*25.4/96 /64;
var w1 = X[1], var w1 = X[1],
...@@ -1088,7 +1078,7 @@ CLogicalOr.prototype.getCoord = function() ...@@ -1088,7 +1078,7 @@ CLogicalOr.prototype.getCoord = function()
CLogicalOr.prototype.calculateSizeGlyph = function() CLogicalOr.prototype.calculateSizeGlyph = function()
{ {
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var _width = 9.6159*betta, var _width = 9.6159*betta,
_height = 11.994444444444444*betta; _height = 11.994444444444444*betta;
...@@ -1318,7 +1308,7 @@ CIntegral.prototype.old_drawPath = function(XX, YY) ...@@ -1318,7 +1308,7 @@ CIntegral.prototype.old_drawPath = function(XX, YY)
CIntegral.prototype.calculateSizeGlyph = function() CIntegral.prototype.calculateSizeGlyph = function()
{ {
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var _width = 8.624*betta, var _width = 8.624*betta,
_height = 13.7*betta; _height = 13.7*betta;
...@@ -1359,7 +1349,7 @@ CDoubleIntegral.prototype.drawPath = function(pGraphics, XX, YY) ...@@ -1359,7 +1349,7 @@ CDoubleIntegral.prototype.drawPath = function(pGraphics, XX, YY)
CDoubleIntegral.prototype.calculateSizeGlyph = function() CDoubleIntegral.prototype.calculateSizeGlyph = function()
{ {
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var _width = 14.2296*betta, var _width = 14.2296*betta,
_height = 13.7*betta; _height = 13.7*betta;
...@@ -1410,7 +1400,7 @@ CTripleIntegral.prototype.drawPath = function(pGraphics, XX, YY) ...@@ -1410,7 +1400,7 @@ CTripleIntegral.prototype.drawPath = function(pGraphics, XX, YY)
CTripleIntegral.prototype.calculateSizeGlyph = function() CTripleIntegral.prototype.calculateSizeGlyph = function()
{ {
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var _width = 18.925368*betta, var _width = 18.925368*betta,
_height = 13.7*betta; _height = 13.7*betta;
...@@ -2852,7 +2842,7 @@ CContourIntegral.prototype.draw = function(pGraphics) ...@@ -2852,7 +2842,7 @@ CContourIntegral.prototype.draw = function(pGraphics)
HH = coord2.H; HH = coord2.H;
//var textScale = this.getTxtPrp().FontSize/850;// 1000 pt //var textScale = this.getTxtPrp().FontSize/850;// 1000 pt
var textScale = this.getPrpToControlLetter().FontSize/850;// 1000 pt var textScale = this.getCtrPrp().FontSize/850;// 1000 pt
var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры
var shX = (WW - W)*alpha/2, var shX = (WW - W)*alpha/2,
...@@ -2897,7 +2887,7 @@ CContourIntegral.prototype.draw = function(pGraphics) ...@@ -2897,7 +2887,7 @@ CContourIntegral.prototype.draw = function(pGraphics)
CContourIntegral.prototype.calculateSizeGlyph = function() CContourIntegral.prototype.calculateSizeGlyph = function()
{ {
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var _width = 8.624*betta, var _width = 8.624*betta,
_height = 13.7*betta; _height = 13.7*betta;
...@@ -3357,7 +3347,7 @@ CSurfaceIntegral.prototype.draw = function(pGraphics) ...@@ -3357,7 +3347,7 @@ CSurfaceIntegral.prototype.draw = function(pGraphics)
//var textScale = this.getTxtPrp().FontSize/850; // 1000 pt //var textScale = this.getTxtPrp().FontSize/850; // 1000 pt
var textScale = this.getPrpToControlLetter().FontSize/850; // 1000 pt var textScale = this.getCtrPrp().FontSize/850; // 1000 pt
var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры
...@@ -3404,7 +3394,7 @@ CSurfaceIntegral.prototype.draw = function(pGraphics) ...@@ -3404,7 +3394,7 @@ CSurfaceIntegral.prototype.draw = function(pGraphics)
CSurfaceIntegral.prototype.calculateSizeGlyph = function() CSurfaceIntegral.prototype.calculateSizeGlyph = function()
{ {
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var _width = 14.2296*betta, var _width = 14.2296*betta,
_height = 13.7*betta; _height = 13.7*betta;
...@@ -3933,7 +3923,7 @@ CVolumeIntegral.prototype.draw = function(pGraphics) ...@@ -3933,7 +3923,7 @@ CVolumeIntegral.prototype.draw = function(pGraphics)
HH = coord2.H; HH = coord2.H;
var textScale = this.getPrpToControlLetter().FontSize/850; // 1000 pt var textScale = this.getCtrPrp().FontSize/850; // 1000 pt
var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры var alpha = textScale*25.4/96 /64; // коэффициент; используется для того чтобы перевести координаты в миллиметры
...@@ -3980,7 +3970,7 @@ CVolumeIntegral.prototype.draw = function(pGraphics) ...@@ -3980,7 +3970,7 @@ CVolumeIntegral.prototype.draw = function(pGraphics)
CVolumeIntegral.prototype.calculateSizeGlyph = function() CVolumeIntegral.prototype.calculateSizeGlyph = function()
{ {
//var betta = this.getTxtPrp().FontSize/36; //var betta = this.getTxtPrp().FontSize/36;
var betta = this.getPrpToControlLetter().FontSize/36; var betta = this.getCtrPrp().FontSize/36;
var _width = 18.925368*betta, var _width = 18.925368*betta,
_height = 13.7*betta; _height = 13.7*betta;
......
This diff is collapsed.
...@@ -9,7 +9,7 @@ function CSignRadical() ...@@ -9,7 +9,7 @@ function CSignRadical()
} }
CSignRadical.prototype.draw = function(pGraphics) CSignRadical.prototype.draw = function(pGraphics)
{ {
var txtPrp = this.Parent.getPrpToControlLetter(); var txtPrp = this.Parent.getCtrPrp();
//var txtPrp = this.Parent.getTxtPrp(); //var txtPrp = this.Parent.getTxtPrp();
var penW = txtPrp.FontSize*g_dKoef_pt_to_mm*0.042; var penW = txtPrp.FontSize*g_dKoef_pt_to_mm*0.042;
...@@ -80,7 +80,7 @@ CSignRadical.prototype.draw = function(pGraphics) ...@@ -80,7 +80,7 @@ CSignRadical.prototype.draw = function(pGraphics)
CSignRadical.prototype.recalculateSize = function() CSignRadical.prototype.recalculateSize = function()
{ {
//var txtPrp = this.Parent.getTxtPrp(); //var txtPrp = this.Parent.getTxtPrp();
var txtPrp = this.Parent.getPrpToControlLetter(); var txtPrp = this.Parent.getCtrPrp();
var sizeArg = this.Parent.getBase().size; var sizeArg = this.Parent.getBase().size;
var height, width; var height, width;
...@@ -223,7 +223,7 @@ CRadical.prototype.recalculateSize = function() ...@@ -223,7 +223,7 @@ CRadical.prototype.recalculateSize = function()
var width = degr.width - wTick + sign.width; var width = degr.width - wTick + sign.width;
var txtPrp = this.getPrpToControlLetter(); var txtPrp = this.getCtrPrp();
var plH = 9.877777777777776 * txtPrp.FontSize /36; var plH = 9.877777777777776 * txtPrp.FontSize /36;
if( sign.height < plH ) if( sign.height < plH )
......
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