libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF line entity (LINE
).
More...
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 | |
DxfLine * | dxf_line_new () |
Allocate memory for a DXF LINE entity. | |
DxfLine * | dxf_line_init (DxfLine *line) |
Allocate memory and initialize data fields in a DXF LINE entity. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_line_set_shadow_mode (DxfLine *line, int16_t shadow_mode) |
Set the shadow_mode for a DXF LINE entity. | |
DxfBinaryGraphicsData * | dxf_line_get_binary_graphics_data (DxfLine *line) |
Get the pointer to the binary_graphics_data from a DXF LINE entity. | |
DxfLine * | dxf_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. | |
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. | |
char * | dxf_line_get_material (DxfLine *line) |
Get the pointer to the material from a DXF LINE entity. | |
DxfLine * | dxf_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. | |
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. | |
int16_t | dxf_line_get_lineweight (DxfLine *line) |
Get the lineweight from a DXF LINE entity. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_line_set_transparency (DxfLine *line, long transparency) |
Set the transparency for a DXF LINE entity. | |
DxfPoint * | dxf_line_get_p0 (DxfLine *line) |
Get the start point p0 of a DXF LINE entity. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_line_set_z0 (DxfLine *line, double z0) |
Set the Z-value of the start point z0 of a DXF LINE entity. | |
DxfPoint * | dxf_line_get_p1 (DxfLine *line) |
Get the end point p1 of a DXF LINE entity. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_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. | |
DxfLine * | dxf_line_set_extr_z0 (DxfLine *line, double extr_z0) |
Set the Z-value of the extrusion vector of a DXF LINE entity. | |
DxfPoint * | dxf_line_get_extrusion_vector_as_point (DxfLine *line) |
Get the extrusion vector as a DXF POINT entity from a DXF LINE entity. | |
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. | |
DxfLine * | dxf_line_get_next (DxfLine *line) |
Get the pointer to the next LINE entity from a DXF LINE entity. | |
DxfLine * | dxf_line_set_next (DxfLine *line, DxfLine *next) |
Set the pointer to the next LINE for a DXF LINE entity. | |
DxfLine * | dxf_line_get_last (DxfLine *line) |
Get the pointer to the last LINE entity from a linked list of DXF LINE entities. | |
DxfPoint * | dxf_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). | |
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. |
Header file for a DXF line entity (LINE
).
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 struct dxf_line_struct DxfLine |
DXF definition of an AutoCAD line entity.
DxfLine* dxf_line_new | ( | ) |
Allocate memory for a DXF LINE
entity.
Fill the memory contents with zeros.
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().
Allocate memory and initialize data fields in a DXF LINE
entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. line | DXF line entity. |
Definition at line 92 of file line.c.
References _, dxf_binary_graphics_data_new(), DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_DEFAULT_LINETYPE_SCALE, DXF_DEFAULT_VISIBILITY, dxf_line_get_p0(), dxf_line_new(), dxf_line_set_binary_graphics_data(), dxf_line_set_color(), dxf_line_set_color_name(), dxf_line_set_color_value(), dxf_line_set_dictionary_owner_hard(), dxf_line_set_dictionary_owner_soft(), dxf_line_set_elevation(), dxf_line_set_extr_x0(), dxf_line_set_extr_y0(), dxf_line_set_extr_z0(), dxf_line_set_graphics_data_size(), dxf_line_set_id_code(), dxf_line_set_layer(), dxf_line_set_linetype(), dxf_line_set_linetype_scale(), dxf_line_set_lineweight(), dxf_line_set_material(), dxf_line_set_next(), dxf_line_set_p0(), dxf_line_set_p1(), dxf_line_set_paperspace(), dxf_line_set_plot_style_name(), dxf_line_set_shadow_mode(), dxf_line_set_thickness(), dxf_line_set_transparency(), dxf_line_set_visibility(), dxf_line_set_x0(), dxf_line_set_x1(), dxf_line_set_y0(), dxf_line_set_y1(), dxf_line_set_z0(), dxf_line_set_z1(), DXF_MODELSPACE, dxf_point_init(), and dxf_point_new().
Referenced by dxf_line_create_from_points(), and dxf_line_read().
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
.
line
. fp | DXF file pointer to an input file (or device). |
line | DXF 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.
Write DXF output to fp for a DXF LINE
entity.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occured. fp | DXF file pointer to an output file (or device). |
line | DXF 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.
int dxf_line_free | ( | DxfLine * | line | ) |
Free the allocated memory for a DXF LINE
entity and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. line | Pointer 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().
void dxf_line_free_chain | ( | DxfLine * | lines | ) |
Free the allocated memory for a chain of DXF LINE
entities and all their data fields.
lines | pointer 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.
int dxf_line_get_id_code | ( | DxfLine * | line | ) |
Get the ID code from a DXF LINE
entity.
line | a 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().
Set the ID code for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
id_code | Identification 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.
NULL
when an error occurred. line | a 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().
Set the linetype for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
linetype | a 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.
NULL
when an error occurred. line | a 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().
Set the layer for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
layer | a 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.
line | a 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().
Set the elevation for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
elevation | the 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.
line | a 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().
Set the thickness for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
thickness | the 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.
line | a 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().
Set the linetype scale for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
linetype_scale | the 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.
line | a 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().
Set the visibility for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
visibility | the 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.
line | a 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().
Set the color for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
color | the 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.
line | a 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().
Set the paperspace flag for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
paperspace | the 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.
graphics_data_size
value when successful, or EXIT_FAILURE
when an error occurred. line | a 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().
Set the graphics_data_size
value for a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
graphics_data_size | the 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.
shadow_mode
when successful, or EXIT_FAILURE
when an error occurred. line | a 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().
Set the shadow_mode
for a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
shadow_mode | the 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.
binary_graphics_data
.line | a 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.
line | a pointer to a DXF LINE entity. |
data | a 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.
line | a 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().
Set the pointer to the dictionary_owner_soft for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
dictionary_owner_soft | a 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.
material
when successful, or NULL
when an error occurred.line | a 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().
Set the pointer to the material
for a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
material | a 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.
line | a 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().
Set the pointer to the dictionary_owner_hard for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
dictionary_owner_hard | a 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.
lineweight
when successful, or EXIT_FAILURE
when an error occurred. line | a 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().
Set the lineweight
for a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
lineweight | the 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.
plot_style_name
when sucessful, or NULL
when an error occurred. line | a 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().
Set the plot_style_name
for a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
plot_style_name | a 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.
color_value
when successful, or EXIT_FAILURE
when an error occurred. line | a 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().
Set the color_value
for a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
color_value | the 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.
color_name
when sucessful, or NULL
when an error occurred. line | a 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().
Set the color_name
for a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
color_name | a 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.
transparency
when successful, or EXIT_FAILURE
when an error occurred. line | a 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().
Set the transparency
for a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
transparency | the 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().
Get the start point p0
of a DXF LINE
entity.
p0
. line | a 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().
Set the start point p0
of a DXF LINE
entity.
LINE
entity. line | a pointer to a DXF LINE entity. |
p0 | a 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.
x0
. line | a 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().
Set the X-value of the start point x0
of a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
x0 | the 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.
y0
. line | a 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().
Set the Y-value of the start point y0
of a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
y0 | the 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.
z0
. line | a 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().
Set the Z-value of the start point z0
of a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
z0 | the 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().
Get the end point p1
of a DXF LINE
entity.
p1
. line | a 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().
Set the end point p1
of a DXF LINE
entity.
LINE
entity. line | a pointer to a DXF LINE entity. |
p1 | a 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.
x1
. line | a 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().
Set the X-value of the end point x1
of a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
x1 | the 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.
y1
. line | a 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().
Set the Y-value of the end point y1
of a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
y1 | the 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.
z1
. line | a 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().
Set the Z-value of the end point z1
of a DXF LINE
entity.
line
when successful, or NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
z1 | the 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.
line | a 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().
Set the X-value of the extrusion vector of a DXF LINE
entity.
LINE
entity when successful, NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
extr_x0 | the 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.
line | a 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().
Set the Y-value of the extrusion vector of a DXF LINE
entity.
LINE
entity when successful, NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
extr_y0 | the 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.
line | a 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().
Set the Z-value of the extrusion vector of a DXF LINE
entity.
LINE
entity when successful, NULL
when an error occurred. line | a pointer to a DXF LINE entity. |
extr_z0 | the 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().
Get the extrusion vector as a DXF POINT
entity from a DXF LINE
entity.
POINT
containing the extrusion coordinates.POINT
. line | a 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.
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.
line | a pointer to a DXF LINE entity. |
extr_x0 | X-value of the extrusion direction. |
extr_y0 | Y-value of the extrusion direction. |
extr_z0 | Z-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.
Get the pointer to the next LINE
entity from a DXF LINE
entity.
LINE
entity.line | a 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.
Set the pointer to the next LINE
for a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
next | a 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().
Get the pointer to the last LINE
entity from a linked list of DXF LINE
entities.
LINE
entity.line | a 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.
Calculate the mid point of a DXF LINE
entity.
line | a pointer to a DXF LINE entity. |
id_code | Identification number for the entity. This is to be an unique (sequential) number in the DXF file. |
inheritance | Inherit layer, linetype, color and other relevant properties from either:
|
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.
double dxf_line_calculate_length | ( | DxfLine * | line | ) |
Calculate the length of a DXF LINE
(straight distance between start point and end point).
line
in drawing units. line | a 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.
Create a DXF LINE
by means of two DXF POINT
entities.
NULL
when failed, a pointer to the DXF LINE
entity when successful.POINT
entities need to be freed by the caller. binary_graphics_data
. binary_graphics_data
. p1 | a pointer to a DXF POINT entity. |
p2 | a pointer to a DXF POINT entity. |
id_code | Identification number for the entity. This is to be an unique (sequential) number in the DXF file. |
inheritance | Inherit layer, linetype, color and other relevant properties from either:
|
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.