Generic Drawing Functions

:Associate with "Generic Drawing Functions" More...

Defines

#define DRAWGEN_4Connected   0x0080
#define DRAWGEN_Closed   0x0002
#define DRAWGEN_Highlight   0x0001
#define DRAWGEN_NoLastPixel   0x0040
#define TRACEGEN_8Connected   0x0001

Typedefs

typedef int(* GDrawHSpanL )(INT32, INT32, INT32, void *)
typedef int(* GDrawPointL )(INT32, INT32, void *)
typedef int(* GTestPointL )(INT32, INT32, void *)

Functions

GEOMLIBEXPORT int DrawLineGen (INT32 x1, INT32 y1, INT32 x2, INT32 y2, GDrawPointL gdrawpoint, void *userdata, UINT32 flags)
GEOMLIBEXPORT int DrawLinesGen (LPOINT2D *points, int numpoints, GDrawPointL gdrawpoint, void *userdata, UINT32 flags)
GEOMLIBEXPORT int DrawLineWideGen (INT32 x1, INT32 y1, INT32 x2, INT32 y2, double width, GDrawHSpanL gdrawhspan, GDrawPointL gdrawpoint, void *userdata, UINT32 flags)
int FillCircleGen (INT32 x, INT32 y, INT32 radius, GDrawHSpanL gdrawhspan, void *userdata, UINT32 flags)
GEOMLIBEXPORT int FillPolygonsGen (int numpolys, LPOLYGON *polys, GDrawHSpanL gdrawhspan, GDrawPointL gdrawpoint, void *userdata, MSTATUSINTERFACE statinterface, UINT32 flags)
int FillSeededGenL (INT32 SeedX, INT32 SeedY, GTestPointL TestInside, GDrawHSpanL gdrawhspan, LPOINT2D *boundpt, void *userdata, UINT32 flags)
int TraceBoundaryL (INT32 xstart, INT32 ystart, LPOLYGON *poly, GTestPointL testfunc, void *userdata, UINT32 flags)

Detailed Description

:Associate with "Generic Drawing Functions"


Define Documentation

#define DRAWGEN_4Connected   0x0080
 

Draw 4-connected lines in MxgDrawLineGenX().

Definition at line 53 of file drawgen.h.

#define DRAWGEN_Closed   0x0002
 

Set to "close" polylines, forming a polygon.

Definition at line 51 of file drawgen.h.

#define DRAWGEN_Highlight   0x0001
 

"Highlight" when drawing

Definition at line 50 of file drawgen.h.

#define DRAWGEN_NoLastPixel   0x0040
 

Don't draw last pixel in horizontal span when filling.

Definition at line 52 of file drawgen.h.

#define TRACEGEN_8Connected   0x0001
 

Trace 8-connected boundary.

Definition at line 55 of file drawgen.h.


Typedef Documentation

typedef int(* GDrawHSpanL)(INT32, INT32, INT32, void *)
 

Generic horizontal span function.

Definition at line 42 of file drawgen.h.

typedef int(* GDrawPointL)(INT32, INT32, void *)
 

Generic putpixel function.

Definition at line 45 of file drawgen.h.

typedef int(* GTestPointL)(INT32, INT32, void *)
 

Generic function to test if point in region.

Definition at line 48 of file drawgen.h.


Function Documentation

GEOMLIBEXPORT int DrawLineGen INT32  x1,
INT32  y1,
INT32  x2,
INT32  y2,
GDrawPointL  gdrawpoint,
void *  userdata,
UINT32  flags
 

Draw multiple connected lines on "generic display".

Parameters:
x1  Starting X coordinate
y1  Starting Y coordinate
x2  Ending X coordinate
y2  Ending Y coordinate
gdrawpoint  Generic putpixel function
userdata  Data to pass on to drawhspan
flags  Flags: DRAWGEN_4Connected Create 4-connected line (default is 8-connected)

GEOMLIBEXPORT int DrawLinesGen LPOINT2D points,
int  numpoints,
GDrawPointL  gdrawpoint,
void *  userdata,
UINT32  flags
 

Draw multiple connected lines on "generic display".

Parameters:
points  Array of points
numpoints  Number of points
gdrawpoint  Generic putpixel function
userdata  Data to pass on to drawhspan
flags  Flags: DRAWGEN_4Connected Create 4-connected line (default is 8-connected) DRAWGEN_Closed Line defines close shape

GEOMLIBEXPORT int DrawLineWideGen INT32  x1,
INT32  y1,
INT32  x2,
INT32  y2,
double  width,
GDrawHSpanL  gdrawhspan,
GDrawPointL  gdrawpoint,
void *  userdata,
UINT32  flags
 

Draw wide line on "generic display".

Parameters:
x1  Starting X coordinate
y1  Starting Y coordinate
x2  Ending X coordinate
y2  Ending y coordinate
width  Line width in pixels
gdrawhspan  Generic horizontal span function
gdrawpoint  Generic putpixel function
userdata  Data to pass on to drawhspan
flags  Flags: DRAWGEN_4Connected Create 4-connected line (default is 8-connected)

int FillCircleGen INT32  x,
INT32  y,
INT32  radius,
GDrawHSpanL  gdrawhspan,
void *  userdata,
UINT32  flags
 

Fill circle in generic bitmap.

Parameters:
x  X coordinate of center
y  Y coordinate of center
radius  Radius in pixels
gdrawhspan  Generic horizontal span function
userdata  Data to pass on to drawhspan
flags  Flags (none currently)

GEOMLIBEXPORT int FillPolygonsGen int  numpolys,
LPOLYGON polys,
GDrawHSpanL  gdrawhspan,
GDrawPointL  gdrawpoint,
void *  userdata,
MSTATUSINTERFACE  statinterface,
UINT32  flags
 

Fill polygon(s) in generic bitmap.

Parameters:
numpolys  Number of polygons to fill
polys  Array of polygons to fill
gdrawhspan  Generic horizontal span function
gdrawpoint  Generic putpixel function
userdata  Data to pass on to drawhspan/drawpoint
statinterface  Status interface
flags  Flags: DRAWGEN_NoLastPixel Don't draw last pixel in horizontal span when filling

int FillSeededGenL INT32  SeedX,
INT32  SeedY,
GTestPointL  TestInside,
GDrawHSpanL  gdrawhspan,
LPOINT2D boundpt,
void *  userdata,
UINT32  flags
 

Perform seeded fill on "generic display" (LONG coordinates).

Parameters:
SeedX  Seed point X coordinate
SeedY  Seed point Y coordinate
TestInside  Function to test if a point is inside region
gdrawhspan  Function to "draw" horizontal spans
boundpt  Rightmost "boundary" point returned (NULL if not needed)
userdata  Data to pass to TestInside and DrawHSpan functions
flags  Flags (none currently defined)

int TraceBoundaryL INT32  xstart,
INT32  ystart,
LPOLYGON poly,
GTestPointL  testfunc,
void *  userdata,
UINT32  flags
 

Find boundary of a region (LONG coordinates).

Parameters:
xstart  X starting coordinate
ystart  Y starting coordinate
poly  Polygon returned
testfunc  Function to test if point in region
userdata  Data to be passed to testfunc
flags  Flags: TRACEGEN_8Connected Trace 8-connected (allow diagonals) boundary


Generated on Tue Dec 14 13:20:24 2004 for TNTsdk by  doxygen 1.3.8-20040913