⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ins_base.c

📁 AutoCAD DWG-file viewer
💻 C
字号:
/****************************************************************/
/*			COPYRIGHT NOTICE			*/
/*			----------------			*/
/*  All software in this listing remain the strict copyright	*/
/*  of Ilija Kovacevic and cannot be copied or used in any way	*/
/*  except by written permission of Ilija Kovacevic.		*/
/*								*/
/*	Copyright (c) 1992 Ilija Kovacevic			*/
/*	www.kov.com   email ilija@kov.com			*/
/****************************************************************/

#include "dwgin.h"

PUBLIC AcadInsertBase *AcadInsertBase__create( void )

{
return( ( AcadInsertBase * )get_memory( sizeof( AcadInsertBase ) ) );
}


PUBLIC void AcadInsertBase__delete( AcadInsertBase *me )

{
free( ( char * )me );
}


PUBLIC int AcadInsertBase__length( AcadInsertBase *me )

{
return( me->common.size );
}


PUBLIC void AcadInsertBase__read( AcadInsertBase *me )

{
/*INT16 length;*/
AcadEntity__read_elevation_etc( &me->common,true,true );

get_DOUBLE( &me->x );
get_DOUBLE( &me->y );
/*
if( __drawing->acad11 )
	{
	get_INT16( &length );
	memcpy( me->buffer,__drawing->file_pointer,length );
	me->buffer[ length ] = NULL;
	__drawing->file_position += length;
	__drawing->file_pointer += length;
	}
*/
}


PUBLIC void AcadInsertBase__dump_to_debug_file( AcadInsertBase *me )

{
dprintf( "INSERT BASE\n" );
dprintf( "\toffset %lf,%lf\n",me->x,me->y );
AcadEntity__dump_to_debug_file( &me->common );
}


PUBLIC void AcadInsertBase__dxfout( AcadInsertBase *me )

{
int flag;

AcadEntity__dxfout( &me->common );
dxf_string( 2,this_block_full_name( &flag ) );
dxf_INT16( 70,flag );
dxf_DOUBLE( 10,me->x );
dxf_DOUBLE( 20,me->y );
if ( !__drawing->header->flatland ) dxf_DOUBLE( 30,me->common.elevation );
dxf_string( 3,this_block_name() );
}


PUBLIC void AcadInsertBase__write( AcadInsertBase *me )

{
int size;

put_UINT8( 0xc );  /* INSERT BASE TYPE */
size = sizeof( DOUBLE )*2+1;

me->common.pflags &= 0xfb; 
AcadEntity__write_elevation_etc( &me->common,false,true,size );
if ( debugger ) dprintf( "\tinsert base entity\n" );
put_DOUBLE( me->x );
put_DOUBLE( me->y );
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -