コード例 #1
0
ファイル: PlotAxisGridLines.cs プロジェクト: fxxxysh/toolkit
 private void Draw(PaintArgs p, Plot plot, PlotAxis axis, bool drawMajors)
 {
     if (this.Visible && plot != null)
     {
         string       dockDataViewName = axis.DockDataViewName;
         PlotDataView plotDataView     = plot.DataViews[dockDataViewName];
         if (plotDataView != null)
         {
             p.Graphics.SetClip(plotDataView.BoundsClip);
             this.DrawToDataView(p, axis, plotDataView.BoundsClip, drawMajors);
             foreach (PlotDataView dataView in plot.DataViews)
             {
                 if (dataView != plotDataView)
                 {
                     if (axis.DockVertical)
                     {
                         if (PlotBase.GetNamesMatch(dataView.GridLinesMirrorVertical, dockDataViewName))
                         {
                             this.DrawToDataView(p, axis, dataView.BoundsClip, drawMajors);
                         }
                     }
                     else if (PlotBase.GetNamesMatch(dataView.GridLinesMirrorHorizontal, dockDataViewName))
                     {
                         this.DrawToDataView(p, axis, dataView.BoundsClip, drawMajors);
                     }
                 }
             }
         }
     }
 }
コード例 #2
0
 protected override void DrawFocusRectangles(PaintArgs p)
 {
     if (base.Focused)
     {
         p.Graphics.DrawFocusRectangle(base.BoundsClip, base.BackColor);
     }
 }
コード例 #3
0
 protected override void DrawCustom(PaintArgs p)
 {
     if (this.m_Points.Count >= 2)
     {
         Point[] array = new Point[this.m_Points.Count];
         for (int i = 0; i < this.m_Points.Count; i++)
         {
             array[i] = new Point(this.Scale.ConvertUnitsToPixelsX(this.m_Points[i].X), this.Scale.ConvertUnitsToPixelsY(this.m_Points[i].Y));
         }
         Rectangle rectangle = new Rectangle(this.Scale.ConvertUnitsToPixelsX(base.Left), this.Scale.ConvertUnitsToPixelsY(base.Top), this.Scale.ConvertWidthUnitsToPixels(this.Width), this.Scale.ConvertHeightUnitsToPixels(this.Height));
         base.ClickRegion = new Region(rectangle);
         base.UpdateGrabHandles(rectangle);
         if (rectangle.Height != 0 && rectangle.Width != 0)
         {
             if (base.FillStyle != AnnotationFillStyle.Clear)
             {
                 base.DrawFill(p, rectangle, array);
             }
             rectangle = new Rectangle(rectangle.Left, rectangle.Top, rectangle.Width - 1, rectangle.Height - 1);
             if (rectangle.Height != 0 && rectangle.Width != 0 && base.OutlineStyle != AnnotationOutlineStyle.Clear)
             {
                 this.DrawOutline(p, rectangle, array);
             }
         }
     }
 }
コード例 #4
0
 protected override void UpdateCanDraw(PaintArgs p)
 {
     base.UpdateCanDraw(p);
     if (this.Markers.Visible && this.Markers.Fill.Pen.Visible)
     {
         return;
     }
     if (this.Markers.Visible && this.Markers.Fill.Brush.Visible)
     {
         return;
     }
     if (this.FillLow.Visible && this.FillLow.Pen.Visible)
     {
         return;
     }
     if (this.FillLow.Visible && this.FillLow.Brush.Visible)
     {
         return;
     }
     if (this.FillHigh.Visible && this.FillHigh.Pen.Visible)
     {
         return;
     }
     if (this.FillHigh.Visible && this.FillHigh.Brush.Visible)
     {
         return;
     }
     base.CanDraw = false;
 }
コード例 #5
0
 protected override void DrawBackgroundLayer1(PaintArgs p)
 {
     if (!this.GridLines.ShowOnTop)
     {
         this.I_GridLines.DrawMinors(p, base.Plot, this);
     }
 }
