Ejemplo n.º 1
0
		/**
		 * There was an error processing a node, create an error node.
		 * wrap the completed area with a MathMLWrapper area and set the
		 * elements area field to point to the newly completed area
		 */
		private Area Error(IFormattingContext ctx, MathMLElement e, String errorMsg)
		{
			Debug.WriteLine("Error Formatting " + e.GetType().Name + " element, " + errorMsg);
			Area area = AreaFactory.String(ctx, "?");
			area = AreaFactory.Color(Color.Red, area);
            area = new MathMLWrapperArea(area, e);
			Area.SetArea(e, area);
			return area;
		}
Ejemplo n.º 2
0
		/**
		 * wrap the completed area with a MathMLWrapper area and set the
		 * elements area field to point to the newly completed area
		 */
		private Area CompleteArea(IFormattingContext ctx, MathMLElement e, Area area)
		{
			if(ctx.cacheArea)
			{
				area = new MathMLWrapperArea(area, e);
				Area.SetArea(e, area);
			}
			return area;
		}