internal void CopyContents(DisplayPipelineAttributes other) { IntPtr ptr_this = NonConstPointer(); IntPtr const_ptr_other = other.ConstPointer(); UnsafeNativeMethods.CDisplayPipelineAttributes_CopyContents(ptr_this, const_ptr_other); }
/// <summary> /// Capture View contents to a bitmap using display attributes to define how /// drawing is performed. /// </summary> /// <param name="size">The width and height of the returned bitmap.</param> /// <param name="attributes">The specific display mode attributes.</param> /// <returns>A new bitmap.</returns> /// <since>5.0</since> public System.Drawing.Bitmap CaptureToBitmap(System.Drawing.Size size, DisplayPipelineAttributes attributes) { IntPtr const_ptr_attributes = attributes.ConstPointer(); using (var dib = new Runtime.InteropWrappers.RhinoDib()) { var dib_pointer = dib.NonConstPointer; if (UnsafeNativeMethods.CRhinoView_CaptureToBitmap(m_runtime_serial_number, dib_pointer, size.Width, size.Height, const_ptr_attributes)) { var bitmap = dib.ToBitmap(); return(bitmap); } } return(null); }
static void OnSetDisplayAttributesProc(Guid am_id, IntPtr pConstRhinoObject, IntPtr pDisplayPipelineAttributes) { VisualAnalysisMode mode = FindLocal(am_id); if (mode != null) { var rhobj = Rhino.DocObjects.RhinoObject.CreateRhinoObjectHelper(pConstRhinoObject); DisplayPipelineAttributes attr = new DisplayPipelineAttributes(pDisplayPipelineAttributes); try { mode.SetUpDisplayAttributes(rhobj, attr); attr.m_pAttrs = IntPtr.Zero; } catch (Exception) { } } }
/// <summary> /// Captures view contents to a bitmap using display attributes to define how /// drawing is performed. /// </summary> /// <param name="attributes">The specific display mode attributes.</param> /// <returns>A new bitmap.</returns> /// <since>5.0</since> public System.Drawing.Bitmap CaptureToBitmap(DisplayPipelineAttributes attributes) { return(CaptureToBitmap(ClientRectangle.Size, attributes)); }
/// <summary> /// Capture View contents to a bitmap using a display mode description to define /// how drawing is performed. /// </summary> /// <param name="size">The width and height of the returned bitmap.</param> /// <param name="mode">The display mode.</param> /// <returns>A new bitmap.</returns> /// <since>5.0</since> public System.Drawing.Bitmap CaptureToBitmap(System.Drawing.Size size, DisplayModeDescription mode) { var attr = new DisplayPipelineAttributes(mode); return(CaptureToBitmap(size, attr)); }
/// <summary> /// If an analysis mode needs to modify display attributes, this is the place /// to do it. In particular, Style==Texture, then this function must be /// overridden. /// </summary> /// <remarks> /// Shaded analysis modes that use texture mapping, like zebra and emap, /// override this function set the tex, diffuse_color, and EnableLighting /// parameter. /// </remarks> /// <param name="obj">The object for which to set up attributes.</param> /// <param name="attributes">The linked attributes.</param> protected virtual void SetUpDisplayAttributes(Rhino.DocObjects.RhinoObject obj, DisplayPipelineAttributes attributes) { }
/// <summary> /// Capture View contents to a bitmap using a display mode description to define /// how drawing is performed. /// </summary> /// <param name="size">The width and height of the returned bitmap.</param> /// <param name="mode">The display mode.</param> /// <returns>A new bitmap.</returns> public System.Drawing.Bitmap CaptureToBitmap(System.Drawing.Size size, Rhino.Display.DisplayModeDescription mode) { Rhino.Display.DisplayPipelineAttributes attr = new DisplayPipelineAttributes(mode); return CaptureToBitmap(size, attr); }
internal MeshDisplayAttributes(DisplayPipelineAttributes parent) { m_parent = parent; }
internal void CopyContents(DisplayPipelineAttributes other) { IntPtr pThis = NonConstPointer(); IntPtr pOther = other.ConstPointer(); UnsafeNativeMethods.CDisplayPipelineAttributes_CopyContents(pThis, pOther); }
public override void CreateWorld(RhinoDoc doc, ViewInfo viewInfo, DisplayPipelineAttributes displayPipelineAttributes) { }