Esempio n. 1
0
        /// <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);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Initialize the annotation drawer object.
        /// </summary>
        /// <param name="device"></param>
        internal override void Initialize(IDrawing.IDevice device)
        {
            #region Update#2
            if (textWriter != null)
            {
                textWriter.Dispose();
                textWriter = null;
            }
            #endregion

            textWriter = GraphicEngine.GraphicEngine.CreateTextWriter(device, Font);
        }
Esempio n. 3
0
 /// <summary>
 /// Dispose the series
 /// </summary>
 public override void Dispose()
 {
     if (mainPolyLine != null)
     {
         mainPolyLine.Dispose();
         mainPolyLine = null;
     }
     if (labelTextWriter != null)
     {
         labelTextWriter.Dispose();
         labelTextWriter = null;
     }
 }