Ejemplo n.º 1
0
        protected static AxisY CreateAxisY(AbstractPaintEngine engine, AxisSetting axisSetting, IPriceScale scale, ChartProperty property, Rectangle axisRectangle)
        {
            AxisY cAxisY = new AxisY(axisSetting, scale);

            cAxisY.AxisRectangle = axisRectangle;
            cAxisY.FontMetrics   = engine.GetFontMetrics("0", property.AxisFont);
            return(cAxisY);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///   建構子
        /// </summary>
        /// <param name="context">繪製圖表內容的目標元件</param>
        /// <param name="chartEngine">圖表引擎資訊(ZChart 要使用的圖表引擎模組資訊)</param>
        public ZChart(Control context, ChartEngineInformation chartEngine)
        {
            __cChartRect = context.ClientRectangle;
            __cPainter   = PaintManager.Manager.CreatePainter(context.Handle, chartEngine);

            __cLayers = new List <Layer>(8);
            __cStatus = new InputDeviceStatus();

            __cBehavior = new Behavior(this, context, __cStatus);
            __cBehavior.SetCustomActions(__cPainter.GetActions());

            __cContext             = context;
            __cContext.Paint      += context_onPaint;
            __cContext.Resize     += context_onResize;
            __cContext.KeyDown    += Context_onKeyDown;
            __cContext.KeyUp      += Context_onKeyUp;
            __cContext.MouseUp    += context_onMouseUp;
            __cContext.MouseDown  += context_onMouseDown;
            __cContext.MouseMove  += context_onMouseMove;
            __cContext.MouseWheel += context_onMouseWheel;
        }
Ejemplo n.º 3
0
 /// <summary>
 ///   建構子
 /// </summary>
 /// <param name="chartSetting">圖表設定值</param>
 public AbstractPlot(AbstractPaintEngine engine, ChartSetting chartSetting)
 {
     __cEngine  = engine;
     __cSetting = chartSetting;
 }