Commit 51f4e55d authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov
parent 0cf4f6b1
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -164375,6 +164375,10 @@ ParaComment.prototype =
{
},
Recalculate_LineMetrics : function(PRS, _CurLine, _CurRange)
{
},
Recalculate_Range_Width : function(PRSC, _CurLine, _CurRange)
{
},
......@@ -178601,6 +178605,7 @@ function ParaDrawing(W, H, GraphicObj, DrawingDocument, DocumentContent, Parent)
this.W = W;
this.H = H;
this.PageNum = 0;
this.LineNum = 0;
this.YOffset = 0;
this.DocumentContent = DocumentContent;
......@@ -179146,7 +179151,7 @@ ParaDrawing.prototype =
return false;
},
Update_Position : function(Paragraph, ParaLayout, PageLimits, PageLimitsOrigin)
Update_Position : function(Paragraph, ParaLayout, PageLimits, PageLimitsOrigin, LineNum)
{
if ( undefined != this.PositionH_Old )
{
......@@ -179203,6 +179208,7 @@ ParaDrawing.prototype =
var OldPageNum = this.PageNum;
this.PageNum = PageNum;
this.LineNum = LineNum;
this.X = this.Internal_Position.CalcX;
this.Y = this.Internal_Position.CalcY;
......@@ -182744,6 +182750,19 @@ CParagraphContentWithParagraphLikeContent.prototype.Recalculate_Set_RangeEndPos
this.Content[CurPos].Recalculate_Set_RangeEndPos( PRS, PRP, Depth + 1 );
};
CParagraphContentWithParagraphLikeContent.prototype.Recalculate_LineMetrics = function(PRS, _CurLine, _CurRange)
{
var CurLine = _CurLine - this.StartLine;
var CurRange = (0 === CurLine ? _CurRange - this.StartRange : _CurRange);
var StartPos = this.protected_GetRangeStartPos(CurLine, CurRange);
var EndPos = this.protected_GetRangeEndPos(CurLine, CurRange);
for (var CurPos = StartPos; CurPos <= EndPos; CurPos++)
{
this.Content[CurPos].Recalculate_LineMetrics(PRSC, _CurLine, _CurRange);
}
};
CParagraphContentWithParagraphLikeContent.prototype.Recalculate_Range_Width = function(PRSC, _CurLine, _CurRange)
{
var CurLine = _CurLine - this.StartLine;
......@@ -186571,11 +186590,8 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
var ParaRange = PRS.Range;
var bMathWordLarge = PRS.bMathWordLarge;
var LineRule = ParaPr.Spacing.LineRule;
var Pos = RangeStartPos;
var UpdateLineMetricsText = false;
var ContentLen = this.Content.length;
var WidthLine = PRS.XEnd - PRS.X;
......@@ -186596,10 +186612,7 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
// Проверяем, не нужно ли добавить нумерацию к данному элементу
if (true === this.RecalcInfo.NumberingAdd && true === Item.Can_AddNumbering())
{
var TempRes = this.Internal_Recalculate_Numbering(Item, PRS.Paragraph, ParaPr, X, PRS.LineAscent, PRS.Page, PRS.Line, PRS.Range);
X = TempRes.X;
PRS.LineAscent = TempRes.LineAscent;
X = this.Internal_Recalculate_Numbering(Item, PRS.Paragraph, ParaPr, X, PRS.LineAscent, PRS.Page, PRS.Line, PRS.Range);
}
switch (ItemType)
......@@ -186612,8 +186625,6 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
// Отмечаем, что началось слово
StartWord = true;
UpdateLineMetricsText = true;
// При проверке, убирается ли слово, мы должны учитывать ширину предшествующих пробелов.
var LetterLen = Item.Width / TEXTWIDTH_DIVIDER;//var LetterLen = Item.Get_Width();
......@@ -186773,7 +186784,6 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
{
MoveToLBP = true;
NewRange = true;
UpdateLineMetricsText = true;
if(bCurrWord == false)
{
......@@ -186826,21 +186836,6 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
}
else
{
// Обновим метрики строки
if (linerule_Exact === LineRule)
{
if (PRS.LineAscent < Item.Height)
PRS.LineAscent = Item.Height;
}
else
{
if (PRS.LineAscent < Item.Height + this.YOffset)
PRS.LineAscent = Item.Height + this.YOffset;
if (PRS.LineDescent < -this.YOffset)
PRS.LineDescent = -this.YOffset;
}
// Добавляем длину пробелов до автофигуры
X += SpaceLen + DrawingWidth;
......@@ -186937,8 +186932,6 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
if (true === StartWord)
FirstItemOnLine = false;
UpdateLineMetricsText = true;
var PageNumWidth = Item.Get_Width();
if (X + SpaceLen + PageNumWidth > XEnd && ( false === FirstItemOnLine || false === Para.Internal_Check_Ranges(ParaLine, ParaRange) ))
{
......@@ -187121,38 +187114,6 @@ ParaRun.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
this.ParaMath.UpdateMaxWidthLine(PRS, WidthLine);
}
if ( true === UpdateLineMetricsText )
{
// Пересчитаем метрику строки относительно размера данного текста
if ( PRS.LineTextAscent < this.TextAscent )
PRS.LineTextAscent = this.TextAscent;
if ( PRS.LineTextAscent2 < this.TextAscent2 )
PRS.LineTextAscent2 = this.TextAscent2;
if ( PRS.LineTextDescent < this.TextDescent )
PRS.LineTextDescent = this.TextDescent;
if ( linerule_Exact === LineRule )
{
// Смещение не учитывается в метриках строки, когда расстояние между строк точное
if ( PRS.LineAscent < this.TextAscent )
PRS.LineAscent = this.TextAscent;
if ( PRS.LineDescent < this.TextDescent )
PRS.LineDescent = this.TextDescent;
}
else
{
if ( PRS.LineAscent < this.TextAscent + this.YOffset )
PRS.LineAscent = this.TextAscent + this.YOffset;
if ( PRS.LineDescent < this.TextDescent - this.YOffset )
PRS.LineDescent = this.TextDescent - this.YOffset;
}
}
PRS.MoveToLBP = MoveToLBP;
PRS.NewRange = NewRange;
PRS.ForceNewPage = ForceNewPage;
......@@ -187192,6 +187153,109 @@ ParaRun.prototype.Recalculate_Set_RangeEndPos = function(PRS, PRP, Depth)
this.protected_FillRangeEndPos(CurLine, CurRange, CurPos);
};
ParaRun.prototype.Recalculate_LineMetrics = function(PRS, ParaPr, _CurLine, _CurRange)
{
var Para = PRS.Paragraph;
// Если заданный отрезок пустой, тогда мы не должны учитывать метрики данного рана.
var CurLine = _CurLine - this.StartLine;
var CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
var StartPos = this.protected_GetRangeStartPos(CurLine, CurRange);
var EndPos = this.protected_GetRangeEndPos(CurLine, CurRange);
var UpdateLineMetricsText = false;
var LineRule = ParaPr.Spacing.LineRule;
for (var CurPos = StartPos; CurPos < EndPos; CurPos++)
{
var Item = this.Content[CurPos];
if (Item === Para.Numbering.Item)
{
PRS.LineAscent = Para.Numbering.LineAscent;
}
switch (Item.Type)
{
case para_Sym:
case para_Text:
case para_Math_Text:
case para_Math_Placeholder:
case para_Math_BreakOperator:
case para_PageNum:
{
UpdateLineMetricsText = true;
break;
}
case para_Space:
{
break;
}
case para_Drawing:
{
if (true === Item.Is_Inline() || true === Para.Parent.Is_DrawingShape())
{
// Обновим метрики строки
if (linerule_Exact === LineRule)
{
if (PRS.LineAscent < Item.Height)
PRS.LineAscent = Item.Height;
}
else
{
if (PRS.LineAscent < Item.Height + this.YOffset)
PRS.LineAscent = Item.Height + this.YOffset;
if (PRS.LineDescent < -this.YOffset)
PRS.LineDescent = -this.YOffset;
}
}
break;
}
case para_End:
{
// TODO: Тут можно сделать проверку на пустую строку.
break;
}
}
}
if ( true === UpdateLineMetricsText )
{
// Пересчитаем метрику строки относительно размера данного текста
if ( PRS.LineTextAscent < this.TextAscent )
PRS.LineTextAscent = this.TextAscent;
if ( PRS.LineTextAscent2 < this.TextAscent2 )
PRS.LineTextAscent2 = this.TextAscent2;
if ( PRS.LineTextDescent < this.TextDescent )
PRS.LineTextDescent = this.TextDescent;
if ( linerule_Exact === LineRule )
{
// Смещение не учитывается в метриках строки, когда расстояние между строк точное
if ( PRS.LineAscent < this.TextAscent )
PRS.LineAscent = this.TextAscent;
if ( PRS.LineDescent < this.TextDescent )
PRS.LineDescent = this.TextDescent;
}
else
{
if ( PRS.LineAscent < this.TextAscent + this.YOffset )
PRS.LineAscent = this.TextAscent + this.YOffset;
if ( PRS.LineDescent < this.TextDescent - this.YOffset )
PRS.LineDescent = this.TextDescent - this.YOffset;
}
}
};
ParaRun.prototype.Recalculate_Range_Width = function(PRSC, _CurLine, _CurRange)
{
var CurLine = _CurLine - this.StartLine;
......@@ -187447,7 +187511,7 @@ ParaRun.prototype.Recalculate_Range_Spaces = function(PRSA, _CurLine, _CurRange,
if ( true === Item.Is_Inline() || true === Para.Parent.Is_DrawingShape() )
{
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y , Para.Get_StartPage_Absolute() + CurPage, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin );
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y , Para.Get_StartPage_Absolute() + CurPage, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin, _CurLine);
Item.Reset_SavedPosition();
PRSA.X += Item.WidthVisible;
......@@ -187470,7 +187534,7 @@ ParaRun.prototype.Recalculate_Range_Spaces = function(PRSA, _CurLine, _CurRange,
var oRecalcObj = Item.Save_RecalculateObject();
var Page_abs = Para.Get_StartPage_Absolute() + CurPage;
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y , Page_abs, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin);
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y , Page_abs, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin, _CurLine);
if (Math.abs(Item.X - oRecalcObj.X) > 0.001 || Math.abs(Item.Y - oRecalcObj.Y) > 0.001 || Item.PageNum !== oRecalcObj.PageNum)
{
......@@ -187495,7 +187559,7 @@ ParaRun.prototype.Recalculate_Range_Spaces = function(PRSA, _CurLine, _CurRange,
if ( true === LDRecalcInfo.Can_RecalcObject() )
{
// Обновляем позицию объекта
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y , Page_abs, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin);
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y , Page_abs, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin, _CurLine);
LDRecalcInfo.Set_FlowObject( Item, 0, recalcresult_NextElement, -1 );
if (0 === PRSA.CurPage && Item.wrappingPolygon.top > PRSA.PageY + 0.001)
......@@ -187525,7 +187589,7 @@ ParaRun.prototype.Recalculate_Range_Spaces = function(PRSA, _CurLine, _CurRange,
// мы пересчитываем заново текущую страницу, а не предыдущую
// Обновляем позицию объекта
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y, Page_abs, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin);
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y, Page_abs, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin, _CurLine);
LDRecalcInfo.Set_FlowObject( Item, 0, recalcresult_NextElement, -1 );
LDRecalcInfo.Set_PageBreakBefore( false );
......@@ -187550,7 +187614,7 @@ ParaRun.prototype.Recalculate_Range_Spaces = function(PRSA, _CurLine, _CurRange,
else
{
// Картинка ложится на или под текст, в данном случае пересчет можно спокойно продолжать
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y , Para.Get_StartPage_Absolute() + CurPage, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin);
Item.Update_Position(PRSA.Paragraph, new CParagraphLayout( PRSA.X, PRSA.Y , Para.Get_StartPage_Absolute() + CurPage, PRSA.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, Para.Pages[CurPage].Y + Para.Lines[CurLine].Y - Para.Lines[CurLine].Metrics.Ascent, Para.Pages[CurPage].Y), PageLimits, PageLimitsOrigin, _CurLine);
Item.Reset_SavedPosition();
}
}
......@@ -187765,38 +187829,9 @@ ParaRun.prototype.Internal_Recalculate_Numbering = function(Item, Para, ParaPr,
NumberingItem.Line = CurLine;
NumberingItem.Range = CurRange;
NumberingItem.LineAscent = LineAscent;
return { X : X, LineAscent : LineAscent };
};
ParaRun.prototype.Internal_Recalculate_LineMetrics = function(PRS, SpacingLineRule)
{
if ( PRS.LineTextAscent < this.TextAscent )
PRS.LineTextAscent = this.TextAscent;
if ( PRS.LineTextAscent2 < this.TextAscent2 )
PRS.LineTextAscent2 = this.TextAscent2;
if ( PRS.LineTextDescent < this.TextDescent )
PRS.LineTextDescent = this.TextDescent;
if ( linerule_Exact === SpacingLineRule )
{
// Смещение не учитывается в метриках строки, когда расстояние между строк точное
if ( PRS.LineAscent < this.TextAscent )
PRS.LineAscent = this.TextAscent;
if ( PRS.LineDescent < this.TextDescent )
PRS.LineDescent = this.TextDescent;
}
else
{
if ( PRS.LineAscent < this.TextAscent + this.YOffset )
PRS.LineAscent = this.TextAscent + this.YOffset;
if ( PRS.LineDescent < this.TextDescent - this.YOffset )
PRS.LineDescent = this.TextDescent - this.YOffset;
}
return X;
};
ParaRun.prototype.Internal_Recalculate_LastTab = function(LastTab, X, XEnd, Word, WordLen, SpaceLen)
......@@ -194405,6 +194440,10 @@ ParaMath.prototype.Recalculate_Reset = function(CurRange, CurLine)
ParaMath.prototype.Recalculate_Set_RangeEndPos = function(PRS, PRP, Depth)
{
this.Root.Recalculate_Set_RangeEndPos(PRS, PRP, Depth);
};
ParaMath.prototype.Recalculate_LineMetrics = function(PRS, ParaPr, _CurLine, _CurRange)
{
};
ParaMath.prototype.Recalculate_Range_Width = function(PRSC, _CurLine, _CurRange)
{
......@@ -210682,6 +210721,22 @@ Paragraph.prototype.private_RecalculateLineInfo = function(CurLine, CurPa
Paragraph.prototype.private_RecalculateLineMetrics = function(CurLine, CurPage, PRS, ParaPr)
{
var Line = this.Lines[CurLine];
var RangesCount = Line.Ranges.length;
for (var CurRange = 0; CurRange < RangesCount; CurRange++)
{
var Range = Line.Ranges[CurRange];
var StartPos = Range.StartPos;
var EndPos = Range.EndPos;
for (var Pos = StartPos; Pos <= EndPos; Pos++)
{
this.Content[Pos].Recalculate_LineMetrics(PRS, ParaPr, CurLine, CurRange);
}
}
// Строка пустая, у нее надо выставить ненулевую высоту. Делаем как Word, выставляем высоту по размеру
// текста, на котором закончилась данная строка.
if ( true === PRS.EmptyLine || PRS.LineAscent < 0.001 )
......@@ -211131,10 +211186,31 @@ Paragraph.prototype.private_RecalculateLineEnd = function(CurLine, CurPa
if ( this.Parent instanceof CDocument && true === this.Parent.RecalcInfo.Can_RecalcObject() && 0 === BreakPagePrevLine && ( 1 === CurPage && null != this.Get_DocumentPrev() ) && this.Lines[CurLine - 1].Ranges.length <= 1 )
{
// Вызываем данную функцию для удаления картинок с предыдущей страницы
this.Recalculate_Drawing_AddPageBreak(0, 0, true);
var bBreakPageFromStart = false;
for (var Index = 0, Count = this.Pages[CurPage - 1].Drawings.length; Index < Count; Index++)
{
var Drawing = this.Pages[CurPage - 1].Drawings[Index];
var DrawingLine = Drawing.LineNum;
if (DrawingLine >= CurLine - 1)
{
bBreakPageFromStart = true;
break;
}
}
// Если в строках, которые мы переносим есть картинки, либо, если у нас в параграфе 3 строки,
// тогда сразу начинаем параграф с новой строки
if (true === bBreakPageFromStart || CurLine <= 2)
{
CurLine = 0;
// Вызываем данную функцию для удаления картинок с предыдущей страницы
this.Recalculate_Drawing_AddPageBreak(0, 0, true);
}
else
CurLine = CurLine - 1;
this.Parent.RecalcInfo.Set_WidowControl(this, ( CurLine > 2 ? CurLine - 1 : 0 ) ); // Если у нас в параграфе 3 строки, тогда сразу начинаем параграф с новой строки
this.Parent.RecalcInfo.Set_WidowControl(this, CurLine);
PRS.RecalcResult = recalcresult_PrevPage;
return false;
}
......@@ -220005,7 +220081,7 @@ CDocument.prototype =
var SectElement = this.SectionsInfo.Get_SectPr( StartIndex );
var OldPage = ( undefined !== this.Pages[PageIndex] ? this.Pages[PageIndex] : null );
if ( true === bStart )
{
this.Pages[PageIndex] = new CDocumentPage();
......@@ -231622,7 +231698,7 @@ CDocument.prototype =
if ( false === Pos )
continue;
Pos = Math.min(Pos, this.Content.length - 1);
//Pos = Math.min(Pos, this.Content.length - 1);
this.Content.splice(Pos, 1);
......@@ -314084,12 +314160,16 @@ CFraction.prototype.draw = function(x, y, pGraphics, PDSE)
}
CFraction.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
if(this.Pr.type == BAR_FRACTION || this.Pr.type == NO_BAR_FRACTION)
this.drawBarFraction(PDSE);
else if(this.Pr.type == SKEWED_FRACTION)
this.drawSkewedFraction(PDSE);
else if(this.Pr.type == LINEAR_FRACTION)
this.drawLinearFraction(PDSE);
PDSE.X = X + this.size.width;
}
CFraction.prototype.drawBarFraction = function(PDSE)
{
......@@ -317180,9 +317260,9 @@ CNaryOperator.prototype.Draw_Elements = function(PDSE)
if(this.Type == para_Math_Text)
this.drawTextElem(PosLine.x, PosLine.y, PDSE.Graphics);
else
this.drawGlyph(PosLine.x, PosLine.y, PDSE.Graphics);
this.drawGlyph(PosLine.x, PosLine.y, PDSE.Graphics, PDSE);
}
CNaryOperator.prototype.drawGlyph = function(x, y, pGraphics)
CNaryOperator.prototype.drawGlyph = function(x, y, pGraphics, PDSE)
{
var coord = this.getCoord();
......@@ -318432,7 +318512,7 @@ function CContourIntegral()
CNaryOperator.call(this);
}
Asc.extendClass(CContourIntegral, CNaryOperator);
CContourIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
CContourIntegral.prototype.drawGlyph = function(x, y, pGraphics, PDSE)
{
var circle = new CCircle();
var coord = circle.getCoord();
......@@ -318518,7 +318598,7 @@ function CSurfaceIntegral()
CNaryOperator.call(this);
}
Asc.extendClass(CSurfaceIntegral, CNaryOperator);
CSurfaceIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
CSurfaceIntegral.prototype.drawGlyph = function(x, y, pGraphics, PDSE)
{
var surf = new CSurface();
var coord = surf.getCoord();
......@@ -318603,7 +318683,7 @@ function CVolumeIntegral()
CNaryOperator.call(this);
}
Asc.extendClass(CVolumeIntegral, CNaryOperator);
CVolumeIntegral.prototype.draw = function(x, y, pGraphics, PDSE)
CVolumeIntegral.prototype.drawGlyph = function(x, y, pGraphics, PDSE)
{
var volume = new CVolume();
var coord = volume.getCoord();
......@@ -319321,10 +319401,14 @@ CRadical.prototype.setPosition = function(pos, PDSE)
}
CRadical.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
var PosLine = this.ParaMath.GetLinePosition(PDSE.Line);
this.signRadical.draw(PosLine.x, PosLine.y, PDSE.Graphics, PDSE);
CRadical.superclass.Draw_Elements.call(this, PDSE);
PDSE.X = X + this.size.width;
}
CRadical.prototype.getBase = function()
{
......@@ -323179,6 +323263,8 @@ CDelimiter.prototype.setPosition = function(position, PDSE)
}
CDelimiter.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
var PosLine = this.ParaMath.GetLinePosition(PDSE.Line);
this.begOper.draw(PosLine.x, PosLine.y, PDSE.Graphics, PDSE);
......@@ -323187,6 +323273,8 @@ CDelimiter.prototype.Draw_Elements = function(PDSE)
for(var j = 0; j < this.nCol; j++)
this.elements[0][j].Draw_Elements(PDSE);
PDSE.X = X + this.size.width;
}
CDelimiter.prototype.align_2 = function(element)
{
......@@ -323319,6 +323407,8 @@ CCharacter.prototype.setPosition = function(pos, PDSE)
}
CCharacter.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
this.Content[0].Draw_Elements(PDSE);
var ctrPrp = this.Get_TxtPrControlLetter();
......@@ -323338,6 +323428,7 @@ CCharacter.prototype.Draw_Elements = function(PDSE)
this.operator.draw(PosLine.x, PosLine.y, PDSE.Graphics, PDSE);
PDSE.X = X + this.size.width;
}
CCharacter.prototype.getBase = function()
{
......@@ -323717,11 +323808,11 @@ CAccentDoubleLine.prototype.calcSize = function(stretch)
var Line = new CMathText(true);
Line.add(0x305);
Line.Resize(g_oTextMeasurer);
Line.Measure(g_oTextMeasurer);
var DoubleLine = new CMathText(true);
DoubleLine.add(0x33F);
DoubleLine.Resize(g_oTextMeasurer);
DoubleLine.Measure(g_oTextMeasurer);
this.diff = DoubleLine.size.ascent - Line.size.ascent;
......@@ -324146,6 +324237,8 @@ CAccent.prototype.draw = function(x, y, pGraphics, PDSE)
};
CAccent.prototype.Draw_Elements = function(PDSE)
{
var X = PDSE.X;
var oBase = this.Content[0];
oBase.Draw_Elements(PDSE);
......@@ -324167,6 +324260,8 @@ CAccent.prototype.Draw_Elements = function(PDSE)
}
this.operator.draw(x, y, PDSE.Graphics, PDSE);
PDSE.X = X + this.size.width;
};
CAccent.prototype.GetLastElement = function()
{
......@@ -324383,6 +324478,8 @@ CBorderBox.prototype.recalculateSize = function()
}
CBorderBox.prototype.Draw_Elements = function(PDSE)
{
var _X = PDSE.X;
this.Content[0].Draw_Elements(PDSE);
var penW = this.Get_TxtPrControlLetter().FontSize*0.02;
......@@ -324395,10 +324492,6 @@ CBorderBox.prototype.Draw_Elements = function(PDSE)
var X = this.pos.x + PosLine.x + this.GapLeft,
Y = this.pos.y + PosLine.y;
/*var X = this.pos.x + PDSE.X + this.GapLeft,
Y = this.pos.y + PDSE.Y;*/
this.Make_ShdColor(PDSE, this.Get_CompiledCtrPrp());
if(!this.Pr.hideTop)
......@@ -324538,6 +324631,8 @@ CBorderBox.prototype.Draw_Elements = function(PDSE)
PDSE.Graphics.drawVerLine(0, x1, y1, y2, penW);
}
PDSE.X = _X + this.size.width;
}
CBorderBox.prototype.setPosition = function(pos, PDSE)
{
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