libDXF 0.0.1
A library with DXF related functions written in C.
Data Structures | Typedefs | Functions

line.h File Reference

Header file for a DXF line entity (LINE). More...

#include "global.h"
#include "binary_graphics_data.h"
#include "point.h"
Include dependency graph for line.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dxf_line_struct
 DXF definition of an AutoCAD line entity. More...

Typedefs

typedef struct dxf_line_struct DxfLine
 DXF definition of an AutoCAD line entity.

Functions

DxfLinedxf_line_new ()
 Allocate memory for a DXF LINE entity.
DxfLinedxf_line_init (DxfLine *line)
 Allocate memory and initialize data fields in a DXF LINE entity.
DxfLinedxf_line_read (DxfFile *fp, DxfLine *line)
 Read data from a DXF file into a DXF LINE entity.
int dxf_line_write (DxfFile *fp, DxfLine *line)
 Write DXF output to fp for a DXF LINE entity.
int dxf_line_free (DxfLine *line)
 Free the allocated memory for a DXF LINE entity and all it's data fields.
void dxf_line_free_chain (DxfLine *lines)
 Free the allocated memory for a chain of DXF LINE entities and all their data fields.
int dxf_line_get_id_code (DxfLine *line)
 Get the ID code from a DXF LINE entity.
DxfLinedxf_line_set_id_code (DxfLine *line, int id_code)
 Set the ID code for a DXF LINE entity.
char * dxf_line_get_linetype (DxfLine *line)
 Get the linetype from a DXF LINE entity.
DxfLinedxf_line_set_linetype (DxfLine *line, char *linetype)
 Set the linetype for a DXF LINE entity.
char * dxf_line_get_layer (DxfLine *line)
 Get the layer from a DXF LINE entity.
DxfLinedxf_line_set_layer (DxfLine *line, char *layer)
 Set the layer for a DXF LINE entity.
double dxf_line_get_elevation (DxfLine *line)
 Get the elevation from a DXF LINE entity.
DxfLinedxf_line_set_elevation (DxfLine *line, double elevation)
 Set the elevation for a DXF LINE entity.
double dxf_line_get_thickness (DxfLine *line)
 Get the thickness from a DXF LINE entity.
DxfLinedxf_line_set_thickness (DxfLine *line, double thickness)
 Set the thickness for a DXF LINE entity.
double dxf_line_get_linetype_scale (DxfLine *line)
 Get the linetype scale from a DXF LINE entity.
DxfLinedxf_line_set_linetype_scale (DxfLine *line, double linetype_scale)
 Set the linetype scale for a DXF LINE entity.
int16_t dxf_line_get_visibility (DxfLine *line)
 Get the visibility from a DXF LINE entity.
DxfLinedxf_line_set_visibility (DxfLine *line, int16_t visibility)
 Set the visibility for a DXF LINE entity.
int dxf_line_get_color (DxfLine *line)
 Get the color from a DXF LINE entity.
DxfLinedxf_line_set_color (DxfLine *line, int color)
 Set the color for a DXF LINE entity.
int dxf_line_get_paperspace (DxfLine *line)
 Get the paperspace flag value from a DXF LINE entity.
DxfLinedxf_line_set_paperspace (DxfLine *line, int paperspace)
 Set the paperspace flag for a DXF LINE entity.
int dxf_line_get_graphics_data_size (DxfLine *line)
 Get the graphics_data_size value from a DXF LINE entity.
DxfLinedxf_line_set_graphics_data_size (DxfLine *line, int graphics_data_size)
 Set the graphics_data_size value for a DXF LINE entity.
int16_t dxf_line_get_shadow_mode (DxfLine *line)
 Get the shadow_mode from a DXF LINE entity.
DxfLinedxf_line_set_shadow_mode (DxfLine *line, int16_t shadow_mode)
 Set the shadow_mode for a DXF LINE entity.
DxfBinaryGraphicsDatadxf_line_get_binary_graphics_data (DxfLine *line)
 Get the pointer to the binary_graphics_data from a DXF LINE entity.
DxfLinedxf_line_set_binary_graphics_data (DxfLine *line, DxfBinaryGraphicsData *data)
 Set the pointer to the binary_graphics_data for a DXF LINE entity.
char * dxf_line_get_dictionary_owner_soft (DxfLine *line)
 Get the soft pointer to the dictionary owner from a DXF LINE entity.
DxfLinedxf_line_set_dictionary_owner_soft (DxfLine *line, char *dictionary_owner_soft)
 Set the pointer to the dictionary_owner_soft for a DXF LINE entity.
char * dxf_line_get_material (DxfLine *line)
 Get the pointer to the material from a DXF LINE entity.
