libDXF 0.0.1
A library with DXF related functions written in C.
Data Fields

dxf_viewport Struct Reference

DXF definition of an AutoCAD viewport entity (VIEWPORT). More...

#include <viewport.h>

Collaboration diagram for dxf_viewport:
Collaboration graph
[legend]

Data Fields

int id_code
char * linetype
char * layer
double elevation
double thickness
double linetype_scale
int16_t visibility
int color
int paperspace
char * dictionary_owner_soft
char * dictionary_owner_hard
double x0
double y0
double z0
double width
double height
int status
int id
char * app_name
char * viewport_data
char * window_descriptor_begin
int extended_entity_data_version
double x_target
double y_target
double z_target
double x_direction
double y_direction
double z_direction
double view_twist_angle
double view_height
double x_center
double y_center
double perspective_lens_length
double front_plane_offset
double back_plane_offset
int view_mode
int circle_zoom_percent
int fast_zoom_setting
int UCSICON_setting
int snap_on
int grid_on
int snap_style
int snap_isopair
double snap_rotation_angle
double x_snap_base
double y_snap_base
double x_snap_spacing
double y_snap_spacing
double x_grid_spacing
double y_grid_spacing
int plot_flag
char * frozen_layer_list_begin
char * frozen_layers [DXF_MAX_LAYERS]
char * frozen_layer_list_end
char * window_descriptor_end
struct DxfViewportnext

Detailed Description

DXF definition of an AutoCAD viewport entity (VIEWPORT).

In addition, the extended entity data groups in the following struct apply to viewports.

Warning:
In contrast to normal entity data, the same extended entity group code can appear multiple times, and so order is important.
Version:
According to DXF R10 (backward compatibility).
According to DXF R11 (backward compatibility).
According to DXF R12.
According to DXF R13.
According to DXF R14.

Definition at line 63 of file viewport.h.


Field Documentation

Identification number for the entity.
This is to be an unique (sequential) number in the DXF file.
Group code = 5.

Definition at line 68 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

The linetype of the entity.
Defaults to BYLAYER if ommitted in the DXF file.
Group code = 6.

Definition at line 73 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Layer on which the entity is drawn.
Defaults to layer "0" if no valid layername is given.
Group code = 8.

Definition at line 77 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Elevation in the local Z-direction.
Defaults to 0.0 if omitted in the DXF file, or prior to DXF version R12, or DXF_FLATLAND equals 0 (default).
Group code = 38.

Definition at line 81 of file viewport.h.

Referenced by dxf_viewport_init(), and dxf_viewport_write().

Thickness in the local Z-direction.
Defaults to 0.0 if ommitted in the DXF file.
Group code = 39.

Definition at line 86 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Linetype scale (optional).
Group code = 48.

Definition at line 90 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Object visibility (optional):

  1. Visible
  2. Invisible

Group code = 60.

Definition at line 93 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Color of the entity.
Defaults to BYLAYER if ommitted in the DXF file.
Note that entities encapsulated in a block with the color BYBLOCK are represented in the "native" color of the BLOCK entity.
Group code = 62.

Definition at line 100 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Entities are to be drawn on either PAPERSPACE or MODELSPACE.
Optional, defaults to DXF_MODELSPACE (0).
Group code = 67.

Definition at line 107 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Soft-pointer ID/handle to owner dictionary (optional).
Group code = 330.

Definition at line 112 of file viewport.h.

Referenced by dxf_viewport_init(), and dxf_viewport_write().

Hard owner ID/handle to owner dictionary (optional).
Group code = 360.

Definition at line 115 of file viewport.h.

Referenced by dxf_viewport_init(), and dxf_viewport_write().

X-value of the center point of entity in paper space coordinates.
Group code = 10.

Definition at line 119 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Y-value of the center point of entity in paper space coordinates.
Group code = 20.

Definition at line 123 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Z-value of the center point of entity in paper space coordinates.
Group code = 30.

Definition at line 127 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Width of the viewport in paper space units.
Group code = 40.

Definition at line 131 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Height of the viewport in paper space units.
Group code = 41.

Definition at line 134 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Viewport status field.
The value of the viewport status field is interpreted as follows:
-1 = On, but is fully off-screen or is one of the viewports not active because the $MAXACTVP count is currently being exceeded.
0 = Off.
any positive value = On, active and the value indicates the order of "stacking" for the viewports, with 1 applying to the active viewport, which is also the highest, 2 applying to the next viewport in the stack, and so on.
Group code = 68.

Definition at line 137 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Viewport ID, permanent during editing sessions, but mutable between sessions; the paper space viewport entity always has an ID of 1.
Group code = 69.

Definition at line 151 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Application name.
This field will always be the string "ACAD".
Group code = 1001.

Definition at line 156 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_init(), and dxf_viewport_read().

Begin viewport data.
This field will always be the string "MVIEW".
Other data groups may appear in the future.
Group code = 1000.

Definition at line 160 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_init(), and dxf_viewport_read().

Begin window descriptor data.
This field will always be the string "{".
Group code 1002.

Definition at line 165 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_init(), and dxf_viewport_read().

Extended entity data version number.
For Releases 11, 12, 13 and 14, this field will always be the integer 16.
Group code = 1070.

Definition at line 169 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View target point X-value.
Group code = 1010.

Definition at line 174 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View target point Y-value.
Group code = 1020.

Definition at line 177 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View target point Z-value.
Group code = 1030.

Definition at line 180 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View direction from target point X-value.
Group code = 1010.

Definition at line 183 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View direction from target point Y-value.
Group code = 1020.

Definition at line 186 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View direction from target point Z-value.
Group code = 1030.

Definition at line 189 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View twist angle.
Group code = 1040.

Definition at line 192 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View height.
Group code = 1040.

Definition at line 195 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View center point X-value.
Group code = 1040.

Definition at line 198 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View center point Y-value.
Group code = 1040.

Definition at line 201 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

group code = 1040.

Definition at line 204 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Front clip plane Z value.
Group code = 1040.

Definition at line 206 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Back clip plane Z value.
Group code = 1040.

Definition at line 209 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

View mode.
Group code = 1070.

Definition at line 212 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Circle zoom.
Group code = 1070.

Definition at line 215 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Fast zoom setting.
Group code = 1070.

Definition at line 218 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

UCSICON setting.
Group code = 1070.

Definition at line 221 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Snap ON/OFF.
Group code = 1070.

Definition at line 224 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Grid ON/OFF.
Group code = 1070.

Definition at line 227 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Snap style.
Group code = 1070.

Definition at line 230 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Snap ISOPAIR.
Group code = 1070.

Definition at line 233 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Snap angle.
Group code = 1040.

Definition at line 236 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Snap base point UCS X-coordinate.
Group code = 1040.

Definition at line 239 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Snap base point UCS Y-coordinate.
Group code = 1040.

Definition at line 242 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Snap X spacing.
Group code = 1040.

Definition at line 245 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Snap Y spacing.
Group code = 1040.

Definition at line 248 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Grid X spacing.
Group code = 1040.

Definition at line 251 of file viewport.h.

Referenced by dxf_viewport_init(), and dxf_viewport_write().

Grid Y spacing.
Group code = 1040.

Definition at line 254 of file viewport.h.

Referenced by dxf_viewport_init(), and dxf_viewport_write().

Hidden in plot flag.
Group code = 1070.

Definition at line 257 of file viewport.h.

Referenced by dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

Begin frozen layer list (possibly empty).
This field will always be the string "{".
Group code = 1002.

Definition at line 260 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_init(), and dxf_viewport_read().

char* dxf_viewport::frozen_layers[DXF_MAX_LAYERS]

The names of layers frozen in this viewport.
This list may include Xref-dependent layers.
Any number of 1003 groups may appear here.
Group code = 1003.

Todo:
Implement the number of layers in a more efficient way.
A lot of memory is consumed by reserving for DXF_MAX_LAYERS instead of the actual existing number of layers.
Maybe this can be solved by dynamically allocating a reasonable number of layers during compile time, and (re-allocating) shrinking when the actual number of layers is known during run time.

Definition at line 264 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_init(), dxf_viewport_read(), and dxf_viewport_write().

End frozen layer list.
This field will always be the string "}".
Group code = 1002.

Definition at line 279 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_init(), and dxf_viewport_read().

End viewport data.
This field will always be the string "}".
Group code = 1002.

Definition at line 283 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_init(), and dxf_viewport_read().

Pointer to the next DxfViewport.
NULL in the last DxfViewport.

Definition at line 286 of file viewport.h.

Referenced by dxf_viewport_free(), dxf_viewport_free_chain(), and dxf_viewport_init().


The documentation for this struct was generated from the following file: