static void draw_console_layer (void) { cairo_surface_t *surf; cairo_matrix_t matrix; surf = console_render_to_cairo_surface (); xcairo_surface_mark_dirty (surf); compute_transform (&matrix, CONSOLE_OFFSET_X, CONSOLE_OFFSET_Y, 0.0, 0.0, 0.0, CONSOLE_EXPANSION); paint_transformed_image (main_screen_context, &matrix, surf); xcairo_surface_destroy (surf); }
/** Scanner */ PointCloud<PointNormal>::Ptr Scanner::getCloud(Scan scan, Model &model) { PointCloud<PointNormal>::Ptr cloud (new PointCloud<PointNormal>()); vtkSmartPointer<vtkTransform> transform = compute_transform(scan, model); PointCloud<PointXYZ>::Ptr pcxyz = compute_pcxyz(model, transform); float v[3]; transform->GetPosition(v); PointCloud<Normal>::Ptr pcn = compute_pcn(pcxyz, v[0], v[1], v[2]); concatenateFields(*pcxyz, *pcn, *cloud); return cloud; }
static void draw_obj (int id) { cairo_surface_t *surf; cairo_matrix_t matrix; double x, y, rotation_center_x, rotation_center_y; double rotation, expansion; surf = obj_render_to_cairo_surface (id); xcairo_surface_mark_dirty (surf); obj_get_location (id, &x, &y, &rotation_center_x, &rotation_center_y, &rotation, &expansion); compute_transform (&matrix, x, y, rotation_center_x, rotation_center_y, rotation, expansion); paint_transformed_image (main_screen_context, &matrix, surf); xcairo_surface_destroy (surf); }
static void draw_background_layer (bg_index_t layer) { cairo_surface_t *surf; cairo_matrix_t matrix; double scroll_x, scroll_y, rotation_center_x, rotation_center_y; double rotation, expansion; surf = bg_get_cairo_surface (layer); xcairo_surface_mark_dirty (surf); bg_get_transform (layer, &scroll_x, &scroll_y, &rotation_center_x, &rotation_center_y, &rotation, &expansion); compute_transform (&matrix, scroll_x, scroll_y, rotation_center_x, rotation_center_y, rotation, expansion); if (layer >= BG_MAIN_0 && layer <= BG_MAIN_3) paint_transformed_image (main_screen_context, &matrix, surf); else paint_transformed_image (sub_screen_context, &matrix, surf); // xcairo_surface_destroy (surf); }