- Now handles spaces in filenames under Windows

- Disabled Delete Map and New Map functions in readonly mode
- Preparation for SVG exports:
        - Added vector types: Subobj/obj (to draw filled objects), Poly
        - Modified vector type "box" to take a "fill colour" argument
        - Removed vector types Fill and Fillbox
- Rewrote entire objects.dat file to avoid use of "fill" command
- Can now export to SVG files (same with ".SVG" extension)
- Improved behaviour of grid with respect to link endpoints when
  moving & resizing objects
- Grid lines now look more visio-like
- Removed grid size of '5' as this was too small to be useful
- Changed default grid size from 10 to 15.
This commit is contained in:
Rob Pearce 2005-11-18 08:39:29 +00:00
parent edb6d59b81
commit 3b9cbee30c
7 changed files with 1255 additions and 871 deletions

View File

@ -1,14 +1,25 @@
Ideas for future versions:
- Fix the bug where netmapr crashes on my 24-bit Truecolour display under
Solaris (and possibly other platforms)
- Export diagrams to XML
- Export diagrams to some format which Visio can import
- Perhaps change to SVG for objects
- Add more objects (eg. broadband router, etc)
- Implement a toggle-able traffic flow display (for example, you might click
a button and have arrows appear to show all SMTP mail flows)
- Add more objects:
House
Phone
Version 1.5:
- Now handles spaces in filenames under Windows
- Disabled Delete Map and New Map functions in readonly mode
- Preparation for SVG exports:
- Added vector types: Subobj/obj (to draw filled objects), Poly
- Modified vector type "box" to take a "fill colour" argument
- Removed vector types Fill and Fillbox
- Rewrote entire objects.dat file to avoid use of "fill" command
- Can now export to SVG files (same with ".SVG" extension)
- Improved behaviour of grid with respect to link endpoints when
moving & resizing objects
- Grid lines now look more visio-like
- Removed grid size of '5' as this was too small to be useful
- Changed default grid size from 10 to 15.
Version 1.4:
- Rewrote Command Reference document (simplified and now includes screenshots)

View File

@ -1,4 +1,4 @@
#define VERSION "1.4"
#define VERSION "1.5"
#define SMALLBUFLEN 64
#define BUFLEN 512
@ -76,8 +76,10 @@
#define VT_DOT (2)
#define VT_FILL (3)
#define VT_ELLIPSE (4)
#define VT_FILLBOX (5)
#define VT_POLY (5)
#define VT_BEZIER (6)
#define VT_ENDPOLY (7)
#define VT_SUBOBJ (8)
#define TRUE (-1)
#define FALSE (0)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 18 KiB

1123
netmapr.c

File diff suppressed because it is too large Load Diff

View File

@ -70,6 +70,7 @@ typedef struct {
int x1,y1;
int x2,y2;
SDL_Color c;
SDL_Color fc;
} vector_t;
typedef struct {
@ -167,7 +168,7 @@ map_t map[MAXMAPS];
char typedesc[6][BUFLEN];
void addlinkpoint(int linkid, int x, int y);
int addvector(vectorimg_t *vimg, int type, int x1, int y1, int x2, int y2, SDL_Color *c);
int addvector(vectorimg_t *vimg, int type, int x1, int y1, int x2, int y2, SDL_Color *c, SDL_Color *fc);
void changegridsize(void);
void changelinearrow(int changeby);
void changelinestyle(int changeby);
@ -185,8 +186,7 @@ void deletetext(int textid);
void drawarrowhead(SDL_Surface *screen, double x1, double y1, double x2, double y2, SDL_Color c, int arrowstyle, int arrowpos);
void lerp(int *newx, int *newy, int ax, int ay, int bx, int by, float t);
void drawbezier(SDL_Surface *screen, int x1, int y1, int x2,int y2, int x3,int y3, int x4,int y4, SDL_Color c);
void drawbox(SDL_Surface *screen, int x1, int y1, int x2, int y2, SDL_Color c);
void drawfillbox(SDL_Surface *screen, int x1, int y1, int x2, int y2, SDL_Color c);
void drawbox(SDL_Surface *screen, int x1, int y1, int x2, int y2, SDL_Color c, SDL_Color *fc);
void drawellipsepoints(SDL_Surface *screen, int x1, int y1, int x, int y, SDL_Color c);
void drawellipse(SDL_Surface *screen, int x1, int y1, int x2, int y2, SDL_Color c);
void drawflowbox(SDL_Surface *dest, int oid, int otype);
@ -196,7 +196,9 @@ int drawletter(SDL_Surface *dest,int x, int y, int w, int h, char let, SDL_Color
void drawline(SDL_Surface *screen, int x1, int y1, int x2, int y2, SDL_Color c, int linestyle);
void drawlinebehind(SDL_Surface *screen, int x1, int y1, int x2, int y2, SDL_Color c);
void drawlink(SDL_Surface *dest, link_t *l);
void drawlinkSVG(link_t *l);
void drawobject(SDL_Surface *dest, mapobject_t *o, int doublebuffer);
void drawobjectSVG(SDL_Surface *dest, mapobject_t *o, int doublebuffer);
void drawpixel(SDL_Surface *screen, int x, int y, SDL_Color c);
void drawmap(void);
void drawmapbox(void);
@ -204,9 +206,12 @@ void drawobox(void);
void drawscreen(void);
void drawstatusbar(void);
void drawtext(SDL_Surface *dest, text_t *t);
void drawtextSVG(text_t *t);
void drawtoolbox(void);
void drawtoolboxselector(int buttonid, int altcolour);
void drawvector(SDL_Surface *dest, vectorimg_t *vimg, int x, int y, int w, int h,SDL_Color *overridefg, SDL_Color *overridebg );
void drawvectorSVG(vectorimg_t *vimg, int x, int y, int w, int h, SDL_Color *overridefg, SDL_Color *overridebg);
int drawSVG(char *svgfilename);
void drillto(int mapnum);
int endobjmove(int x, int y);
int endresize(int x, int y);
@ -219,6 +224,7 @@ int endlinksrcmove(int x, int y);
int endtext(void);
int endtextedit(void);
int endtextmove(int x, int y);
void endSVG(void);
int findpointpos(link_t *l, int px, int py);
void floodfill(SDL_Surface *dest, int x, int y, SDL_Color fillcol);
void floodfill2(SDL_Surface *dest, int x, int y, SDL_Color fillcol, SDL_Color bgcol);
@ -268,6 +274,7 @@ int startlinkmove(int x, int y);
int startobjmove(int x, int y);
int startresize (int x, int y);
int startresizetext (int x, int y);
int startSVG(char *svgfilename);
int starttextmove(int x, int y);
int textat(int x, int y);
void toggleflow(int oid, int otype);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 177 KiB

File diff suppressed because it is too large Load Diff