ViewCaptureSettings

References
Holds information required to generate high resolution output of a RhinoViewport. This is used for generating paper prints or image files

Constructors

ViewCaptureSettings

#Since v6.0
public ViewCaptureSettings()
Construct default view capture settings

ViewCaptureSettings

#Since v6.0
public ViewCaptureSettings(RhinoPageView sourcePageView, double dpi)
Constructor
sourcePageView (RhinoPageView)The Rhino page view to capture or print.
dpi (double)Capture "density" in dots per inch.

ViewCaptureSettings

#Since v6.0
public ViewCaptureSettings(RhinoView sourceView, Size mediaSize, double dpi)
Constructor
sourceView (RhinoView)The Rhino view to capture or print.
mediaSize (Size)The size of the output media.
dpi (double)Capture "density" in dots per inch.

ViewCaptureSettings

#Since v8.5
public ViewCaptureSettings(ViewCaptureSettings other)
Copy constructor
other (ViewCaptureSettings)settings to copy data from

Finalizer

~ViewCaptureSettings

#
~ViewCaptureSettings()
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().

Properties

ApplyDisplayModeThicknessScales

#Since v8.5
public bool ApplyDisplayModeThicknessScales { get; set; }
Should curves and edges have their thicknesses scaled based the on the display mode settings for a view being captured (default is false)

ArrowheadSizeMillimeters

#Since v6.15
public double ArrowheadSizeMillimeters { get; set; }
Arrowhead size in millimeters.

CropRectangle

#Since v6.0
public Rectangle CropRectangle { get; }
Actual area of output rectangle that view capture is sent to.

DefaultPrintWidthMillimeters

#Since v6.15
public double DefaultPrintWidthMillimeters { get; set; }
Line thickness, in millimeters, used to print objects with no defined thickness.

Document

#Since v6.15
public RhinoDoc Document { get; set; }

DrawAxis

#Since v6.0
public bool DrawAxis { get; set; }

DrawBackground

#Since v6.0
public bool DrawBackground { get; set; }

DrawBackgroundBitmap

#Since v6.2
public bool DrawBackgroundBitmap { get; set; }

DrawClippingPlanes

#Since v6.0
public bool DrawClippingPlanes { get; set; }

DrawGrid

#Since v6.0
public bool DrawGrid { get; set; }

DrawLights

#Since v6.0
public bool DrawLights { get; set; }

DrawLockedObjects

#Since v6.0
public bool DrawLockedObjects { get; set; }

DrawMargins

#Since v6.0
public bool DrawMargins { get; set; }

DrawRectangle

#Since v8.5
public Rectangle DrawRectangle { get; }
Rectangle where drawing is confined to on MediaSize

DrawSelectedObjectsOnly

#Since v6.0
public bool DrawSelectedObjectsOnly { get; set; }

DrawWallpaper

#Since v6.2
public bool DrawWallpaper { get; set; }

FooterText

#Since v7.6
public string FooterText { get; set; }
Text drawn at the bottom of the output

HeaderText

#Since v7.6
public string HeaderText { get; set; }
Text drawn at the top of the output

HorizontalScale

#Since v8.4
public double HorizontalScale { get; set; }
Horizontal stretch to be applied to output. Useful for calibrating printers

IsScaleToFit

#Since v6.21
public bool IsScaleToFit { get; }
Returns true if the model has been scaled to fit.

IsValid

#Since v6.0
public bool IsValid { get; }

LinetypeWidthUnitsArePageLengths

#Since v8.0
public bool LinetypeWidthUnitsArePageLengths { get; set; }

MatchLinetypePatternDefinition

#Since v7.6
public bool MatchLinetypePatternDefinition { get; set; }
Default is true. Linetype scales are normally generated right before printing/view capture in order to get linetypes to print to the same lengths as defined. If false, the linetypes are not scaled and the current pattern lengths as seen on the screen as used.

MediaSize

#Since v6.0
public Size MediaSize { get; }
Total size of the image or page in dots

ModelScaleType

#Since v6.21
public int ModelScaleType { get; set; }

OffsetAnchor

#Since v6.2
public ViewCaptureSettings.AnchorLocation OffsetAnchor { get; set; }

OutputColor

#Since v6.8
public ViewCaptureSettings.ColorMode OutputColor { get; set; }

PointSizeMillimeters

#Since v6.15
public double PointSizeMillimeters { get; set; }
Size of point objects in millimeters. if scale <= 0 the size is minimized so points are always drawn as small as possible

RasterMode

#Since v6.17
public bool RasterMode { get; set; }

Resolution

#Since v6.0
public double Resolution { get; set; }
Capture "density" in dots per inch.

TextDotPointSize

#Since v7.27
public double TextDotPointSize { get; set; }
Font point size use for printing text dots. The default value is 10.0. This has morphed into a scale setting as individual text dots have their own sizes. A value of 20 will print dots at double of their size setting while a value of 10 will print with no scaling applied.

UsePrintWidths

#Since v6.15
public bool UsePrintWidths { get; set; }

VerticalScale

#Since v8.4
public double VerticalScale { get; set; }
Vertical stretch to be applied to output. Useful for calibrating printers

ViewArea

#Since v7.7
public ViewCaptureSettings.ViewAreaMapping ViewArea { get; set; }
How the RhinoViewport is mapped to the output rectangle

WireThicknessScale

#Since v6.15
public double WireThicknessScale { get; set; }
Scaling factor to apply to object print widths (typically 1.0). This is helpful when printing something at 1/2 scale and having all of the curves print 1/2 as thick.

Methods

CreatePreviewSettings

#Since v7.9
public ViewCaptureSettings CreatePreviewSettings(Size size)
Create a ViewCaptureSettings based on this instance, but scaled to fit in a different sized area. Scaling is also performed on dpi. This is primarily used to for capturing images that are shown as print previews
size (Size)
new ViewCaptureSettings instance on success. Null on failure

Dispose

#Since v6.0
public void Dispose()
Actively reclaims unmanaged resources that this instance uses.

Equals

#Since v8.5
[ConstOperation] public bool Equals(ViewCaptureSettings other)
Check if the contents of this object is the same as another object
other (ViewCaptureSettings)other settings to compare against

GetMargins

#Since v6.2
public bool GetMargins(UnitSystem lengthUnits, out double left, out double top, out double right, out double bottom)
Get distances from the edge of the paper (MediaSize) to the CropRectangle in a defined unit system
lengthUnits (UnitSystem)Units to get distances in
left (out double)Distance from left edge of paper to left edge of CropRectangle
top (out double)Distance from top edge of paper to top edge of CropRectangle
right (out double)Distance from right edge of paper to right edge of CropRectangle
bottom (out double)Distance from bottom edge of paper to bottom edge of CropRectangle
True if successful. False if unsuccessful (this could happen if there is no set device_dpi)

GetModelScale

#Since v6.21
public double GetModelScale(UnitSystem pageUnits, UnitSystem modelUnits)
Returns the model scale factor.
pageUnits (UnitSystem)The current page units.
modelUnits (UnitSystem)The current model units.
The model scale factor.

GetOffset

#Since v6.2
public void GetOffset(UnitSystem lengthUnits, out bool fromMargin, out double x, out double y)
lengthUnits (UnitSystem)
fromMargin (out bool)
x (out double)
y (out double)

GetViewport

#Since v8.0
public RhinoViewport GetViewport()
Get RhinoViewport that this view capture settings is targeting

Load

#Since v8.1
public bool Load(string name, PersistentSettings settings)
name (string)
settings (PersistentSettings)

MatchViewportAspectRatio

#Since v7.9
public bool MatchViewportAspectRatio()
Adjust crop rectangle to match the aspect ratio of the original viewport that these settings reference
true on success

MaximizePrintableArea

#Since v7.9
public void MaximizePrintableArea()
Minimize cropping so the full drawable area is used

Save

#Since v8.1
public void Save(string name, PersistentSettings settings)
name (string)
settings (PersistentSettings)

SetLayout

#Since v6.0
public void SetLayout(Size mediaSize, Rectangle cropRectangle)
mediaSize (Size)
cropRectangle (Rectangle)

SetMarginBottom

#Since v8.5
public bool SetMarginBottom(UnitSystem lengthUnits, double distance)
Set the distance from the bottom edge of the paper to the CropRectangle
lengthUnits (UnitSystem)units that distance is defined in
distance (double)distance to set
True if successful. False if unsuccessful (this could happen if there is no set device_dpi)

SetMarginLeft

#Since v8.5
public bool SetMarginLeft(UnitSystem lengthUnits, double distance)
Set the distance from the left edge of the paper to the CropRectangle
lengthUnits (UnitSystem)units that distance is defined in
distance (double)distance to set
True if successful. False if unsuccessful (this could happen if there is no set device_dpi)

SetMarginRight

#Since v8.5
public bool SetMarginRight(UnitSystem lengthUnits, double distance)
Set the distance from the right edge of the paper to the CropRectangle
lengthUnits (UnitSystem)units that distance is defined in
distance (double)distance to set
True if successful. False if unsuccessful (this could happen if there is no set device_dpi)

SetMargins

#Since v6.2
public bool SetMargins(UnitSystem lengthUnits, double left, double top, double right, double bottom)
Set distances from the edge of the paper (MediaSize) to the CropRectange in a defined unit system
lengthUnits (UnitSystem)Units that left, top, right, and bottom are defined in
left (double)Distance from left edge of paper to left edge of CropRectangle
top (double)Distance from top edge of paper to top edge of CropRectangle
right (double)Distance from right edge of paper to right edge of CropRectangle
bottom (double)Distance from bottom edge of paper to bottom edge of CropRectangle
True if successful. False if unsuccessful (this could happen if there is no set device_dpi)

SetMarginTop

#Since v8.5
public bool SetMarginTop(UnitSystem lengthUnits, double distance)
Set the distance from the top edge of the paper to the CropRectangle
lengthUnits (UnitSystem)units that distance is defined in
distance (double)distance to set
True if successful. False if unsuccessful (this could happen if there is no set device_dpi)

SetModelScaleToFit

#Since v6.21
public void SetModelScaleToFit(bool promptOnChange)
Scales the model to fit.
promptOnChange (bool)Prompt the user if the model scale will change.

SetModelScaleToValue

#Since v6.21
public void SetModelScaleToValue(double scale)
Sets the model scale to a value.
scale (double)The scale value.

SetOffset

#Since v6.2
public void SetOffset(UnitSystem lengthUnits, bool fromMargin, double x, double y)
lengthUnits (UnitSystem)
fromMargin (bool)
x (double)
y (double)

SetViewport

#Since v6.15
public void SetViewport(RhinoViewport viewport)
viewport (RhinoViewport)

SetWindowRect

#Since v7.4
public void SetWindowRect(Point2d screenPoint1, Point2d screenPoint2)
Set the print area to a window selection based on two points in screen coordinates
screenPoint1 (Point2d)first point; it doesn't matter what corner of the rectangle this point represents
screenPoint2 (Point2d)point representing opposite corner of rectangle from screenPoint1

SetWindowRect

#Since v7.4
public void SetWindowRect(Point3d worldPoint1, Point3d worldPoint2)
Set the print area to a window selection based on two points in world coordinates
worldPoint1 (Point3d)First point in world coordinates. This point is projected to screen coordinates
worldPoint2 (Point3d)Second point in world coordinates. This point is projected to screen coordinates