本文整理汇总了C#中Nodes.Node.NotBlack方法的典型用法代码示例。如果您正苦于以下问题:C# Node.NotBlack方法的具体用法?C# Node.NotBlack怎么用?C# Node.NotBlack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Nodes.Node
的用法示例。
在下文中一共展示了Node.NotBlack方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public override void Draw(Node node, PaintMode printMode, Color color)
{
if ((printMode == PaintMode.BACKGROUND))
{
if (node.isVisible)
{
base.painter_.FillRectangle(node);
}
}
else if ((printMode == PaintMode.FOREGROUND))
{
if ((node.isVisible && (node.literalText != null)) && (node.literalText.Length > 0))
{
if (node.NotBlack())
{
color = node.style_.color;
}
base.painter_.DrawString(node, node.style_, color);
}
}
}
示例2: Draw
public override void Draw(Node tableNode, PaintMode printMode, Color color)
{
if ((printMode == PaintMode.BACKGROUND))
{
base.painter_.FillRectangle(tableNode);
}
else
{
if (tableNode.NotBlack())
{
color = tableNode.style_.color;
}
if (this.table.frame == TableLineStyle.SOLID)
{
tableNode.box.Width = this.table.totalHorzFrameSpacing;
base.painter_.Rectangle(tableNode, color);
tableNode.box.Width = this.table.totalWidth;
}
else if (this.table.frame == TableLineStyle.DASHED)
{
tableNode.box.Width = this.table.totalHorzFrameSpacing;
base.painter_.DrawNodeRect(tableNode, color);
tableNode.box.Width = this.table.totalWidth;
}
for (int i = 0; i < this.table.RowCount; i++)
{
MRow row = this.table.GetRow(i);
for (int j = 0; j < row.Count; j++)
{
MCell cell = (MCell) row.cells[j];
int rspan = 0;
int colSpan = 0;
rspan = (i + cell.rowSpan) - 1;
colSpan = cell.colSpan;
if (rspan < (this.table.RowCount - 1))
{
int x1 = 0;
int x2 = 0;
int y1 = 0;
if (colSpan == 0)
{
x1 = base.rect.x;
}
else
{
x1 = (base.rect.x + this.table.spanBases[colSpan]) - (this.table.spanWidth[colSpan - 1] / 2);
}
if (colSpan == (this.table.ColCount - 1))
{
x2 = base.rect.x + this.table.totalHorzFrameSpacing;
}
else
{
x2 = ((base.rect.x + this.table.spanBases[(colSpan + cell.columnSpan) - 1]) + this.table.spanHeight[(colSpan + cell.columnSpan) - 1]) + (this.table.spanWidth[(colSpan + cell.columnSpan) - 1] / 2);
}
y1 = (row.node.box.Y + this.table.rowspanWidth(i, cell.rowSpan)) + (this.table.spacingWidth[rspan] / 2);
if (row.lines == TableLineStyle.SOLID)
{
base.painter_.DrawLine(x1, y1, x2, y1, color);
}
else if (row.lines == TableLineStyle.DASHED)
{
base.painter_.DrawDashLine(x1, y1, x2, y1, color);
}
}
}
}
for (int i = 0; i < this.table.RowCount; i++)
{
MRow row = this.table.GetRow(i);
for (int j = 0; j < row.Count; j++)
{
MCell cell = (MCell) row.cells[j];
int cspn = (cell.colSpan + cell.columnSpan) - 1;
if (cspn < (this.table.ColCount - 1))
{
int x1 = 0;
int y1 = 0;
int y2 = 0;
int hh = 0;
for (int k = 0; k < cell.rowSpan; k++)
{
MRow rrow = this.table.GetRow(i + k);
hh += rrow.node.box.Height;
if (k < (cell.rowSpan - 1))
{
hh += this.table.spacingWidth[i + k];
}
}
x1 = ((base.rect.x + this.table.spanBases[cspn]) + this.table.spanHeight[cspn]) + (this.table.spanWidth[cspn] / 2);
if (i == 0)
{
y1 = base.rect.y;
}
else
{
y1 = row.node.box.Y - (this.table.spacingWidth[i - 1] / 2);
}
if ((i + (cell.rowSpan - 1)) == (this.table.RowCount - 1))
{
//.........这里部分代码省略.........
示例3: Draw
public override void Draw(Node node, PaintMode printMode, Color color)
{
if ((printMode == PaintMode.BACKGROUND))
{
base.painter_.FillRectangle(node);
}
else if ((printMode == PaintMode.FOREGROUND))
{
int x1 = 0;
int y1 = 0;
int x2 = 0;
int y2 = 0;
int xx2 = 0;
int yy2 = 0;
if ((printMode == PaintMode.BACKGROUND))
{
base.painter_.FillRectangle(node);
}
else if ((printMode == PaintMode.FOREGROUND))
{
Point[] points;
if (node.NotBlack())
{
color = node.style_.color;
}
if (this.lineThick_ > 1)
{
x1 = (((base.rect.x) + this.flineThick_) - this.dlineThick_) + 1;
y1 = base.rect.y + (base.rect.height / 2);
x2 = (base.rect.x) + this.elineThick_;
y2 = base.rect.y + base.rect.height;
xx2 = (((base.rect.x ) + this.twlineThick_) + this.lineThick_) - 1;
yy2 = ((base.rect.y + this.lthick2_) + this.lineThick_) - 1;
double diff1 = this.diff(x1, y1, this.aspect(x1, y1, x2, y2));
double d = this.aspect(x2, y2, xx2, yy2);
double diff2 = this.diff(x2, y2, d);
int num11 = 0;
int num12 = 0;
double num13 = 0;
double num14 = 0;
num13 = (diff2 - diff1) / (this.aspect(x1, y1, x2, y2) - d);
num14 = (num13 * this.aspect(x1, y1, x2, y2)) + diff1;
num11 = Convert.ToInt32(Math.Round(num13));
num12 = Convert.ToInt32(Math.Round(num14));
Point point9 = new Point(x1, (y1 + this.lineThick_) - 1);
Point point8 = new Point(num11, num12);
diff1 = this.diff((x1 + this.dlineThick_) - 1, y1, this.aspect(x1, y1, x2, y2));
diff2 = this.diff((base.rect.x ) + this.twlineThick_, base.rect.y + this.lthick2_, d);
num13 = (diff2 - diff1) / (this.aspect(x1, y1, x2, y2) - d);
num14 = (num13 * this.aspect(x1, y1, x2, y2)) + diff1;
num11 = Convert.ToInt32(Math.Round(num13));
num12 = Convert.ToInt32(Math.Round(num14));
Point point3 = new Point(num11, num12);
Point point2 = new Point((x1 + this.dlineThick_) - 1, y1);
Point point10 = new Point(base.rect.x, ((base.rect.y + (base.rect.height / 2)) + this.lineThick_) - 1);
Point point11 = new Point(base.rect.x, base.rect.y + (base.rect.height / 2));
Point point1 = new Point(base.rect.x, base.rect.y + (base.rect.height / 2));
Point point4 = new Point((base.rect.x) + this.twlineThick_, base.rect.y + this.lthick2_);
Point point7 = new Point(((base.rect.x) + this.twlineThick_) + this.lineThick_, ((base.rect.y + this.lthick2_) + this.lineThick_) - 1);
Point point5 = new Point((base.rect.x + base.rect.width) - this.spaceHeight_, base.rect.y + this.lthick2_);
Point point6 = new Point((base.rect.x + base.rect.width) - this.spaceHeight_, ((base.rect.y + this.lthick2_) + this.lineThick_) - 1);
points = new Point[] { point1, point2, point3, point4, point5, point6, point7, point8, point9, point10, point11 };
Point[] pointArray1 = points;
base.painter_.Polyline(pointArray1, color);
}
else
{
base.painter_.DrawLine(base.rect.x, base.rect.y + (base.rect.height / 2), ((base.rect.x ) + this.flineThick_) - 1, base.rect.y + (base.rect.height / 2), color);
x1 = (((base.rect.x ) + this.flineThick_) - this.dlineThick_) + 1;
y1 = base.rect.y + (base.rect.height / 2);
x2 = (base.rect.x ) + this.elineThick_;
y2 = base.rect.y + base.rect.height;
xx2 = (base.rect.x ) + this.twlineThick_;
yy2 = base.rect.y + this.lthick2_;
double num15 = this.aspect(x1, y1, x2, y2);
double num16 = this.diff(x1, y1, num15);
double num17 = this.aspect(x2, y2, xx2, yy2);
double num18 = this.diff(x2, y2, num17);
int num19 = 0;
int num20 = 0;
double num21 = 0;
double num22 = 0;
num21 = (num18 - num16) / (num15 - num17);
num22 = (num21 * num15) + num16;
num19 = Convert.ToInt32(Math.Round(num21));
num20 = Convert.ToInt32(Math.Round(num22));
Point point12 = new Point(x1, y1);
Point point16 = new Point(x1, y1);
Point point15 = new Point(num19, num20);
num16 = this.diff((x1 + this.dlineThick_) - 1, y1, num15);
num21 = (num18 - num16) / (num15 - num17);
num22 = (num21 * num15) + num16;
num19 = Convert.ToInt32(Math.Round(num21));
num20 = Convert.ToInt32(Math.Round(num22));
Point point14 = new Point(num19, num20);
Point point13 = new Point((base.rect.x ) + this.flineThick_, y1);
points = new Point[] { point12, point13, point14, point15, point16 };
base.painter_.Polyline(points, color);
base.painter_.DrawLine((base.rect.x ) + this.elineThick_, base.rect.y + base.rect.height, (base.rect.x) + this.twlineThick_, base.rect.y + this.lthick2_, color);
base.painter_.DrawLine((base.rect.x ) + this.twlineThick_, base.rect.y + this.lthick2_, (base.rect.x + base.rect.width) - this.spaceHeight_, base.rect.y + this.lthick2_, color);
//.........这里部分代码省略.........
示例4: Draw
public override void Draw(Node node, PaintMode printMode, Color color)
{
this.isBracketed = false;
if ((printMode == PaintMode.BACKGROUND))
{
base.painter_.FillRectangle(node);
}
else if ((printMode == PaintMode.FOREGROUND))
{
int x = node.box.X;
int width = node.box.Width;
node.box.X = x + this.lspace;
node.box.Width = (width - this.lspace) - this.rspace;
try
{
if (node.NotBlack())
{
color = node.style_.color;
}
if (base.painter_.IsStretchy(node))
{
if (base.painter_.DrawBracketed(node, color))
{
this.isBracketed = true;
}
}
else if ((node.literalText != null) && (node.literalText.Length > 0))
{
base.painter_.DrawString(node, node.style_, color);
}
}
catch
{
}
node.box.X = x;
node.box.Width = width;
}
}
示例5: DrawQuote
public void DrawQuote(Node node, int x, int y, string text, int scriptLevel, StyleAttributes styleAttributes, Color color)
{
try
{
Brush brush;
int width = 0;
text = text.Replace("&", "&");
text = text.Replace(""", "\"");
text = text.Replace("'", "'");
text = text.Replace(">", ">");
text = text.Replace("<", "<");
if (styleAttributes != null)
{
if (node.NotBlack() || (((node.type_.type == ElementType.Entity) && (node.parent_ != null)) && node.parent_.NotBlack()))
{
brush = new SolidBrush(styleAttributes.color);
}
else
{
brush = new SolidBrush(color);
}
}
else if (color != Color.Black)
{
brush = new SolidBrush(color);
}
else
{
brush = this.blackBrush;
}
if (text == null)
{
return;
}
int len = text.Length;
for (int i = 0; i < len; i++)
{
if (char.IsLetterOrDigit(text[i]) || char.IsPunctuation(text[i]))
{
string s = "" + text[i];
PointF point = new PointF((float) ((this.oX + x) + width), (float) (this.oY + y));
this.graphics_.DrawString(s, this.GetSuitableFont(node, styleAttributes), brush, point, this.typographicsFormat);
width += this.MeasureWidth(node, styleAttributes, s);
}
else
{
string s = Convert.ToString(Convert.ToInt32(text[i]), 0x10).ToUpper();
s = s.PadLeft(5, '0');
Glyph glyph = this.entityManager.ByUnicode(s);
if (glyph != null)
{
node.glyph = glyph;
System.Drawing.Font f = this.MakeGlyphFont(node, scriptLevel, styleAttributes);
if (f != null)
{
PointF point = new PointF((float) ((this.oX + x) + width), (float) (this.oY + y));
string gs = "" + glyph.CharValue;
if (color == Color.Black)
{
this.graphics_.DrawString(gs, f, brush, point, this.typographicsFormat);
}
else
{
this.graphics_.DrawString(gs, f, new SolidBrush(color), point, this.typographicsFormat);
}
width += this.MeasureWidth(node, styleAttributes, gs);
}
node.glyph = null;
}
}
}
}
catch
{
}
}
示例6: Draw
public override void Draw(Node node, PaintMode printMode, Color color)
{
if ((printMode == PaintMode.BACKGROUND))
{
base.painter_.FillRectangle(node);
}
else if ((printMode == PaintMode.FOREGROUND))
{
try
{
if (node.NotBlack())
{
color = node.style_.color;
}
}
catch
{
}
if ((this.attrs != null) && this.isBevelled)
{
for (int i = 0; i < this.thick; i++)
{
base.painter_.DrawLine((((base.rect.x + this.beveledFirstWidth) + this.lineThick) + i) + (this.width / 4), (base.rect.y + base.rect.height) - (3 * this.lineThick), (((((base.rect.x + base.rect.width) - this.beveledWidth) - this.lineThick) - this.thick) + i) - (this.width / 4), base.rect.y + (3 * this.lineThick), 1, color);
}
}
else
{
base.painter_.DrawLine(base.rect.x + (this.width / 4), base.rect.y + this.totalH, (base.rect.x + base.rect.width) - (this.width / 4), base.rect.y + this.totalH, this.thick, color);
}
}
}
示例7: DrawForeground
private void DrawForeground(Color color, Node node)
{
int x1 = 0;
int y1 = 0;
int x2 = 0;
int y2 = 0;
int num5 = 0;
int num6 = 0;
Point[] pointArray3;
if (node.NotBlack())
{
color = node.style_.color;
}
if (this.lineThickness > 1)
{
x1 = ((((base.rect.x + this.lspace_) + this.w_) + this.ddThick_) -
this.doubleLineThickness) + 1;
y1 = base.rect.y + (this.h_ + (this.totalThick_/2));
x2 = ((base.rect.x + this.lspace_) + this.w_) + this.ddThick2_;
y2 = base.rect.y + base.rect.height;
num5 = ((((base.rect.x + this.lspace_) + this.w_) + this.ddThick3_) +
this.lineThickness) - 1;
num6 = (((base.rect.y + this.h_) + this.lthick_) + this.lineThickness) - 1;
double num7 = this.aspect(x1, y1, x2, y2);
double num8 = this.diff(x1, y1, num7);
double num9 = this.aspect(x2, y2, num5, num6);
double num10 = this.diff(x2, y2, num9);
int num11 = 0;
int num12 = 0;
double num13 = 0;
double num14 = 0;
num13 = (num10 - num8)/(num7 - num9);
num14 = (num13*num7) + num8;
num11 = Convert.ToInt32(Math.Round(num13));
num12 = Convert.ToInt32(Math.Round(num14));
Point point9 = new Point(x1, (y1 + this.lineThickness) - 1);
Point point8 = new Point(num11, num12);
num8 = this.diff((x1 + this.doubleLineThickness) - 1, y1, num7);
num10 =
this.diff(((base.rect.x + this.lspace_) + this.w_) + this.ddThick3_,
(base.rect.y + this.h_) + this.lthick_, num9);
num13 = (num10 - num8)/(num7 - num9);
num14 = (num13*num7) + num8;
num11 = Convert.ToInt32(Math.Round(num13));
num12 = Convert.ToInt32(Math.Round(num14));
Point point3 = new Point(num11, num12);
Point point2 = new Point((x1 + this.doubleLineThickness) - 1, y1);
Point point10 =
new Point((base.rect.x + this.lspace_) + this.w_,
(((base.rect.y + this.h_) + (this.totalThick_/2)) + this.lineThickness) - 1);
Point point11 =
new Point((base.rect.x + this.lspace_) + this.w_,
(base.rect.y + this.h_) + (this.totalThick_/2));
Point point1 =
new Point((base.rect.x + this.lspace_) + this.w_,
(base.rect.y + this.h_) + (this.totalThick_/2));
Point point4 =
new Point(((base.rect.x + this.lspace_) + this.w_) + this.ddThick3_,
(base.rect.y + this.h_) + this.lthick_);
Point point7 =
new Point(
(((base.rect.x + this.lspace_) + this.w_) + this.ddThick3_) +
this.lineThickness,
(((base.rect.y + this.h_) + this.lthick_) + this.lineThickness) - 1);
Point point5 =
new Point((base.rect.x + base.rect.width) - this.rspace_,
(base.rect.y + this.h_) + this.lthick_);
Point point6 =
new Point((base.rect.x + base.rect.width) - this.rspace_,
(((base.rect.y + this.h_) + this.lthick_) + this.lineThickness) - 1);
pointArray3 =
new Point[]
{point1, point2, point3, point4, point5, point6, point7, point8, point9, point10, point11};
Point[] pointArray1 = pointArray3;
base.painter_.Polyline(pointArray1, color);
}
else
{
base.painter_.DrawLine((base.rect.x + this.lspace_) + this.w_,
(base.rect.y + this.h_) + (this.totalThick_/2),
(((base.rect.x + this.lspace_) + this.w_) + this.ddThick_) -
1, (base.rect.y + this.h_) + (this.totalThick_/2), color);
x1 = ((((base.rect.x + this.lspace_) + this.w_) + this.ddThick_) -
this.doubleLineThickness) + 1;
y1 = (base.rect.y + this.h_) + (this.totalThick_/2);
x2 = ((base.rect.x + this.lspace_) + this.w_) + this.ddThick2_;
y2 = (base.rect.y + this.h_) + this.totalThick_;
num5 = ((base.rect.x + this.lspace_) + this.w_) + this.ddThick3_;
num6 = (base.rect.y + this.h_) + this.lthick_;
double num15 = this.aspect(x1, y1, x2, y2);
double num16 = this.diff(x1, y1, num15);
double num17 = this.aspect(x2, y2, num5, num6);
double num18 = this.diff(x2, y2, num17);
int num19 = 0;
int num20 = 0;
double num21 = 0;
double num22 = 0;
//.........这里部分代码省略.........
示例8: DrawString
public void DrawString(Node node, StyleAttributes styleAttributes, int x, int y, int dx, int dy, string text, Color color)
{
Brush brush1;
if (styleAttributes != null)
{
if (node.NotBlack() || (((node.type_.type == ElementType.Entity) && (node.parent_ != null)) && node.parent_.NotBlack()))
{
brush1 = new SolidBrush(styleAttributes.color);
}
else
{
brush1 = new SolidBrush(color);
}
}
else if (color != Color.Black)
{
brush1 = new SolidBrush(color);
}
else
{
brush1 = this.blackBrush;
}
System.Drawing.Font font1 = this.GetSuitableFont(node, styleAttributes);
PointF tf1 = new PointF((float) ((this.oX + x) + dx), (float) ((this.oY + y) + dy));
if (((node.glyph != null) && node.glyph.IsVisible) && ((node.glyph.Category.Name != "Spaces") && (node.glyph.FontFamily.Length == 0)))
{
brush1 = new SolidBrush(Color.Red);
this.graphics_.DrawString("?", font1, brush1, tf1, this.typographicsFormat);
return;
}
if ((text == "{"))
{
try
{
double num3 = this.MeasureWidth(node, node.style_, text);
double num4 = 0.1;
double num5 = num4 * num3;
tf1.X -= (int) Math.Round(num5);
}
catch
{
}
}
if (((node.type_.type == ElementType.Entity) && (node.glyph != null)) && (node.glyph.Code == "0222C"))
{
this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
tf1.X += node.box.Width / 3;
this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
goto Label_1B94;
}
if (((node.type_.type == ElementType.Entity) && (node.glyph != null)) && (node.glyph.Code == "000A8"))
{
string text1 = "";
text1 = text + text;
this.graphics_.DrawString(text1, font1, brush1, tf1, this.typographicsFormat);
goto Label_1B94;
}
if (((node.type_.type == ElementType.Entity) && (node.glyph != null)) && (node.glyph.Code == "0222D"))
{
this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
tf1.X += node.box.Width / 4;
this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
tf1.X += node.box.Width / 4;
this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
goto Label_1B94;
}
if (((node.type_.type != ElementType.Entity) || (node.glyph == null)) || (((((node.glyph.Code != "02192") && (node.glyph.Code != "02190")) && ((node.glyph.Code != "02194") && (node.glyph.Code != "0F576"))) && (((node.glyph.Code != "0F577") && (node.glyph.Code != "0F578")) && ((node.glyph.Code != "021C4") && (node.glyph.Code != "021C6")))) && ((((node.glyph.Code != "021CC") && (node.glyph.Code != "021CB")) && ((node.glyph.Code != "021C0") && (node.glyph.Code != "021C1"))) && ((((node.glyph.Code != "021BC") && (node.glyph.Code != "021BD")) && ((node.glyph.Code != "0005E") && (node.glyph.Code != "000AF"))) && (((node.glyph.Code != "0FE37") && (node.glyph.Code != "0FE38")) && (node.glyph.Code != "00332"))))))
{
this.graphics_.DrawString(text, font1, brush1, tf1, this.typographicsFormat);
goto Label_1B94;
}
float single1 = node.box.Width;
float single2 = node.box.Height;
this.graphics_.SetClip(new Rectangle((int) tf1.X, ((int) tf1.Y) - 20, node.box.Width, node.box.Height + 40));
try
{
PointF tf2;
SizeF ef1;
if (node.glyph.Code == "0FE37")
{
ef1 = this.graphics_.MeasureString("D", font1, tf1, this.typographicsFormat);
float single3 = ef1.Width;
ef1 = this.graphics_.MeasureString(text, font1, tf1, this.typographicsFormat);
float single4 = ef1.Width;
ef1 = this.graphics_.MeasureString("F", font1, tf1, this.typographicsFormat);
float single5 = ef1.Width;
ef1 = this.graphics_.MeasureString("C", font1, tf1, this.typographicsFormat);
float single6 = ef1.Width;
float single7 = 0f;
float single8 = 0f;
single8 = tf1.X;
single6 -= 2f;
this.graphics_.DrawString("D", font1, brush1, tf1, this.typographicsFormat);
tf2 = tf1;
tf2.X += single3 - 2f;
single7 = single3 - 2f;
int num6 = ((int) (((single1 / 2f) - (single4 / 2f)) - single3)) + 4;
this.graphics_.SetClip(new Rectangle((int) tf2.X, ((int) tf2.Y) - 20, num6, node.box.Height + 40));
//.........这里部分代码省略.........
示例9: Draw
public override void Draw(Node node, PaintMode printMode, Color color)
{
if ((printMode == PaintMode.BACKGROUND))
{
base.painter_.FillRectangle(node);
}
else if ((printMode == PaintMode.FOREGROUND))
{
if (node.NotBlack())
{
color = node.style_.color;
}
if (this.attrs != null)
{
if (this.attrs.open.Length > 0)
{
base.painter_.DrawFence(node, this.attrs.open, color);
}
if (this.attrs.close.Length > 0)
{
int x = node.box.X;
int w = node.box.Width;
try
{
node.box.X = (x + w) - this.closeWidth;
node.box.Width = this.closeWidth;
base.painter_.DrawFence(node, this.attrs.close, color);
}
catch
{
}
node.box.X = x;
node.box.Width = w;
}
}
int b = base.painter_.MeasureBaseline(node, node.style_, ",");
NodesList nodesList = node.GetChildrenNodes();
if (nodesList != null)
{
Node next = nodesList.Next();
if (next != null)
{
next = nodesList.Next();
}
while (next != null)
{
int xoff = 2;
try
{
xoff = this.leading / 3;
}
catch
{
}
if (this.Separator(next) != "")
{
base.painter_.DrawString(next, next.style_, (next.box.X - this.SeparatorWidth(next)) + xoff, (base.rect.y + base.rect.baseline) - b, 0, 0, this.Separator(next), color);
}
next = nodesList.Next();
}
}
}
}
示例10: Draw
public override void Draw(Node node, PaintMode printMode, Color color)
{
if ((printMode == PaintMode.BACKGROUND))
{
base.painter_.FillRectangle(node);
}
else if ((printMode == PaintMode.FOREGROUND))
{
if (this.leftQuote.Length > 0)
{
base.painter_.DrawQuote(node, node.box.X, node.box.Y, this.leftQuote, node.scriptLevel_, node.style_, color);
}
if ((node.isVisible && (node.literalText != null)) && (node.literalText.Length > 0))
{
if (node.NotBlack())
{
color = node.style_.color;
}
int px = node.box.X;
node.box.X = node.box.X + this.leftQuoteWidth;
try
{
base.painter_.DrawString(node, node.style_, color);
}
catch
{
}
node.box.X = px;
}
if (this.rightQuote.Length > 0)
{
base.painter_.DrawQuote(node, (node.box.X + node.box.Width) - this.rightQuoteWidth, node.box.Y, this.rightQuote, node.scriptLevel_, node.style_, color);
}
}
}