DxfLinedxf_line_set_material (DxfLine *line, char *material)
 Set the pointer to the material for a DXF LINE entity.
char * dxf_line_get_dictionary_owner_hard (DxfLine *line)
 Get the hard pointer to the dictionary owner from a DXF LINE entity.
DxfLinedxf_line_set_dictionary_owner_hard (DxfLine *line, char *dictionary_owner_hard)
 Set the pointer to the dictionary_owner_hard for a DXF LINE entity.
int16_t dxf_line_get_lineweight (DxfLine *line)
 Get the lineweight from a DXF LINE entity.
DxfLinedxf_line_set_lineweight (DxfLine *line, int16_t lineweight)
 Set the lineweight for a DXF LINE entity.
char * dxf_line_get_plot_style_name (DxfLine *line)
 Get the plot_style_name from a DXF LINE entity.
DxfLinedxf_line_set_plot_style_name (DxfLine *line, char *plot_style_name)
 Set the plot_style_name for a DXF LINE entity.
long dxf_line_get_color_value (DxfLine *line)
 Get the color_value from a DXF LINE entity.
DxfLinedxf_line_set_color_value (DxfLine *line, long color_value)
 Set the color_value for a DXF LINE entity.
char * dxf_line_get_color_name (DxfLine *line)
 Get the color_name from a DXF LINE entity.
DxfLinedxf_line_set_color_name (DxfLine *line, char *color_name)
 Set the color_name for a DXF LINE entity.
long dxf_line_get_transparency (DxfLine *line)
 Get the transparency from a DXF LINE entity.
DxfLinedxf_line_set_transparency (DxfLine *line, long transparency)
 Set the transparency for a DXF LINE entity.
DxfPointdxf_line_get_p0 (DxfLine *line)
 Get the start point p0 of a DXF LINE entity.
DxfLinedxf_line_set_p0 (DxfLine *line, DxfPoint *p0)
 Set the start point p0 of a DXF LINE entity.
double dxf_line_get_x0 (DxfLine *line)
 Get the X-value of the start point x0 of a DXF LINE entity.
DxfLinedxf_line_set_x0 (DxfLine *line, double x0)
 Set the X-value of the start point x0 of a DXF LINE entity.
double dxf_line_get_y0 (DxfLine *line)
 Get the Y-value of the start point y0 of a DXF LINE entity.
DxfLinedxf_line_set_y0 (DxfLine *line, double y0)
 Set the Y-value of the start point y0 of a DXF LINE entity.
double dxf_line_get_z0 (DxfLine *line)
 Get the Z-value of the start point z0 of a DXF LINE entity.
DxfLinedxf_line_set_z0 (DxfLine *line, double z0)
 Set the Z-value of the start point z0 of a DXF LINE entity.
DxfPointdxf_line_get_p1 (DxfLine *line)
 Get the end point p1 of a DXF LINE entity.
DxfLinedxf_line_set_p1 (DxfLine *line, DxfPoint *p1)
 Set the end point p1 of a DXF LINE entity.
double dxf_line_get_x1 (DxfLine *line)
 Get the X-value of the end point x1 of a DXF LINE entity.
DxfLinedxf_line_set_x1 (DxfLine *line, double x1)
 Set the X-value of the end point x1 of a DXF LINE entity.
double dxf_line_get_y1 (DxfLine *line)
 Get the Y-value of the end point y1 of a DXF LINE entity.
DxfLinedxf_line_set_y1 (DxfLine *line, double y1)
 Set the Y-value of the end point y1 of a DXF LINE entity.
double dxf_line_get_z1 (DxfLine *line)
 Get the Z-value of the end point z1 of a DXF LINE entity.
DxfLinedxf_line_set_z1 (DxfLine *line, double z1)
 Set the Z-value of the end point z1 of a DXF LINE entity.
double dxf_line_get_extr_x0 (DxfLine *line)
 Get the X-value of the extrusion vector of a DXF LINE entity.
DxfLinedxf_line_set_extr_x0 (DxfLine *line, double extr_x0)
 Set the X-value of the extrusion vector of a DXF LINE entity.
double dxf_line_get_extr_y0 (DxfLine *line)
 Get the Y-value of the extrusion vector of a DXF LINE entity.
DxfLinedxf_line_set_extr_y0 (DxfLine *line, double extr_y0)
 Set the Y-value of the extrusion vector of a DXF LINE entity.
double dxf_line_get_extr_z0 (DxfLine *line)
 Get the Z-value of the extrusion vector of a DXF LINE entity.
DxfLinedxf_line_set_extr_z0 (DxfLine *line, double extr_z0)
 Set the Z-value of the extrusion vector of a DXF LINE entity.
