示例#1
0
        private static void CRhinoObjectGrips_Draw(int serial_number, IntPtr pDrawSettings)
        {
            CustomObjectGrips grips = FromSerialNumber(serial_number);

            if (grips != null)
            {
                try
                {
                    GripsDrawEventArgs args = new GripsDrawEventArgs(pDrawSettings);
                    grips.OnDraw(args);
                    args.m_pGripsDrawSettings = IntPtr.Zero; // don't let the args hold onto a pointer
                }
                catch (Exception ex)
                {
                    Rhino.Runtime.HostUtils.ExceptionReport(ex);
                }
            }
        }
示例#2
0
        /// <summary>
        /// Draws the grips. In your implementation, override this if you need to draw
        /// dynamic elements and then call this base implementation to draw the grips themselves.
        /// </summary>
        /// <param name="args">The grips draw event arguments.</param>
        protected virtual void OnDraw(GripsDrawEventArgs args)
        {
            IntPtr pThis = NonConstPointer();

            UnsafeNativeMethods.CRhinoObjectGrips_DrawBase(pThis, args.m_pGripsDrawSettings);
        }
示例#3
0
 internal GripStatus(GripsDrawEventArgs parent, int index)
 {
     m_parent = parent;
     m_index  = index;
 }
 private static void CRhinoObjectGrips_Draw(int serial_number, IntPtr pDrawSettings)
 {
   CustomObjectGrips grips = FromSerialNumber(serial_number);
   if (grips != null)
   {
     try
     {
       GripsDrawEventArgs args = new GripsDrawEventArgs(pDrawSettings);
       grips.OnDraw(args);
       args.m_pGripsDrawSettings = IntPtr.Zero; // don't let the args hold onto a pointer
     }
     catch (Exception ex)
     {
       Rhino.Runtime.HostUtils.ExceptionReport(ex);
     }
   }
 }
 /// <summary>
 /// Draws the grips. In your implementation, override this if you need to draw
 /// dynamic elements and then call this base implementation to draw the grips themselves.
 /// </summary>
 /// <param name="args">The grips draw event arguments.</param>
 protected virtual void OnDraw(GripsDrawEventArgs args)
 {
   IntPtr pThis = NonConstPointer();
   UnsafeNativeMethods.CRhinoObjectGrips_DrawBase(pThis, args.m_pGripsDrawSettings);
 }
 internal GripStatus(GripsDrawEventArgs parent, int index)
 {
   m_parent = parent;
   m_index = index;
 }
 /// <summary>
 /// CustomObjectGrips override
 /// </summary>
 protected override void OnDraw(GripsDrawEventArgs args)
 {
     UpdateGrips();
       if (m_draw_rectangle && args.DrawDynamicStuff)
       {
     for (var i = 1; i < 5; i++)
     {
       var start = i - 1;
       var end = i;
       args.DrawControlPolygonLine(m_active_rectangle[start], m_active_rectangle[end], start, end);
     }
       }
       base.OnDraw(args);
 }