Exemplo n.º 1
0
        /// <summary>
        /// サイズ変更
        /// </summary>
        /// <param name="phisicalWidth"></param>
        /// <param name="phisicalHeight"></param>
        public void Resize(double phisicalWidth, double phisicalHeight)
        {
            pW = phisicalWidth;
            pH = phisicalHeight;

            //幅
            var axisWidth = phisicalWidth - Parameter.MergineLeft - Parameter.MergineRight;

            axisWidth -= axisY1 == null ? 0 : axisY1.Parameter.TitleWidth;
            axisWidth -= axisY2 == null ? 0 : axisY2.Parameter.TitleWidth;
            if (axisWidth < Parameter.MinimumContentWidh)
            {
                axisWidth = Parameter.MinimumContentWidh;
            }
            AxisX?.SetPhysicalSize(axisWidth);
            //高さ
            var axisHeight = phisicalHeight - Parameter.MergineTop - Parameter.MergineBottom;

            axisHeight -= AxisX.Parameter.Font.Size;    //これ単位がよくわからない
            if (axisHeight < Parameter.MinimumContentHeight)
            {
                axisHeight = Parameter.MinimumContentHeight;
            }
            axisY1?.SetPhysicalSize(axisHeight);
            axisY2?.SetPhysicalSize(axisHeight);

            var pAreaX = Parameter.MergineLeft + (axisY1 == null ? 0 : axisY1.Parameter.TitleWidth);
            var pAreaY = Parameter.MergineTop;

            plotArea = new System.Drawing.RectangleF((float)pAreaX, (float)pAreaY, (float)axisWidth, (float)axisHeight);
        }