コード例 #6
0
        protected override void UpdateScaleExtents(PaintArgs p)
        {
            Rectangle drawRectangle = p.DrawRectangle;
            Rectangle value         = new Rectangle(this.CenterPoint.X - this.HubRadius, this.CenterPoint.Y - this.HubRadius, 2 * this.HubRadius, 2 * this.HubRadius);

            this.m_DrawExtent.Reset();
            this.m_DrawExtent.Add(this.CenterPoint);
            this.m_DrawExtent.Add(value);
            for (int i = 0; i < base.TickList.Count; i++)
            {
                Point[] tickLine = this.GetTickLine(base.TickList[i] as IScaleTickBase);
                this.m_DrawExtent.Add(tickLine[0], tickLine[1]);
                if (base.TickList[i] is IScaleTickLabel)
                {
                    IScaleTickLabel scaleTickLabel = base.TickList[i] as IScaleTickLabel;
                    if (scaleTickLabel.TextVisible)
                    {
                        Rectangle textRect  = this.GetTextRect(p, scaleTickLabel);
                        double    textAngle = this.GetTextAngle(scaleTickLabel);
                        Point[]   array     = Math2.ToRotatedPoints(textAngle, textRect);
                        for (int j = 0; j < array.Length; j++)
                        {
                            this.m_DrawExtent.Add(array[j]);
                        }
                    }
                }
            }
            this.m_MaxRequiredWidth  = this.m_DrawExtent.MaxWidth + 4;
            this.m_MaxRequiredHeight = this.m_DrawExtent.MaxHeight + 4;
            this.CenterPoint         = this.m_DrawExtent.GetNewCenterPoint(this.CenterPoint, drawRectangle);
        }
コード例 #7
0
 protected override void DrawLegendMarker(PaintArgs p, Rectangle r)
 {
     if (base.XAxis != null)
     {
         Point  point            = iRectangle.CenterPoint2(r);
         int    num              = (int)Math.Round((double)r.Width * 0.6);
         double normalizedWidth  = base.GetNormalizedWidth(base.XAxis, this.WidthBody, this.WidthStyleBody);
         double normalizedWidth2 = base.GetNormalizedWidth(base.XAxis, this.WidthShadow, this.WidthStyleShadow);
         double num2             = 0.0;
         if (normalizedWidth > num2)
         {
             num2 = normalizedWidth;
         }
         if (normalizedWidth2 > num2)
         {
             num2 = normalizedWidth2;
         }
         int   width    = (int)Math.Round((double)num * normalizedWidth2 / num2);
         int   height   = r.Height;
         Size  size     = new Size(width, height);
         Point location = new Point(point.X - (size.Width + 1) / 2, point.Y - size.Height / 2);
         this.I_FillShadow.Draw(p, new Rectangle(location, size));
         width    = (int)Math.Round((double)num * normalizedWidth / num2);
         height   = r.Height / 2;
         height   = height / 2 * 2;
         size     = new Size(width, height);
         location = new Point(point.X - (size.Width + 1) / 2, point.Y - size.Height / 2);
         this.I_FillBodyBullish.Draw(p, new Rectangle(location, size));
     }
 }
コード例 #8
0
ファイル: BorderSimple.cs プロジェクト: fxxxysh/toolkit
 private static Point[] GetBorderLowerRightPoints(PaintArgs p, Rectangle r)
 {
     Point[] array = new Point[3];
     if (p.Rotation == RotationQuad.X000)
     {
         array[0] = new Point(r.Left, r.Bottom - 1);
         array[1] = new Point(r.Right - 1, r.Bottom - 1);
         array[2] = new Point(r.Right - 1, r.Top);
     }
     else if (p.Rotation == RotationQuad.X090)
     {
         array[0] = new Point(r.Left, r.Top - 1);
         array[1] = new Point(r.Right - 1, r.Top - 1);
         array[2] = new Point(r.Right - 1, r.Bottom);
     }
     else if (p.Rotation == RotationQuad.X180)
     {
         array[0] = new Point(r.Left - 1, r.Bottom);
         array[1] = new Point(r.Left - 1, r.Top - 1);
         array[2] = new Point(r.Right, r.Top - 1);
     }
     else
     {
         array[0] = new Point(r.Right, r.Bottom - 1);
         array[1] = new Point(r.Left - 1, r.Bottom - 1);
         array[2] = new Point(r.Left - 1, r.Top);
     }
     return(array);
 }
コード例 #9
0
        public void Draw(PaintArgs p, Font font, Color foreColor, Color backColor)
        {
            Rectangle boundsLayout = this.BoundsLayout;
            Color     color        = PlotLayoutStackingGroup.m_ColorTable[Math.Abs(this.Index % 2)];

            p.Graphics.FillRectangle(p.Graphics.Brush(color), boundsLayout);
        }
コード例 #10
0
        protected override void CalculateDepthPixels(PaintArgs p)
        {
            this.m_MarginOuterPixels = (int)Math.Ceiling((double)p.Graphics.MeasureString(base.Font).Height *base.MarginOuter);
            Image image = base.GetImage();

            if (image == null)
            {
                Size size = (!base.TextHorizontal) ? ((ITextLayoutBase)base.TextLayout).GetRequiredSize(base.Text, base.Font, base.Bounds.Height - 2 * this.m_MarginOuterPixels, p.Graphics) : ((ITextLayoutBase)base.TextLayout).GetRequiredSize(base.Text, base.Font, base.Bounds.Width - 2 * this.m_MarginOuterPixels, p.Graphics);
                if (!((!base.DockVertical) ? base.TextHorizontal : (!base.TextHorizontal)))
                {
                    base.DockDepthPixels = size.Height + 2 * this.m_MarginOuterPixels;
                    this.m_LengthPixels  = size.Width + 2 * this.m_MarginOuterPixels;
                }
                else
                {
                    base.DockDepthPixels = size.Width + 2 * this.m_MarginOuterPixels;
                    this.m_LengthPixels  = size.Height + 2 * this.m_MarginOuterPixels;
                }
            }
            else if (base.DockVertical)
            {
                base.DockDepthPixels = image.Height + 2 * this.m_MarginOuterPixels;
                this.m_LengthPixels  = image.Width + 2 * this.m_MarginOuterPixels;
            }
            else
            {
                base.DockDepthPixels = image.Width + 2 * this.m_MarginOuterPixels;
                this.m_LengthPixels  = image.Height + 2 * this.m_MarginOuterPixels;
            }
        }
コード例 #11
0
        protected override void Draw(PaintArgs p)
        {
            base.I_Fill.Draw(p, base.BoundsAlignment);
            Image     image = base.GetImage();
            Rectangle r;

            if (image == null)
            {
                r = ((ITextLayoutBase)base.TextLayout).GetRectangle(base.BoundsAlignment, base.Font, p.Graphics);
                r.Inflate(-this.m_MarginOuterPixels, -this.m_MarginOuterPixels);
                p.Graphics.DrawRotatedText(base.Text, base.Font, base.ForeColor, r, base.ActualTextRotation, ((ITextLayoutBase)base.TextLayout).StringFormat);
            }
            else
            {
                Point point = new Point(base.BoundsAlignment.Left + this.m_MarginOuterPixels, base.BoundsAlignment.Top + this.m_MarginOuterPixels);
                r = new Rectangle(point.X, point.Y, image.Width, image.Height);
                if (base.ImageTransparent)
                {
                    p.Graphics.DrawImageTransparent(image, r);
                }
                else
                {
                    p.Graphics.DrawImage(image, point.X, point.Y);
                }
            }
        }
コード例 #12
0
ファイル: PlotChannelTraceXY.cs プロジェクト: fxxxysh/toolkit
 protected override void DrawMarkers(PaintArgs p, PlotXAxis xAxis, PlotYAxis yAxis, PlotMarker markers)
 {
     if (markers.Visible && this.IndexDrawStart != -1 && this.IndexDrawStop != -1)
     {
         if (this.MarkersTurnOffLimit > 0)
         {
             int num = Math.Abs(this.IndexDrawStop - this.IndexDrawStart) + 1;
             if (num >= this.MarkersTurnOffLimit)
             {
                 return;
             }
         }
         for (int i = this.IndexDrawStart; i <= this.IndexDrawStop; i++)
         {
             PlotDataPointTraceXY plotDataPointTraceXY = this[i];
             if (!plotDataPointTraceXY.Null && !plotDataPointTraceXY.Empty)
             {
                 int num2 = xAxis.ScaleDisplay.ValueToPixels(plotDataPointTraceXY.X);
                 int num3 = yAxis.ScaleDisplay.ValueToPixels(plotDataPointTraceXY.Y);
                 if (base.XYSwapped)
                 {
                     ((IPlotMarker)plotDataPointTraceXY.Marker).Draw(p, num3, num2);
                 }
                 else
                 {
                     ((IPlotMarker)plotDataPointTraceXY.Marker).Draw(p, num2, num3);
                 }
             }
         }
     }
 }
コード例 #13
0
ファイル: PlotChannelTraceXY.cs プロジェクト: fxxxysh/toolkit
        private void DrawTrace(PaintArgs p, PlotXAxis xAxis, PlotYAxis yAxis)
        {
            PlotDataPointTraceXY plotDataPointTraceXY  = null;
            PlotDataPointTraceXY plotDataPointTraceXY2 = null;

            ((IPlotPen)this.Trace).GetPen(p);
            for (int i = this.IndexDrawStart; i <= this.IndexDrawStop; i++)
            {
                PlotDataPointTraceXY plotDataPointTraceXY3 = this[i];
                if (plotDataPointTraceXY3.Null)
                {
                    plotDataPointTraceXY  = null;
                    plotDataPointTraceXY2 = null;
                }
                else if (!plotDataPointTraceXY3.Empty)
                {
                    if (plotDataPointTraceXY == null)
                    {
                        plotDataPointTraceXY = plotDataPointTraceXY3;
                    }
                    else
                    {
                        plotDataPointTraceXY2 = plotDataPointTraceXY3;
                        if (plotDataPointTraceXY2.Trace.Visible)
                        {
                            this.DrawLine(p, xAxis, yAxis, ((IPlotPen)plotDataPointTraceXY2.Trace).GetPen(p), plotDataPointTraceXY, plotDataPointTraceXY2);
                        }
                        plotDataPointTraceXY = plotDataPointTraceXY2;
                    }
                }
            }
        }
コード例 #14
0
        private void CalcRects(PaintArgs p, PercentItemCollection items)
        {
            int height = p.Graphics.MeasureString("0", this.Font).Height;
            int width  = p.Graphics.MeasureString("0", this.Font, true).Width;

            this.m_MarginPixels         = (int)((double)p.Graphics.MeasureString("0", this.Font, true).Width *this.Margin);
            this.m_RowHeightPixels      = height;
            this.m_RowSpacingPixels     = (int)((double)height * this.RowSpacing);
            this.m_RowTotalHeightPixels = this.m_RowHeightPixels + this.m_RowSpacingPixels;
            int num  = (int)(this.TitleMargin * (double)width);
            int num2 = (int)(this.ColumnPercent.Margin * (double)width);
            int num3 = (int)(this.ColumnValue.Margin * (double)width);

            this.m_TotalHeight = this.m_RowHeightPixels * items.Count + this.m_RowSpacingPixels * (items.Count - 1);
            int width2         = 15;
            int requiredWidth  = ((IPercentLegendColumn)this.ColumnValue).GetRequiredWidth(p, this.Font, items, true);
            int requiredWidth2 = ((IPercentLegendColumn)this.ColumnPercent).GetRequiredWidth(p, this.Font, items, false);
            int num4           = 0;

            foreach (PercentItem item in items)
            {
                num4 = Math.Max(p.Graphics.MeasureString(item.Title, this.Font, true).Width, num4);
            }
            this.m_RectColorBar = new Rectangle(this.m_MarginPixels, 0, width2, height);
            this.m_RectTitle    = new Rectangle(this.m_RectColorBar.Right + num, 0, num4, height);
            this.m_RectValue    = new Rectangle(this.m_RectTitle.Right + num3, 0, requiredWidth - num3, height);
            this.m_RectPercent  = new Rectangle(this.m_RectValue.Right + num2, 0, requiredWidth2 - num2, height);
        }
コード例 #15
0
ファイル: PlotTableCell.cs プロジェクト: fxxxysh/toolkit
 private void Draw(PaintArgs p, bool showGrid, Pen gridPen)
 {
     if (this.Visible)
     {
         Region clip  = p.Graphics.Clip;
         Image  image = this.GetImage();
         this.m_BoundsText = this.Bounds;
         this.m_BoundsText.Inflate(-this.m_OuterMargin.Width, -this.m_OuterMargin.Height);
         p.Graphics.SetClip(this.Bounds);
         if (image == null)
         {
             ((ITextLayoutBase)this.TextLayout).Draw(p.Graphics, this.Font, p.Graphics.Brush(this.ForeColor), this.Text, this.BoundsText);
         }
         else
         {
             Point     point = new Point(this.BoundsText.Left, this.BoundsText.Top);
             Rectangle r     = new Rectangle(point.X, point.Y, image.Width, image.Height);
             if (this.ImageTransparent)
             {
                 p.Graphics.DrawImageTransparent(image, r);
             }
             else
             {
                 p.Graphics.DrawImage(image, point.X, point.Y);
             }
         }
         p.Graphics.Clip = clip;
         if (showGrid)
         {
             p.Graphics.DrawRectangle(gridPen, this.Bounds);
         }
     }
 }
コード例 #16
0
ファイル: IndicatorLed.cs プロジェクト: fxxxysh/toolkit
        protected void Draw(PaintArgs p, Rectangle r, bool value, Color color, string s, Color textColorActive, Color textColorInactive)
        {
            base.Bounds = Rectangle.Empty;
            base.Bounds = r;
            p.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
            ((IBevelThick)this.Bezel).Draw(p, r, this.Style, this.Bezel.Color);
            r.Inflate(-this.Bezel.ActualThickness, -this.Bezel.ActualThickness);
            if (this.Style == ShapeBasic.Rectangle)
            {
                this.DrawLedRectangle3D(p, r, this.Style3D, value, color);
            }
            else if (this.Style == ShapeBasic.Ellipse)
            {
                this.DrawLedEllipse3D(p, r, this.Style3D, value, color);
            }
            else if (this.Style == ShapeBasic.Diamond)
            {
                this.DrawLedDiamond3D(p, r, this.Style3D, value, color);
            }
            Brush            brush          = (!value) ? new SolidBrush(textColorInactive) : new SolidBrush(textColorActive);
            DrawStringFormat genericDefault = DrawStringFormat.GenericDefault;

            genericDefault.Alignment     = StringAlignment.Center;
            genericDefault.LineAlignment = StringAlignment.Center;
            if (this.ControlBase != null)
            {
                p.Graphics.DrawString(s, this.ControlBase.Font, brush, r, genericDefault);
            }
        }
コード例 #17
0
        protected override void DrawInternal(PaintArgs p, DrawStringFormat stringFormat)
        {
            foreach (IScaleTickBase tick in base.TickList)
            {
                if ((this.Range as ScaleRangeAngular).AngleSpan == 360.0)
                {
                    if (base.TickList[base.TickList.Count - 1] != tick)
                    {
                        tick.Draw(p, stringFormat, base.TickMajor.Length);
                    }
                }
                else
                {
                    tick.Draw(p, stringFormat, base.TickMajor.Length);
                }
            }
            float     num  = (float)this.I_Range.ValueToAngle(base.ScaleRange.Min);
            float     num2 = (float)this.I_Range.ValueToAngle(base.ScaleRange.Max);
            Rectangle rect = default(Rectangle);

            if (base.LineInnerVisible)
            {
                int num3 = this.Radius + this.Margin;
                rect = new Rectangle(this.CenterPoint.X - num3, this.CenterPoint.Y - num3, 2 * num3, 2 * num3);
                p.Graphics.DrawArc(p.Graphics.Pen(base.TickMajor.Color, (float)base.LineThickness), rect, num, num2 - num);
            }
            if (base.LineOuterVisible)
            {
                int num3 = this.Radius + this.Margin + base.TickMajor.Length;
                rect = new Rectangle(this.CenterPoint.X - num3, this.CenterPoint.Y - num3, 2 * num3, 2 * num3);
                p.Graphics.DrawArc(p.Graphics.Pen(base.TickMajor.Color, (float)base.LineThickness), rect, num, num2 - num);
            }
        }
コード例 #18
0
 public void CalcualteDimensions(PaintArgs p)
 {
     foreach (PlotLayoutUniqueDockOrder item in this)
     {
         item.CalcualteDimensions(p);
     }
 }
コード例 #19
0
ファイル: AnnotationText.cs プロジェクト: fxxxysh/toolkit
        protected override void DrawCustom(PaintArgs p)
        {
            int   num    = this.Scale.ConvertHeightUnitsToPixels(this.Height);
            int   height = this.Font.Height;
            float num2   = this.FixedSize ? this.Font.Size : ((float)num / (float)height * this.Font.Size);

            if (!(num2 <= 0f))
            {
                Font font;
                if (this.Font.Size != num2)
                {
                    if (this.m_DrawFont == null || this.m_DrawFont.Size != num2)
                    {
                        this.m_DrawFont = new Font(this.Font.Name, num2, this.Font.Style);
                    }
                    font = this.m_DrawFont;
                }
                else
                {
                    font = this.Font;
                }
                Size      size = p.Graphics.MeasureString(this.Text, font, false);
                Rectangle r    = new Rectangle(this.Scale.ConvertUnitsToPixelsX(this.X) - size.Width / 2, this.Scale.ConvertUnitsToPixelsY(this.Y) - size.Height / 2, size.Width + 1, size.Height + 1);
                base.ClickRegion = this.ToClickRegion(r);
                base.UpdateGrabHandles(r);
                if (this.Text.Length != 0)
                {
                    p.Graphics.DrawString(this.Text, font, p.Graphics.Brush(this.ForeColor), r);
                }
            }
        }
コード例 #20
0
ファイル: PlotLimitPolyBand.cs プロジェクト: fxxxysh/toolkit
        protected override void Draw(PaintArgs p, PlotXAxis xAxis, PlotYAxis yAxis)
        {
            Point[] array = new Point[this.m_Points.Count];
            for (int i = 0; i < this.m_Points.Count; i++)
            {
                array[i] = base.GetPoint(this.m_Points[i].X, this.m_Points[i].Y);
            }
            GraphicsPath graphicsPath = new GraphicsPath();

            try
            {
                graphicsPath.AddPolygon(array);
                if (this.m_HitRegion != null)
                {
                    this.m_HitRegion.Dispose();
                }
                this.m_HitRegion = new Region(graphicsPath);
            }
            finally
            {
                graphicsPath.Dispose();
            }
            Rectangle rectangle = Rectangle.Round(this.m_HitRegion.GetBounds(p.Graphics.GraphicsMS));

            base.I_Fill.Draw(p, array, rectangle);
            base.Bounds = rectangle;
        }
コード例 #21
0
        protected override void CalculateDepthPixels(PaintArgs p)
        {
            base.UpdateChannelList();
            this.m_MarginOuterPixels = (int)Math.Ceiling((double)p.Graphics.MeasureString(base.Font).Height *base.MarginOuter);
            int drawPixelsMarginOuter = (int)Math.Ceiling((double)p.Graphics.MeasureString(this.CellFormatting.TitleFont).Height *this.CellFormatting.MarginOuter);
            int height = p.Graphics.MeasureString(this.CellFormatting.DataFont).Height;
            int num    = 0;
            int num2   = 0;
            int num3   = 0;

            foreach (IPlotLegendMultiColumnItem column in this.Columns)
            {
                column.DrawTitleFont            = this.CellFormatting.TitleFont;
                column.DrawDataFont             = this.CellFormatting.DataFont;
                column.DrawPixelsMarginOuter    = drawPixelsMarginOuter;
                column.DrawPixelsMarkerMinWidth = height;
                column.Calculate(p, base.Channels);
                num2 = Math.Max(num2, column.DrawPixelsHeightTitle);
                num += column.DrawPixelsTextWidth + 2 * column.DrawPixelsMarginOuter;
            }
            foreach (IPlotLegendMultiColumnItem column2 in this.Columns)
            {
                column2.DrawPixelsHeightTitle = num2;
                num3 = column2.DrawPixelsHeightTitle + 2 * column2.DrawPixelsMarginOuter + base.ItemCount * (column2.DrawPixelsHeightData + 2 * column2.DrawPixelsMarginOuter);
            }
            this.m_LengthPixels  = num3 + 2 * this.m_MarginOuterPixels;
            base.DockDepthPixels = num + 2 * this.m_MarginOuterPixels;
        }
コード例 #22
0
 protected override void HintUpdate(PaintArgs p, PlotDataCursorDisplay display)
 {
     if (base.Style == PlotDataCursorMultipleStyle.ValueXY)
     {
         base.Hint.Text = display.XText + ", " + display.YText;
     }
     if (base.Style == PlotDataCursorMultipleStyle.ValueX)
     {
         base.Hint.Text = display.XText;
     }
     if (base.Style == PlotDataCursorMultipleStyle.ValueY)
     {
         base.Hint.Text = display.YText;
     }
     if (base.Style == PlotDataCursorMultipleStyle.DeltaX)
     {
         base.Hint.Text = base.Pointer1.AxisPosition.TextFormatting.GetText(Math.Abs(display.XValue - display.YValue));
     }
     if (base.Style == PlotDataCursorMultipleStyle.DeltaY)
     {
         base.Hint.Text = base.Pointer1.AxisPosition.TextFormatting.GetText(Math.Abs(display.XValue - display.YValue));
     }
     if (base.Style == PlotDataCursorMultipleStyle.InverseDeltaX)
     {
         base.Hint.Text = base.Pointer1.AxisPosition.TextFormatting.GetText(1.0 / Math.Abs(display.XValue - display.YValue) * base.Pointer1.AxisPosition.CursorScaler);
     }
     if (base.Style == PlotDataCursorMultipleStyle.InverseDeltaY)
     {
         base.Hint.Text = base.Pointer1.AxisPosition.TextFormatting.GetText(1.0 / Math.Abs(display.XValue - display.YValue) * base.Pointer1.AxisPosition.CursorScaler);
     }
 }
