/// <summary> /// Initialize the label content on the device. /// </summary> /// <param name="device"></param> public void Initialize(IDrawing.IDevice device, Font font) { try { #region Update#2 if (line != null) { line.Dispose(); line = null; } if (textWriter != null) { textWriter.Dispose(); textWriter = null; } #endregion line = GraphicEngine.GraphicEngine.CreateLine(device, font); line.Width = lineWidth; line.Antialias = true; textWriter = GraphicEngine.GraphicEngine.CreateTextWriter(device, Font);// 12, "Mitra"); } catch (System.Exception ex) { xPFT.Exceptions.ExceptionHandler.LogError(ex); } }
/// <summary> /// Dispose line /// </summary> public void Dispose() { if (line != null) { line.Dispose(); line = null; } }
/// <summary> /// Dispose the axis. /// </summary> public override void Dispose() { if (line != null) { line.Dispose(); line = null; } axisTitle.Dispose(); }
/// <summary> /// Dispose the series /// </summary> public override void Dispose() { if (mainPolyLine != null) { mainPolyLine.Dispose(); mainPolyLine = null; } if (labelTextWriter != null) { labelTextWriter.Dispose(); labelTextWriter = null; } }
/// <summary> /// Initialize the series component on the device. /// </summary> /// <param name="device"></param> internal override void Initialize(IDrawing.IDevice device) { try { this.device = device; mainPolyLine = GraphicEngine.GraphicEngine.CreateLine(device, Font); mainPolyLine.Width = LineThickness; mainPolyLine.Antialias = true; mainPolyLine.Pattern = linePattern; labelTextWriter = GraphicEngine.GraphicEngine.CreateTextWriter(device, Font); points.Width = XAxis.Maximum - XAxis.Minimum; points.HeightBottom = YAxis.Minimum; points.HeightTop = YAxis.Maximum; } catch (System.Exception ex) { xPFT.Exceptions.ExceptionHandler.LogError(ex); } }
/// <summary> /// Initialize the line on the device. /// </summary> /// <param name="device"></param> internal override void Initialize(IDrawing.IDevice device) { base.Initialize(device); try { this.device = device; #region Update#2 if (line != null) { line.Dispose(); line = null; } #endregion line = GraphicEngine.GraphicEngine.CreateLine(device, Font); line.Width = LineWidth; } catch (System.Exception ex) { xPFT.Exceptions.ExceptionHandler.LogError(ex); } }
/// <summary> /// Initilize the axis on the device. /// </summary> /// <param name="device"></param> internal override void Initialize(IDrawing.IDevice device) { try { if (line != null && !line.IsDisposed) { line.Dispose(); } line = GraphicEngine.GraphicEngine.CreateLine(device, Font); line.Width = lineWidth; line.Antialias = true; foreach (AxisLabel al in labelsCollection) { al.Initialize(device, Font); } axisTitle.AxisSide = type; axisTitle.Initialize(device, Font); } catch (System.Exception ex) { xPFT.Exceptions.ExceptionHandler.LogError(ex); } }