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
Construct default view capture settings
public ViewCaptureSettings()

ViewCaptureSettings

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

ViewCaptureSettings

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

ViewCaptureSettings

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

Finalizer

~ViewCaptureSettings

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

Properties

ApplyDisplayModeThicknessScales

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

ArrowheadSizeMillimeters

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

CropRectangle

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

DefaultPrintWidthMillimeters

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

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
Rectangle where drawing is confined to on MediaSize
public Rectangle DrawRectangle { get; }

DrawSelectedObjectsOnly

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

DrawWallpaper

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

FooterText

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

HeaderText

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

HorizontalScale

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

IsScaleToFit

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

IsValid

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

LinetypeWidthUnitsArePageLengths

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

MatchLinetypePatternDefinition

#Since v7.6
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.
public bool MatchLinetypePatternDefinition { get; set; }

MediaSize

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

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
Size of point objects in millimeters. if scale <= 0 the size is minimized so points are always drawn as small as possible
public double PointSizeMillimeters { get; set; }

RasterMode

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

Resolution

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

TextDotPointSize

#Since v7.27
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.
public double TextDotPointSize { get; set; }

UsePrintWidths

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

VerticalScale

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

ViewArea

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

WireThicknessScale

#Since v6.15
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.
public double WireThicknessScale { get; set; }

Methods

CreatePreviewSettings

#Since v7.9
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
public ViewCaptureSettings CreatePreviewSettings(
size
)
new ViewCaptureSettings instance on success. Null on failure

Dispose

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

Equals

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

GetMargins

#Since v6.2
Get distances from the edge of the paper (MediaSize) to the CropRectangle in a defined unit system
public bool GetMargins(
lengthUnits,
Units to get distances in
out double
left,
Distance from left edge of paper to left edge of CropRectangle
out double
top,
Distance from top edge of paper to top edge of CropRectangle
out double
right,
Distance from right edge of paper to right edge of CropRectangle
out double
bottom
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
Returns the model scale factor.
public double GetModelScale(
pageUnits,
The current page units.
modelUnits
The current model units.
)
The model scale factor.

GetOffset

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

GetViewport

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

Load

#Since v8.1
public bool Load()

MatchViewportAspectRatio

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

MaximizePrintableArea

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

Save

#Since v8.1
public void Save()

SetLayout

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

SetMarginBottom

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

SetMarginLeft

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

SetMarginRight

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

SetMargins

#Since v6.2
Set distances from the edge of the paper (MediaSize) to the CropRectange in a defined unit system
public bool SetMargins(
lengthUnits,
Units that left, top, right, and bottom are defined in
left,
Distance from left edge of paper to left edge of CropRectangle
top,
Distance from top edge of paper to top edge of CropRectangle
right,
Distance from right edge of paper to right edge of CropRectangle
bottom
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
Set the distance from the top edge of the paper to the CropRectangle
public bool SetMarginTop(
lengthUnits,
units that distance is defined in
distance
distance to set
)
True if successful. False if unsuccessful (this could happen if there is no set device_dpi)

SetModelScaleToFit

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

SetModelScaleToValue

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

SetOffset

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

SetViewport

#Since v6.15
public void SetViewport(
viewport
)

SetWindowRect

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

SetWindowRect

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