コード例 #23
0
        protected override void Draw(PaintArgs p, PlotXAxis xAxis, PlotYAxis yAxis)
        {
            bool flag = true;

            if (!this.Markers.Visible)
            {
                flag = false;
            }
            if (this.IndexDrawStart == -1)
            {
                flag = false;
            }
            if (this.IndexDrawStop == -1)
            {
                flag = false;
            }
            if (this.MarkersTurnOffLimit > 0)
            {
                int num = Math.Abs(this.IndexDrawStop - this.IndexDrawStart) + 1;
                if (num >= this.MarkersTurnOffLimit)
                {
                    flag = false;
                }
            }
            this.DrawFill(p, xAxis, yAxis);
            base.SetClipRect(p);
            if (this.Trace.Visible)
            {
                this.DrawTrace(p, xAxis, yAxis);
            }
            if (flag)
            {
                this.DrawMarkers(p, xAxis, yAxis, this.Markers);
            }
        }
コード例 #24
0
ファイル: AnnotationLine.cs プロジェクト: fxxxysh/toolkit
        protected override void DrawOutline(PaintArgs p, Rectangle rect, Point[] points)
        {
            Point pt  = new Point(this.Scale.ConvertUnitsToPixelsX(this.Point1X), this.Scale.ConvertUnitsToPixelsY(this.Point1Y));
            Point pt2 = new Point(this.Scale.ConvertUnitsToPixelsX(this.Point2X), this.Scale.ConvertUnitsToPixelsY(this.Point2Y));

            p.Graphics.DrawLine(p.Graphics.Pen(base.OutlineColor, base.DashStyle), pt, pt2);
        }
コード例 #25
0
 protected override void DrawForegroundLayer2(PaintArgs p)
 {
     if (this.GridLines.ShowOnTop)
     {
         this.I_GridLines.DrawMajors(p, base.Plot, this);
     }
 }
コード例 #26
0
 private void Draw(PaintArgs p)
 {
     if (this.Visible)
     {
         this.DrawInternal(p, DrawStringFormat.GenericDefault);
     }
 }
コード例 #27
0
        protected override void DrawFillGradient(PaintArgs p, Rectangle rect, Point[] points)
        {
            GraphicsPath graphicsPath = new GraphicsPath();

            graphicsPath.AddPolygon(points);
            p.Graphics.FillGradientPath(rect, graphicsPath, base.GradientStartColor, base.GradientStopColor, base.ModeAngle, 1f, false);
        }
コード例 #28
0
ファイル: PlotTableCell.cs プロジェクト: fxxxysh/toolkit
 private void UpdateRequiredSize(PaintArgs p, bool visible, Size outerMargin, int fixedWidth, int fixedHeight)
 {
     this.m_Visible     = visible;
     this.m_OuterMargin = outerMargin;
     if (!visible)
     {
         this.m_RequiredSize = Size.Empty;
     }
     else
     {
         Image image = this.GetImage();
         if (image == null)
         {
             this.m_RequiredSize = ((ITextLayoutBase)this.TextLayout).GetRequiredSize(this.Text, this.Font, p.Graphics);
         }
         else
         {
             this.m_RequiredSize = image.Size;
         }
         if (fixedWidth != -1)
         {
             this.m_RequiredSize = new Size(fixedWidth, this.m_RequiredSize.Height);
         }
         if (fixedHeight != -1)
         {
             this.m_RequiredSize = new Size(this.m_RequiredSize.Width, fixedHeight);
         }
         this.m_RequiredSize = new Size(this.m_RequiredSize.Width + 2 * this.m_OuterMargin.Width, this.m_RequiredSize.Height + 2 * this.m_OuterMargin.Height);
     }
 }
コード例 #29
0
ファイル: PlotLimitLineY.cs プロジェクト: fxxxysh/toolkit
 protected override void DrawFocusRectangles(PaintArgs p, PlotXAxis xAxis, PlotYAxis yAxis)
 {
     if (base.Focused)
     {
         p.Graphics.DrawFocusRectangle(base.Bounds, base.BackColor);
     }
 }
コード例 #30
0
 private void Draw(PaintArgs p, Rectangle r)
 {
     if (this.Background.Visible)
     {
         p.Graphics.FillRectangle(((IPlotBrush)this.Background).GetBrush(p, r), r);
     }
 }