Canguro.Controller.Tracking.HoverPainter.PaintLine C# (CSharp) Метод

PaintLine() публичный Метод

public PaintLine ( Device device, Canguro line ) : void
device Device
line Canguro
Результат void
        public void PaintLine(Device device, Canguro.Model.LineElement line)
        {
            PaintLine(device, line.I.Position, line.J.Position);
        }

Same methods

HoverPainter::PaintLine ( Device device, System.Vector3 iPos, System.Vector3 jPos ) : void

Usage Example

Пример #1
0
        internal void Paint(Device device)
        {
            if (hoverItem != null)
            {
                // Glow item
                if (hoverItem is LineElement)
                {
                    LineElement line = hoverItem as LineElement;

                    Model.Model model      = Model.Model.Instance;
                    GraphicView activeView = GraphicViewManager.Instance.ActiveView;
                    View.Renderer.RenderOptions options = activeView.ModelRenderer.RenderOptions;

                    if (options.ShowDeformed && model.HasResults && curve != null)
                    {
                        for (int i = 0; i < curve.Length - 1; i++)
                        {
                            hoverPainter.PaintLine(device, curve[i], curve[i + 1]);
                        }
                    }
                    else
                    {
                        hoverPainter.PaintLine(device, line);
                    }
                }

                // Show hoverPos
                Vector3 hoverPos2D = hoverPos;
                GraphicViewManager.Instance.ActiveView.Project(ref hoverPos2D);
                hoverPainter.PaintPoint(device, hoverPos2D);

                if (showingTooltip && !string.IsNullOrEmpty(tooltipText))
                {
                    // Draw tooltip rectangle
                    rectHelper.Paint(device);

                    // Draw text
                    Rectangle rect = tooltipRectangle;
                    rect.X += 4;
                    rect.Y += 2;
                    hoverPainter.DrawText(tooltipText, rect, GraphicViewManager.Instance.PrintingHiResImage ? Color.Black : Color.White);
                }
            }
        }