因此,我使用 viz.js 从点文件生成了一个 svg 图。
现在,使用 javascript 很容易选择它的元素,但我看不到与原始点文件的任何关联。我在 viz.js 库中没有看到任何对象结构,它将生成的 svg 图表元素与点源元素联系起来,所以,如果我用鼠标选择 svg 元素,我会知道这个 svg 元素是对应的到点元素,它是从它生成的。有没有办法得到这样的反馈?我需要这个,这样,如果我在 svg 中编辑一个元素(在浏览器中可视化),我将能够将编辑映射回点文件并反映源上的更改。
digraph DB {
rankdir=LR
node [shape=record]
person [
label="
Person table|
<id> Person ID|
<fn> First Name|
<mn> Middle Name|
<ln> Last Name
"
]
address [
label="
Addresses table|
<id> Address ID|
<pid> Person ID|
<index> ZIP Code|
<street> Street Name|
<house> House Number|
<town> City/Town/Village Name|
<state> State Name|
<district> County/District Name|
<country> Country Name
" …Run Code Online (Sandbox Code Playgroud) 你好,我对c/c ++语言有一些非常基本的了解,在15年前读了一本c和一本c ++书,大约一半.
大约在那个时候,在1998年至9月,我买了一本书"3D游戏编程的黑色艺术,用c编写你自己的高速3d多边形视频游戏".出版社 - Waite,作者 - Andre LaMothe.为了学习本书,它使自己定位,以便你不必知道c作为先决条件.我当时真的很想学习它,但是参与其他事情并被其他项目分心.大约在那个时候,我发现了其他几种语言.我试过perl,非常喜欢它.我很快就学会了它的基础知识,在3个月内写了我的第一个大项目+ 3个月,在perl中修复和微调它.从那时起,我开始学习更多并在perl中进行改进,所以没有时间用于c.
学习游戏和图形编程的愿望从未离开过我,所以我决定回到那本游戏编程书.我知道,你现在可以学习OpenGL或者WebGL,但是在我看来,那本书有许多低级概念,如果你不学习,你就不会像游戏编程一样好,但是,本书要求您使用MS C/C++ 7.0编译器.从那时起,我已经转移到linux(超过5年前)并且不想回到Windows.此外,无论我学习什么,我希望它是跨平台的,所以我宁愿弄清楚如何修改本书的代码以在gcc中编译,然后在wine下或在windows虚拟机中安装MS C/C++ 7.0编译器.
在书里:
//input driven event loops
//includes
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void main(void){
int done=0,
number,
num_tries=0,
guess;
//removed far from the unsigned line, because compiler complains:
//error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
// unsigned int far *clock = (unsigned int far *)0x0000046CL; //clock pointer
unsigned int *clock = (unsigned int *)0x0000046CL; //clock pointer
//section 1
printf("\nI'm thinking of …Run Code Online (Sandbox Code Playgroud)