DxfPointdxf_line_get_extrusion_vector_as_point (DxfLine *line)
 Get the extrusion vector as a DXF POINT entity from a DXF LINE entity.
DxfLinedxf_line_set_extrusion_vector (DxfLine *line, double extr_x0, double extr_y0, double extr_z0)
 Set the extrusion vector for a DXF LINE entity.
DxfLinedxf_line_get_next (DxfLine *line)
 Get the pointer to the next LINE entity from a DXF LINE entity.
DxfLinedxf_line_set_next (DxfLine *line, DxfLine *next)
 Set the pointer to the next LINE for a DXF LINE entity.
DxfLinedxf_line_get_last (DxfLine *line)
 Get the pointer to the last LINE entity from a linked list of DXF LINE entities.
DxfPointdxf_line_calculate_mid_point (DxfLine *line, int id_code, int inheritance)
 Calculate the mid point of a DXF LINE entity.
double dxf_line_calculate_length (DxfLine *line)
 Calculate the length of a DXF LINE (straight distance between start point and end point).
DxfLinedxf_line_create_from_points (DxfPoint *p1, DxfPoint *p2, int id_code, int inheritance)
 Create a DXF LINE by means of two DXF POINT entities.

Detailed Description

Header file for a DXF line entity (LINE).

Author:
Copyright (C) 2008, 2010, 2012, 2013, 2014, 2015, 2016, 2017 by Bert Timmerman <bert.timmerman@xs4all.nl>.
Version:
According to DXF R10.
According to DXF R11.
According to DXF R12.
According to DXF R13.
According to DXF R14.

Copyright Notices.


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to:
Free Software Foundation, Inc.,
59 Temple Place,
Suite 330,
Boston,
MA 02111 USA.

Drawing eXchange Format (DXF) is a defacto industry standard for the exchange of drawing files between various Computer Aided Drafting programs.
DXF is an industry standard designed by Autodesk(TM).
For more details see http://www.autodesk.com .


Definition in file line.h.


Typedef Documentation

typedef struct dxf_line_struct DxfLine

DXF definition of an AutoCAD line entity.


Function Documentation

DxfLine* dxf_line_new ( )

Allocate memory for a DXF LINE entity.

Fill the memory contents with zeros.

Returns:
NULL when no memory was allocated, a pointer to the allocated memory when succesful.

Definition at line 54 of file line.c.

References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_init(), and dxf_line_read().

DxfLine* dxf_line_init ( DxfLine line)
DxfLine* dxf_line_read ( DxfFile fp,
DxfLine line 
)

Read data from a DXF file into a DXF LINE entity.

The last line read from file contained the string "LINE".
Now follows some data for the LINE, to be terminated with a " 0" string announcing the following entity, or the end of the ENTITY section marker ENDSEC.
While parsing the DXF file store data in line.

Returns:
a pointer to line.
Parameters:
fpDXF file pointer to an input file (or device).
lineDXF line entity.

Definition at line 169 of file line.c.

