Изменение точек объекта.
#include <gis/gis_surfacemanager.h>int gis_render_sm_userdata_edit_object_points( gis_render_sm_context_t sm_ctx, gis_userobject_t obj, double_point_t* array, int length );
surfacemanager
Функция изменяет точки пользовательского объекта.
vector<double_point_t> degree_vector;gis_userobject_t line;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 );line = gis_render_sm_userdata_add_polyline( sm_ctx, degree_vector.data(),degree_vector.size(), 0xFF00FF00, 10, 1 );degree_vector.push_back( { 25, 30 } );int res = gis_render_sm_userdata_edit_object_points( sm_ctx, line, degree_vector.data(),degree_vector.size() );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_edit_object_color()
Предыдущий раздел: Описание API картографического фреймворка