ViewCaptureSettings
ReferencesHolds information required to generate high resolution output of a RhinoViewport. This is used for generating paper prints or image files
Constructors
Constructor
Parameters:
| sourcePageView (RhinoPageView) | The Rhino page view to capture or print. |
| dpi (double) | Capture "density" in dots per inch. |
Constructor
public ViewCaptureSettings(ViewCaptureSettings other)
Copy constructor
Parameters:
| other (ViewCaptureSettings) | settings to copy data from |
Finalizer
~ViewCaptureSettings
#~ViewCaptureSettings()
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
Properties
Should curves and edges have their thicknesses scaled based the on the display mode settings for a view being captured (default is false)
Arrowhead size in millimeters.
Actual area of output rectangle that view capture is sent to.
Line thickness, in millimeters, used to print objects with no defined thickness.
Rectangle where drawing is confined to on MediaSize
Horizontal stretch to be applied to output. Useful for calibrating printers
Returns true if the model has been scaled to fit.
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.
Size of point objects in millimeters. if scale <= 0 the size is minimized so points are always drawn as small as possible
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.
Vertical stretch to be applied to output. Useful for calibrating printers
How the RhinoViewport is mapped to the output rectangle
Methods
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
Parameters:
| size (Size) |
Returns: new ViewCaptureSettings instance on success. Null on failure
public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
Check if the contents of this object is the same as another object
Parameters:
| other (ViewCaptureSettings) | other settings to compare against |
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
Parameters:
| 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 |
Returns: True if successful. False if unsuccessful (this could happen if there is no set device_dpi)
Returns the model scale factor.
Parameters:
| pageUnits (UnitSystem) | The current page units. |
| modelUnits (UnitSystem) | The current model units. |
Returns: The model scale factor.
Parameters:
| lengthUnits (UnitSystem) | |
| fromMargin (out bool) | |
| x (out double) | |
| y (out double) |
Get RhinoViewport that this view capture settings is targeting
Parameters:
| name (string) | |
| settings (PersistentSettings) |
Adjust crop rectangle to match the aspect ratio of the original viewport that these settings reference
Returns: true on success
public void MaximizePrintableArea()
Minimize cropping so the full drawable area is used
Parameters:
| name (string) | |
| settings (PersistentSettings) |
Set the distance from the bottom edge of the paper to the CropRectangle
Parameters:
| lengthUnits (UnitSystem) | units that distance is defined in |
| distance (double) | distance to set |
Returns: True if successful. False if unsuccessful (this could happen if there is no set device_dpi)
Set the distance from the left edge of the paper to the CropRectangle
Parameters:
| lengthUnits (UnitSystem) | units that distance is defined in |
| distance (double) | distance to set |
Returns: True if successful. False if unsuccessful (this could happen if there is no set device_dpi)
Set the distance from the right edge of the paper to the CropRectangle
Parameters:
| lengthUnits (UnitSystem) | units that distance is defined in |
| distance (double) | distance to set |
Returns: True if successful. False if unsuccessful (this could happen if there is no set device_dpi)
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
Parameters:
| 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 |
Returns: True if successful. False if unsuccessful (this could happen if there is no set device_dpi)
Set the distance from the top edge of the paper to the CropRectangle
Parameters:
| lengthUnits (UnitSystem) | units that distance is defined in |
| distance (double) | distance to set |
Returns: True if successful. False if unsuccessful (this could happen if there is no set device_dpi)
Scales the model to fit.
Parameters:
| promptOnChange (bool) | Prompt the user if the model scale will change. |
Sets the model scale to a value.
Parameters:
| scale (double) | The scale value. |
Parameters:
| lengthUnits (UnitSystem) | |
| fromMargin (bool) | |
| x (double) | |
| y (double) |
Parameters:
| viewport (RhinoViewport) |
Set the print area to a window selection based on two points in screen coordinates
Set the print area to a window selection based on two points in world coordinates