Удаление пользовательского объекта.
#include <gis/gis_surfacemanager.h>int gis_render_sm_userdata_delete_object( gis_render_sm_context_t sm_ctx, gis_userobject_t obj );
surfacemanager
Функция удаляет пользовательский объект.
vector<double_point_t> degree_vector;gis_userobject_t poly;uint32_t color = 0xFFFF00FF;uint32_t border_color = 0xFFABABAB;degree_vector.push_back( { 25, 20 } );degree_vector.push_back( { 25, 25 } );gis_render_sm_context_t sm_ctx;gis_data_engine_context_t ctx;gis_core_connection_t connection;gis_core_link_init( &connection );gis_core_link_connect( &connection, 777 );uint32_t width = 100;uint32_t height = 100;gis_data_engine_alloc( width, height, GIS_DATA_ENGINE_MODE_SM, GIS_DATA_ENGINE_BPP_32, &connection, &ctx );gis_render_sm_alloc( &sm_ctx, ctx, 1000, 0.5, 0 );poly = gis_render_sm_userdata_add_polygon( sm_ctx, degree_vector.data(),degree_vector.size(), color, border_color );int res = gis_render_sm_userdata_delete_object( sm_ctx, poly );int retval = 0;if ( res != EOK )retval += 1;gis_render_sm_free( &sm_ctx );gis_data_engine_free( &ctx );gis_core_databuffer_detach();gis_core_link_destroy( &connection, true );return retval;
ПК ЦКИ для ЗОСРВ «Нейтрино»
gis_render_sm_context_t, gis_render_sm_userdata_add_polygon()
Предыдущий раздел: Описание API картографического фреймворка