示例#1
0
        /// <summary>
        /// Gets text spacing on four different sides in relative coordinates.
        /// </summary>
        /// <param name="annotationRelative">Indicates that spacing is in annotation relative coordinates.</param>
        /// <returns>Rectangle with text spacing values.</returns>
        internal override RectangleF GetTextSpacing(out bool annotationRelative)
        {
            annotationRelative = false;
            RectangleF rect = new RectangleF(3f, 3f, 3f, 3f);

            if (GetGraphics() != null)
            {
                rect = GetGraphics().GetRelativeRectangle(rect);
            }

            if (_borderSkin.SkinStyle != BorderSkinStyle.None &&
                this.GetGraphics() != null &&
                this.Chart != null &&
                this.Chart.chartPicture != null &&
                this.Common != null)
            {
                IBorderType border3D = this.Common.BorderTypeRegistry.GetBorderType(_borderSkin.SkinStyle.ToString());
                if (border3D != null)
                {
                    // Adjust are position to the border size
                    RectangleF rectangle = new RectangleF(0f, 0f, 100f, 100f);
                    border3D.AdjustAreasPosition(this.GetGraphics(), ref rectangle);
                    rect = new RectangleF(
                        rectangle.X + 1,
                        rectangle.Y + 1,
                        100f - rectangle.Right + 2,
                        100f - rectangle.Bottom + 2);
                }
            }

            return(rect);
        }
示例#2
0
        internal override RectangleF GetTextSpacing(out bool annotationRelative)
        {
            annotationRelative = false;
            RectangleF rectangleF = new RectangleF(3f, 3f, 3f, 3f);

            if (GetGraphics() != null)
            {
                rectangleF = GetGraphics().GetRelativeRectangle(rectangleF);
            }
            if (borderSkin.SkinStyle != 0 && GetGraphics() != null && Chart != null && Chart.chartPicture != null && Chart.chartPicture.common != null)
            {
                IBorderType borderType = Chart.chartPicture.common.BorderTypeRegistry.GetBorderType(borderSkin.SkinStyle.ToString());
                if (borderType != null)
                {
                    RectangleF areasRect = new RectangleF(0f, 0f, 100f, 100f);
                    borderType.AdjustAreasPosition(GetGraphics(), ref areasRect);
                    rectangleF = new RectangleF(areasRect.X + 1f, areasRect.Y + 1f, 100f - areasRect.Right + 2f, 100f - areasRect.Bottom + 2f);
                }
            }
            return(rectangleF);
        }
示例#3
0
        public override RectangleF GetTextSpacing(out bool annotationRelative)
        {
            annotationRelative = false;
            RectangleF rectangleF = new RectangleF(3f, 3f, 3f, 3f);

            if (base.GetGraphics() != null)
            {
                rectangleF = base.GetGraphics().GetRelativeRectangle(rectangleF);
            }
            if (this.borderSkin.SkinStyle != 0 && base.GetGraphics() != null && this.Chart != null && this.Chart.chartPicture != null && this.Chart.chartPicture.common != null)
            {
                IBorderType borderType = this.Chart.chartPicture.common.BorderTypeRegistry.GetBorderType(this.borderSkin.SkinStyle.ToString());
                if (borderType != null)
                {
                    RectangleF rectangleF2 = new RectangleF(0f, 0f, 100f, 100f);
                    borderType.AdjustAreasPosition(base.GetGraphics(), ref rectangleF2);
                    rectangleF = new RectangleF((float)(rectangleF2.X + 1.0), (float)(rectangleF2.Y + 1.0), (float)(100.0 - rectangleF2.Right + 2.0), (float)(100.0 - rectangleF2.Bottom + 2.0));
                }
            }
            return(rectangleF);
        }