Entities

entities/viewport

#include "dxfio/entities/viewport.hpp"

In DxfIO::Entities

struct Port

The AcDbViewport subclass of a VIEWPORT: the window on the paper and the view of model space it shows.

FieldType and defaultMeaning
CenterVectorThe center of the window, in paper space coordinates. Groups 10, 20, 30.
WidthdoubleThe width of the window, in paper space units. Group 40.
HeightdoubleThe height of the window, in paper space units. Group 41.
Statusint0 off, -1 on but not shown, or the viewport's place among those shown, 1 the active one. Group 68.
IdintThe viewport's identifier, 1 for the one that shows the paper itself. Group 69.
ViewVectorThe center of the view, in display coordinates. Groups 12, 22, from R2000.
BaseVectorThe base point of the snap. Groups 13, 23, from R2000.
SnapVectorThe spacing of the snap. Groups 14, 24, from R2000.
GridVectorThe spacing of the grid. Groups 15, 25, from R2000.
DirectionVector{Up}The direction the view looks from, toward its target, in world coordinates. Groups 16, 26, 36, from R2000.
TargetVectorThe point the view looks at, in world coordinates. Groups 17, 27, 37, from R2000.
LensdoubleThe lens length of a perspective view. Group 42, from R2000.
FrontdoubleThe offset of the front clipping plane from the target. Group 43, from R2000.
BackdoubleThe offset of the back clipping plane from the target. Group 44, from R2000.
Extentdouble{-1}The height of the view, in model space units. Group 45, from R2000.
AngledoubleThe snap angle. Group 50, from R2000.
TwistdoubleThe twist of the view. Group 51, from R2000.
Zoomint{Roundness}The circle zoom percent. Group 72, from R2000.
Frozenstd::vector<Handle>The layers frozen in this viewport alone. Group 341 before R2004, 331 from it.
Flagsint{Unflagged}1 perspective, 2 front clip, 4 back clip, 8 UCS follows, 256 snap, 512 grid, 16384 scale locked, 65536 clipped by an entity, 131072 off, among others; 32768 always set. Group 90, from R2000.
ClipHandleThe entity that clips the viewport when it is not rectangular. Group 340, from R2000.
Sheetstd::stringThe name of the plot style sheet. Group 1, from R2000.
RenderintThe render mode: 0 2D wireframe, 1 3D wireframe, 2 hidden line, 3 flat shaded, 4 Gouraud shaded, 5 and 6 the same with wireframe. Group 281, from R2000.
Followsint{1}1 when the viewport keeps its own UCS, made current when it is active. Group 71, from R2000.
Iconint1 when the UCS icon is drawn at the UCS origin. Group 74, from R2000.
AxesTables::AxesThe viewport's own UCS. Groups 110, 111, 112, 345, 346, 79 and 146, from R2000.
ShadeintHow the viewport is plotted: 0 as displayed, 1 wireframe, 2 hidden, 3 rendered. Group 170, from R2004.
Majorint{Gridmajor}How often a major grid line is drawn, in grid lines. Group 61, from R2007.
BackgroundHandleThe background drawn behind the view. Group 332, from R2007.
PlotHandleThe visual style or render preset the viewport is shade plotted with. Group 333, from R2007.
StyleHandleThe visual style the view is drawn in. Group 348, from R2007.
Litbool{true}Whether the default lighting is on. Group 292, from R2007.
Lightingint{1}The default lighting: 1 one distant light, 2 two distant lights. Group 282, from R2007.
BrightnessdoubleThe brightness of the view. Group 141, from R2007.
ContrastdoubleThe contrast of the view. Group 142, from R2007.
Ambientint{Ambience}The ambient light color, as an AutoCAD Color Index. Group 63, from R2007.
Rgbstd::optional<int>The ambient light's true color, as 0xRRGGBB. Group 421, from R2007.
Bookstd::stringThe color book of the ambient light, joined to the color's name by a $. Group 431, from R2007.
SunHandleThe SUN that lights the viewport. Group 361, from R2007.

struct ViewportVIEWPORT

A VIEWPORT: a window on a layout's paper that shows a view of model space.

FieldTypeMeaning
RecordEntities::RecordThe layer, linetype, color and the rest every entity carries.
PortBoxed<Entities::Port>The window and the view, from the AcDbViewport subclass.

Constants

Roundnessint = 100The circle zoom percent a new viewport takes, which sets how smoothly it draws circles and arcs.
Unflaggedint = 32768The status bits of a new viewport: only 32768, which AutoCAD always sets.
Gridmajorint = 5How often a new viewport draws a major grid line, as $GRIDMAJOR and a VPORT's Tables::Gridmajor: every fifth line.
Ambienceint = 250The ambient light color of a new viewport, as an AutoCAD Color Index: a dark gray.