References _, dxf_line_struct::binary_graphics_data, dxf_line_struct::color, dxf_line_struct::color_name, dxf_line_struct::color_value, dxf_binary_graphics_data_struct::data_line, dxf_line_struct::dictionary_owner_hard, dxf_line_struct::dictionary_owner_soft, dxf_binary_graphics_data_init(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, dxf_line_get_layer(), dxf_line_get_linetype(), dxf_line_init(), dxf_line_new(), dxf_line_set_layer(), dxf_line_set_linetype(), dxf_line_struct::elevation, dxf_line_struct::extr_x0, dxf_line_struct::extr_y0, dxf_line_struct::extr_z0, dxf_file_struct::filename, dxf_file_struct::fp, dxf_line_struct::graphics_data_size, dxf_line_struct::id_code, dxf_line_struct::layer, dxf_file_struct::line_number, dxf_line_struct::linetype, dxf_line_struct::linetype_scale, dxf_line_struct::lineweight, dxf_line_struct::material, dxf_binary_graphics_data_struct::next, dxf_line_struct::p0, dxf_line_struct::p1, dxf_line_struct::paperspace, dxf_line_struct::plot_style_name, dxf_line_struct::shadow_mode, dxf_line_struct::thickness, dxf_line_struct::transparency, dxf_line_struct::visibility, dxf_point_struct::x0, dxf_point_struct::y0, and dxf_point_struct::z0.

Here is the call graph for this function:

int dxf_line_write ( DxfFile fp,
DxfLine line 
)

Write DXF output to fp for a DXF LINE entity.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occured.

Todo:
for version R14.
Implementing the start of application-defined group "{application_name", with Group code 102.
For example: "{ACAD_REACTORS" indicates the start of the AutoCAD persistent reactors group.

application-defined codes: Group codes and values within the 102 groups are application defined (optional).

End of group, "}" (optional), with Group code 102.

Parameters:
fpDXF file pointer to an output file (or device).
lineDXF line entity.

Definition at line 477 of file line.c.

References _, dxf_file_struct::acad_version_number, AutoCAD_11, AutoCAD_12, AutoCAD_13, AutoCAD_14, AutoCAD_2000, AutoCAD_2002, AutoCAD_2004, AutoCAD_2008, AutoCAD_2009, dxf_binary_graphics_data_get_data_line(), dxf_binary_graphics_data_get_next(), DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, dxf_entity_skip(), DXF_FLATLAND, dxf_line_get_binary_graphics_data(), dxf_line_get_color(), dxf_line_get_color_name(), dxf_line_get_color_value(), dxf_line_get_dictionary_owner_hard(), dxf_line_get_dictionary_owner_soft(), dxf_line_get_elevation(), dxf_line_get_extr_x0(), dxf_line_get_extr_y0(), dxf_line_get_extr_z0(), dxf_line_get_graphics_data_size(), dxf_line_get_id_code(), dxf_line_get_layer(), dxf_line_get_linetype(), dxf_line_get_linetype_scale(), dxf_line_get_lineweight(), dxf_line_get_material(), dxf_line_get_paperspace(), dxf_line_get_plot_style_name(), dxf_line_get_shadow_mode(), dxf_line_get_thickness(), dxf_line_get_transparency(), dxf_line_get_visibility(), dxf_line_get_x0(), dxf_line_get_x1(), dxf_line_get_y0(), dxf_line_get_y1(), dxf_line_get_z0(), dxf_line_get_z1(), dxf_line_set_layer(), dxf_line_set_linetype(), DXF_PAPERSPACE, and dxf_file_struct::fp.

Here is the call graph for this function:

int dxf_line_free ( DxfLine line)

Free the allocated memory for a DXF LINE entity and all it's data fields.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
linePointer to the memory occupied by the DXF LINE entity.

Definition at line 681 of file line.c.

References _, dxf_binary_graphics_data_free_chain(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_get_binary_graphics_data(), dxf_line_get_color_name(), dxf_line_get_dictionary_owner_hard(), dxf_line_get_dictionary_owner_soft(), dxf_line_get_layer(), dxf_line_get_linetype(), dxf_line_get_material(), dxf_line_get_p0(), dxf_line_get_p1(), dxf_line_get_plot_style_name(), dxf_point_free(), and dxf_line_struct::next.

Referenced by dxf_line_free_chain().

Here is the call graph for this function:

void dxf_line_free_chain ( DxfLine lines)

Free the allocated memory for a chain of DXF LINE entities and all their data fields.

Parameters:
linespointer to the chain of DXF LINE entities.

Definition at line 730 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_free(), and dxf_line_struct::next.

Here is the call graph for this function:

int dxf_line_get_id_code ( DxfLine line)

Get the ID code from a DXF LINE entity.

Returns:
ID code.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 763 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::id_code.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_id_code ( DxfLine line,
int  id_code 
)

Set the ID code for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
id_codeIdentification number for the entity.
This is to be an unique (sequential) number in the DXF file.

Definition at line 798 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::id_code.

Referenced by dxf_line_init().

char* dxf_line_get_linetype ( DxfLine line)

Get the linetype from a DXF LINE entity.

Returns:
linetype when sucessful, NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 840 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::linetype.

Referenced by dxf_line_free(), dxf_line_read(), and dxf_line_write().

DxfLine* dxf_line_set_linetype ( DxfLine line,
char *  linetype 
)

Set the linetype for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
linetypea string containing the linetype for the entity.

Definition at line 875 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::linetype.

Referenced by dxf_line_init(), dxf_line_read(), and dxf_line_write().

char* dxf_line_get_layer ( DxfLine line)

Get the layer from a DXF LINE entity.

Returns:
layer when sucessful, NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 915 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::layer.

Referenced by dxf_line_free(), dxf_line_read(), and dxf_line_write().

DxfLine* dxf_line_set_layer ( DxfLine line,
char *  layer 
)

Set the layer for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
layera string containing the layer for the entity.

Definition at line 950 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::layer.

Referenced by dxf_line_init(), dxf_line_read(), and dxf_line_write().

double dxf_line_get_elevation ( DxfLine line)

Get the elevation from a DXF LINE entity.

Returns:
elevation.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 990 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::elevation.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_elevation ( DxfLine line,
double  elevation 
)

Set the elevation for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
elevationthe elevation to be set for the entity.

Definition at line 1018 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::elevation.

Referenced by dxf_line_init().

double dxf_line_get_thickness ( DxfLine line)

Get the thickness from a DXF LINE entity.

Returns:
thickness.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1051 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::thickness.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_thickness ( DxfLine line,
double  thickness 
)

Set the thickness for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
thicknessthe thickness to be set for the entity.

Definition at line 1086 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::thickness.

Referenced by dxf_line_init().

double dxf_line_get_linetype_scale ( DxfLine line)

Get the linetype scale from a DXF LINE entity.

Returns:
linetype scale.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1126 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::linetype_scale.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_linetype_scale ( DxfLine line,
double  linetype_scale 
)

Set the linetype scale for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
linetype_scalethe linetype scale to be set for the entity.

Definition at line 1161 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::linetype_scale.

Referenced by dxf_line_init().

int16_t dxf_line_get_visibility ( DxfLine line)

Get the visibility from a DXF LINE entity.

Returns:
visibility.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1201 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::visibility.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_visibility ( DxfLine line,
int16_t  visibility 
)

Set the visibility for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
visibilitythe visibility to be set for the entity.

Definition at line 1243 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::visibility.

Referenced by dxf_line_init().

int dxf_line_get_color ( DxfLine line)

Get the color from a DXF LINE entity.

Returns:
color.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1290 of file line.c.

References _, dxf_line_struct::color, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_color ( DxfLine line,
int  color 
)

Set the color for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
colorthe color to be set for the entity.

Definition at line 1324 of file line.c.

References _, dxf_line_struct::color, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_init().

int dxf_line_get_paperspace ( DxfLine line)

Get the paperspace flag value from a DXF LINE entity.

Returns:
paperspace flag value.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1365 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::paperspace.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_paperspace ( DxfLine line,
int  paperspace 
)

Set the paperspace flag for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
paperspacethe paperspace flag value to be set for the entity.

Definition at line 1405 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::paperspace.

Referenced by dxf_line_init().

int dxf_line_get_graphics_data_size ( DxfLine line)

Get the graphics_data_size value from a DXF LINE entity.

Returns:
graphics_data_size value when successful, or EXIT_FAILURE when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1454 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::graphics_data_size.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_graphics_data_size ( DxfLine line,
int  graphics_data_size 
)

Set the graphics_data_size value for a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
graphics_data_sizethe graphics_data_size value to be set for the entity.

Definition at line 1498 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::graphics_data_size.

Referenced by dxf_line_init().

int16_t dxf_line_get_shadow_mode ( DxfLine line)

Get the shadow_mode from a DXF LINE entity.

Returns:
shadow_mode when successful, or EXIT_FAILURE when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1546 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::shadow_mode.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_shadow_mode ( DxfLine line,
int16_t  shadow_mode 
)

Set the shadow_mode for a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
shadow_modethe shadow mode to be set for the entity.

Definition at line 1591 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::shadow_mode.

Referenced by dxf_line_init().

DxfBinaryGraphicsData* dxf_line_get_binary_graphics_data ( DxfLine line)

Get the pointer to the binary_graphics_data from a DXF LINE entity.

Returns:
pointer to the binary_graphics_data.
Warning:
No checks are performed on the returned pointer.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1641 of file line.c.

References _, dxf_line_struct::binary_graphics_data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_free(), and dxf_line_write().

DxfLine* dxf_line_set_binary_graphics_data ( DxfLine line,
DxfBinaryGraphicsData data 
)

Set the pointer to the binary_graphics_data for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
dataa string containing the pointer to the binary_graphics_data for the entity.

Definition at line 1677 of file line.c.

References _, dxf_line_struct::binary_graphics_data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_init().

char* dxf_line_get_dictionary_owner_soft ( DxfLine line)

Get the soft pointer to the dictionary owner from a DXF LINE entity.

Returns:
soft pointer to the dictionary owner.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1721 of file line.c.

References _, dxf_line_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_free(), and dxf_line_write().

DxfLine* dxf_line_set_dictionary_owner_soft ( DxfLine line,
char *  dictionary_owner_soft 
)

Set the pointer to the dictionary_owner_soft for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
dictionary_owner_softa string containing the pointer to the dictionary_owner_soft for the entity.

Definition at line 1757 of file line.c.

References _, dxf_line_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_init().

char* dxf_line_get_material ( DxfLine line)

Get the pointer to the material from a DXF LINE entity.

Returns:
a pointer to material when successful, or NULL when an error occurred.
Warning:
No checks are performed on the returned pointer.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1802 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::material.

Referenced by dxf_line_free(), and dxf_line_write().

DxfLine* dxf_line_set_material ( DxfLine line,
char *  material 
)

Set the pointer to the material for a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
materiala string containing the pointer to the material for the entity.

Definition at line 1841 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::material.

Referenced by dxf_line_init().

char* dxf_line_get_dictionary_owner_hard ( DxfLine line)

Get the hard pointer to the dictionary owner from a DXF LINE entity.

Returns:
hard pointer to the dictionary owner.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1885 of file line.c.

References _, dxf_line_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_free(), and dxf_line_write().

DxfLine* dxf_line_set_dictionary_owner_hard ( DxfLine line,
char *  dictionary_owner_hard 
)

Set the pointer to the dictionary_owner_hard for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
dictionary_owner_harda string containing the pointer to the dictionary_owner_hard for the entity.

Definition at line 1921 of file line.c.

References _, dxf_line_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_init().

int16_t dxf_line_get_lineweight ( DxfLine line)

Get the lineweight from a DXF LINE entity.

Returns:
lineweight when successful, or EXIT_FAILURE when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 1963 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::lineweight.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_lineweight ( DxfLine line,
int16_t  lineweight 
)

Set the lineweight for a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
lineweightthe lineweight to be set for the entity.

Definition at line 1994 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::lineweight.

Referenced by dxf_line_init().

char* dxf_line_get_plot_style_name ( DxfLine line)

Get the plot_style_name from a DXF LINE entity.

Returns:
a pointer to plot_style_name when sucessful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2028 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::plot_style_name.

Referenced by dxf_line_free(), and dxf_line_write().

DxfLine* dxf_line_set_plot_style_name ( DxfLine line,
char *  plot_style_name 
)

Set the plot_style_name for a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
plot_style_namea string containing the plot_style_name for the entity.

Definition at line 2066 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::plot_style_name.

Referenced by dxf_line_init().

long dxf_line_get_color_value ( DxfLine line)

Get the color_value from a DXF LINE entity.

Returns:
color_value when successful, or EXIT_FAILURE when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2108 of file line.c.

References _, dxf_line_struct::color_value, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_color_value ( DxfLine line,
long  color_value 
)

Set the color_value for a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
color_valuethe color_value to be set for the entity.

Definition at line 2139 of file line.c.

References _, dxf_line_struct::color_value, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_init().

char* dxf_line_get_color_name ( DxfLine line)

Get the color_name from a DXF LINE entity.

Returns:
color_name when sucessful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2173 of file line.c.

References _, dxf_line_struct::color_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_free(), and dxf_line_write().

DxfLine* dxf_line_set_color_name ( DxfLine line,
char *  color_name 
)

Set the color_name for a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
color_namea string containing the color_name for the entity.

Definition at line 2211 of file line.c.

References _, dxf_line_struct::color_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_line_init().

long dxf_line_get_transparency ( DxfLine line)

Get the transparency from a DXF LINE entity.

Returns:
transparency when successful, or EXIT_FAILURE when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2253 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::transparency.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_transparency ( DxfLine line,
long  transparency 
)

Set the transparency for a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
transparencythe transparency to be set for the entity.

Definition at line 2284 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::transparency.

Referenced by dxf_line_init().

DxfPoint* dxf_line_get_p0 ( DxfLine line)

Get the start point p0 of a DXF LINE entity.

Returns:
the start point p0.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2317 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::p0.

Referenced by dxf_line_free(), and dxf_line_init().

DxfLine* dxf_line_set_p0 ( DxfLine line,
DxfPoint p0 
)

Set the start point p0 of a DXF LINE entity.

Returns:
a pointer to a DXF LINE entity.
Parameters:
linea pointer to a DXF LINE entity.
p0a pointer to a DXF POINT entity.

Definition at line 2354 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::p0.

Referenced by dxf_line_init().

double dxf_line_get_x0 ( DxfLine line)

Get the X-value of the start point x0 of a DXF LINE entity.

Returns:
the X-value of the start point x0.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2395 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p0, and dxf_point_struct::x0.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_x0 ( DxfLine line,
double  x0 
)

Set the X-value of the start point x0 of a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
x0the X-value of the start point x0 of a DXF LINE entity.

Definition at line 2435 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p0, and dxf_point_struct::x0.

Referenced by dxf_line_init().

double dxf_line_get_y0 ( DxfLine line)

Get the Y-value of the start point y0 of a DXF LINE entity.

Returns:
the Y-value of the start point y0.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2477 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p0, and dxf_point_struct::y0.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_y0 ( DxfLine line,
double  y0 
)

Set the Y-value of the start point y0 of a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
y0the Y-value of the start point y0 of a DXF line entity.

Definition at line 2517 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p0, and dxf_point_struct::y0.

Referenced by dxf_line_init().

double dxf_line_get_z0 ( DxfLine line)

Get the Z-value of the start point z0 of a DXF LINE entity.

Returns:
the Z-value of the start point z0.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2559 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p0, and dxf_point_struct::z0.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_z0 ( DxfLine line,
double  z0 
)

Set the Z-value of the start point z0 of a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
z0the Z-value of the start point z0 of a DXF line entity.

Definition at line 2599 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p0, and dxf_point_struct::z0.

Referenced by dxf_line_init().

DxfPoint* dxf_line_get_p1 ( DxfLine line)

Get the end point p1 of a DXF LINE entity.

Returns:
the end point p1.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2640 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::p1.

Referenced by dxf_line_free().

DxfLine* dxf_line_set_p1 ( DxfLine line,
DxfPoint p1 
)

Set the end point p1 of a DXF LINE entity.

Returns:
a pointer to a DXF LINE entity.
Parameters:
linea pointer to a DXF LINE entity.
p1a pointer to a DXF POINT entity.

Definition at line 2677 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::p1.

Referenced by dxf_line_init().

double dxf_line_get_x1 ( DxfLine line)

Get the X-value of the end point x1 of a DXF LINE entity.

Returns:
the X-value of the end point x1.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2718 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p1, and dxf_point_struct::x0.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_x1 ( DxfLine line,
double  x1 
)

Set the X-value of the end point x1 of a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
x1the X-value of the end point x1 of a DXF LINE entity.

Definition at line 2758 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p1, and dxf_point_struct::x0.

Referenced by dxf_line_init().

double dxf_line_get_y1 ( DxfLine line)

Get the Y-value of the end point y1 of a DXF LINE entity.

Returns:
the Y-value of the end point y1.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2800 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p1, and dxf_point_struct::y0.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_y1 ( DxfLine line,
double  y1 
)

Set the Y-value of the end point y1 of a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
y1the Y-value of the end point y1 of a DXF line entity.

Definition at line 2840 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p1, and dxf_point_struct::y0.

Referenced by dxf_line_init().

double dxf_line_get_z1 ( DxfLine line)

Get the Z-value of the end point z1 of a DXF LINE entity.

Returns:
the Z-value of the end point z1.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2882 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p1, and dxf_point_struct::z0.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_z1 ( DxfLine line,
double  z1 
)

Set the Z-value of the end point z1 of a DXF LINE entity.

Returns:
a pointer to line when successful, or NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
z1the Z-value of the end point z1 of a DXF line entity.

Definition at line 2922 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p1, and dxf_point_struct::z0.

Referenced by dxf_line_init().

double dxf_line_get_extr_x0 ( DxfLine line)

Get the X-value of the extrusion vector of a DXF LINE entity.

Returns:
the X-value of the extrusion vector.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 2964 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::extr_x0.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_extr_x0 ( DxfLine line,
double  extr_x0 
)

Set the X-value of the extrusion vector of a DXF LINE entity.

Returns:
a pointer to a DXF LINE entity when successful, NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
extr_x0the X-value of the extrusion vector of a DXF LINE entity.

Definition at line 2997 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::extr_x0.

Referenced by dxf_line_init().

double dxf_line_get_extr_y0 ( DxfLine line)

Get the Y-value of the extrusion vector of a DXF LINE entity.

Returns:
the Y-value of the extrusion vector.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 3032 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::extr_y0.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_extr_y0 ( DxfLine line,
double  extr_y0 
)

Set the Y-value of the extrusion vector of a DXF LINE entity.

Returns:
a pointer to a DXF LINE entity when successful, NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
extr_y0the Y-value of the extrusion vector of a DXF LINE entity.

Definition at line 3065 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::extr_y0.

Referenced by dxf_line_init().

double dxf_line_get_extr_z0 ( DxfLine line)

Get the Z-value of the extrusion vector of a DXF LINE entity.

Returns:
the Z-value of the extrusion vector.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 3100 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::extr_z0.

Referenced by dxf_line_write().

DxfLine* dxf_line_set_extr_z0 ( DxfLine line,
double  extr_z0 
)

Set the Z-value of the extrusion vector of a DXF LINE entity.

Returns:
a pointer to a DXF LINE entity when successful, NULL when an error occurred.
Parameters:
linea pointer to a DXF LINE entity.
extr_z0the Z-value of the extrusion vector of a DXF POLYLINE entity.

Definition at line 3133 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::extr_z0.

Referenced by dxf_line_init().

DxfPoint* dxf_line_get_extrusion_vector_as_point ( DxfLine line)

Get the extrusion vector as a DXF POINT entity from a DXF LINE entity.

Returns:
a DXF POINT containing the extrusion coordinates.
Warning:
No other members are copied into the DXF POINT.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 3170 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_point_init(), dxf_line_struct::extr_x0, dxf_line_struct::extr_y0, dxf_line_struct::extr_z0, dxf_line_struct::p0, dxf_line_struct::p1, dxf_point_struct::x0, dxf_point_struct::y0, and dxf_point_struct::z0.

Here is the call graph for this function:

DxfLine* dxf_line_set_extrusion_vector ( DxfLine line,
double  extr_x0,
double  extr_y0,
double  extr_z0 
)

Set the extrusion vector for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
extr_x0X-value of the extrusion direction.
extr_y0Y-value of the extrusion direction.
extr_z0Z-value of the extrusion direction.

Definition at line 3220 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::extr_x0, dxf_line_struct::extr_y0, and dxf_line_struct::extr_z0.

DxfLine* dxf_line_get_next ( DxfLine line)

Get the pointer to the next LINE entity from a DXF LINE entity.

Returns:
pointer to the next LINE entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 3262 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::next.

DxfLine* dxf_line_set_next ( DxfLine line,
DxfLine next 
)

Set the pointer to the next LINE for a DXF LINE entity.

Parameters:
linea pointer to a DXF LINE entity.
nexta pointer to the next LINE for the entity.

Definition at line 3298 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::next.

Referenced by dxf_line_init().

DxfLine* dxf_line_get_last ( DxfLine line)

Get the pointer to the last LINE entity from a linked list of DXF LINE entities.

Returns:
pointer to the last LINE entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 3341 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_line_struct::next.

DxfPoint* dxf_line_calculate_mid_point ( DxfLine line,
int  id_code,
int  inheritance 
)

Calculate the mid point of a DXF LINE entity.

Returns:
the mid point.
Parameters:
linea pointer to a DXF LINE entity.
id_codeIdentification number for the entity.
This is to be an unique (sequential) number in the DXF file.
inheritanceInherit layer, linetype, color and other relevant properties from either:

  1. Default (as initialised).
  2. LINE.

Definition at line 3383 of file line.c.

References _, dxf_line_struct::color, dxf_line_struct::dictionary_owner_hard, dxf_line_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_point_init(), dxf_line_struct::id_code, dxf_line_struct::layer, dxf_line_struct::linetype, dxf_line_struct::linetype_scale, dxf_line_struct::p0, dxf_line_struct::p1, dxf_line_struct::paperspace, dxf_line_struct::thickness, dxf_line_struct::visibility, dxf_point_struct::x0, dxf_point_struct::y0, and dxf_point_struct::z0.

Here is the call graph for this function:

double dxf_line_calculate_length ( DxfLine line)

Calculate the length of a DXF LINE (straight distance between start point and end point).

Returns:
the length of the line in drawing units.
Parameters:
linea pointer to a DXF LINE entity.

Definition at line 3491 of file line.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_struct::p0, dxf_line_struct::p1, dxf_point_struct::x0, dxf_point_struct::y0, and dxf_point_struct::z0.

DxfLine* dxf_line_create_from_points ( DxfPoint p1,
DxfPoint p2,
int  id_code,
int  inheritance 
)

Create a DXF LINE by means of two DXF POINT entities.

Returns:
NULL when failed, a pointer to the DXF LINE entity when successful.
Warning:
Both DXF POINT entities need to be freed by the caller.

Todo:
Do a deep copy of binary_graphics_data.
Todo:
Do a deep copy of binary_graphics_data.

Parameters:
p1a pointer to a DXF POINT entity.
p2a pointer to a DXF POINT entity.
id_codeIdentification number for the entity.
This is to be an unique (sequential) number in the DXF file.
inheritanceInherit layer, linetype, color and other relevant properties from either:

  1. Default (as initialised).
  2. Point 1.
  3. Point 2.

Definition at line 3541 of file line.c.

References _, dxf_point_struct::binary_graphics_data, dxf_point_struct::color, dxf_point_struct::color_name, dxf_point_struct::color_value, dxf_point_struct::dictionary_owner_hard, dxf_point_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_line_init(), dxf_point_struct::graphics_data_size, dxf_line_struct::id_code, dxf_point_struct::layer, dxf_point_struct::linetype, dxf_point_struct::linetype_scale, dxf_point_struct::lineweight, dxf_point_struct::material, dxf_point_struct::paperspace, dxf_point_struct::plot_style_name, dxf_point_struct::shadow_mode, dxf_point_struct::thickness, dxf_point_struct::transparency, dxf_point_struct::visibility, dxf_point_struct::x0, dxf_point_struct::y0, and dxf_point_struct::z0.

Here is the call graph for this function: